Issue #364: source_status_id field in retweet entity sizes

Tweet entities documentation gives the impression that "sizes" is a map of size name to size info. this used to be true, but now retweets with entities have source_status_id and source_status_id_str fields not mentioned in documentation. There's no reason for these fields to be in sizes - they make more sense as fields one level higher, alongside "sizes", and "media_url", and their presence within sizes makes the json harder to parse/forces hardcoding size names.

ex: /1/statuses/show/205282967432593408.json?include_entities=1
{
"contributors": null,
"coordinates": null,
"created_at": "Wed May 23 13:04:08 +0000 2012",
"entities": {
"hashtags": [
{
"indices": [
21,
28
],
"text": "Petrol"
},
{
"indices": [
87,
95
],
"text": "IBNnews"
}
],
"media": [
{
"display_url": "pic.twitter.com/2dQHXYfJ",
"expanded_url": "http://twitter.com/IBNLiveRealtime/status/205282515685081088/photo/1",
"id": 205282515689275393,
"id_str": "205282515689275393",
"indices": [
96,
116
],
"media_url": "http://p.twimg.com/AtlPXEJCAAE737_.jpg",
"media_url_https": "https://p.twimg.com/AtlPXEJCAAE737_.jpg",
"sizes": {
"large": {
"h": 420,
"resize": "fit",
"w": 630
},
"medium": {
"h": 400,
"resize": "fit",
"w": 600
},
"small": {
"h": 227,
"resize": "fit",
"w": 340
},
"source_status_id": 205282515685081088,
"source_status_id_str": "205282515685081088",
"thumb": {
"h": 150,
"resize": "crop",
"w": 150
}
},
"type": "photo",
"url": "http://t.co/2dQHXYfJ"
}
], ...

Updates

  • The erroneous placement of these fields is acknowledged; thanks for the report. We'll work to rectify this.
  • 2012-05-24: The placement of fields has been rectified. Documentation has been updated.