twitter4r / twitter4r-core

Core library for Twitter4R, which provides Ruby bindings for the Twitter REST API
http://twitter4r.rubyforge.org
MIT License
82 stars 7 forks source link

Ensure snowflake release will not break API #6

Closed mbbx6spp closed 13 years ago

mbbx6spp commented 14 years ago

In preparation for the Snowflake Twitter.com API release on November 4th, 2010.

See announcement for more details: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/6a16efa375532182?pli=1

mbbx6spp commented 14 years ago

Test JSON:


[
  {
    "coordinates": null,
    "truncated": false,
    "created_at": "Thu Oct 14 22:20:15 +0000 2010",
    "favorited": false,
    "entities": {
      "urls": [
      ],
      "hashtags": [
      ],
      "user_mentions": [
        {
          "name": "Matt Harris",
          "id": 777925,
          "id_str": "777925",
          "indices": [
            0,
            14
          ],
          "screen_name": "themattharris"
        }
      ]
    },
    "text": "@themattharris hey how are things?",
    "annotations": null,
    "contributors": [
      {
        "id": 819797,
        "id_str": "819797",
        "screen_name": "episod"
      }
    ],
    "id": 12738165059,
    "id_str": "12738165059",
    "retweet_count": 0,
    "geo": null,
    "retweeted": false,
    "in_reply_to_user_id": 777925,
    "in_reply_to_user_id_str": "777925",
    "in_reply_to_screen_name": "themattharris",
    "user": {
      "id": 6253282,
      "id_str": "6253282"
    },
    "source": "web",
    "place": null,
    "in_reply_to_status_id": 12738040524,
    "in_reply_to_status_id_str": "12738040524"
  }
] 

Seems to work on Ruby v1.9.2p0 with json Ruby v1.4.6. Will test other combinations.

mbbx6spp commented 13 years ago

Added :id_str attribute to Twitter::Status model class so that if any client's datastore can't handle the new, larger Tweet IDs, they can migrate to the string version of the ID.

See commit 0b5ffae22e3ce068874c1f63c2c64826d6282e0d for change.