Twitter / Ruby - User id in Status id?

Is there a way to extract user id's (331063009) from status ids(234552300176293888)? Ruby answer preferable if there's an answer.Responses are from the Twitter's REST API (https://dev.twitter.co...

Is there a way to extract user id's (331063009) from status ids(234552300176293888)? Ruby answer preferable if there's an answer.

Responses are from the Twitter's REST API (https://dev.twitter.com/docs/api/1.1/)

I want to have tweets and user information into two separate databases, and not have a document that stores who the statuses belong too. I much rather have a search query (small dataset).

Sample response:

{"_id"=>331063009,
 "attrs"=>
  {"default_profile_image"=>true,
   "id"=>331063009,
   "contributors_enabled"=>false,
   "geo_enabled"=>false,
   "favourites_count"=>0,
   "verified"=>false,
   "followers_count"=>6,
   "profile_background_image_url"=>
    "http://a0.twimg.com/images/themes/theme1/bg.png",
   "profile_link_color"=>"0084B4",
   "show_all_inline_media"=>false,
   "profile_background_image_url_https"=>
    "https://si0.twimg.com/images/themes/theme1/bg.png",
   "notifications"=>false,
   "utc_offset"=>nil,
   "time_zone"=>nil,
   "follow_request_sent"=>false,
   "name"=>"ZORO",
   "profile_use_background_image"=>true,
   "protected"=>false,
   "profile_text_color"=>"333333",
   "default_profile"=>true,
   "url"=>nil,
   "created_at"=>"Thu Jul 07 15:58:34 +0000 2011",
   "lang"=>"en",
   "profile_sidebar_border_color"=>"C0DEED",
   "statuses_count"=>1,
   "profile_image_url_https"=>
    "https://si0.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
   "description"=>"",
   "listed_count"=>0,
   "profile_image_url"=>
    "http://a0.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
   "id_str"=>"331063009",
   "friends_count"=>24,
   "profile_background_tile"=>false,
   "profile_sidebar_fill_color"=>"DDEEF6",
   "location"=>"",
   "is_translator"=>false,
   "status"=>
    {"in_reply_to_status_id_str"=>nil,
     "favorited"=>false,
     "in_reply_to_user_id_str"=>nil,
     "in_reply_to_user_id"=>nil,
     "coordinates"=>nil,
     "retweeted"=>false,
     "retweet_count"=>0,
     "in_reply_to_status_id"=>nil,
     "source"=>
      "<a href=\"http://twitter.com/tweetbutton\" rel=\"nofollow\">Tweet Button</a>",
     "contributors"=>nil,
     "in_reply_to_screen_name"=>nil,
     "truncated"=>false,
     "id"=>234552300176293888,
     "possibly_sensitive"=>false,
     "id_str"=>"234552300176293888",
     "place"=>nil,
     "geo"=>nil,
     "text"=>
      "The Cool Gadgets - Quest for The Coolest Gadgets http://t.co/FGhpj4Gu via @thecoolgadgets",
     "created_at"=>"Sun Aug 12 07:30:00 +0000 2012"},
   "screen_name"=>"ZORO1959",
   "following"=>false,
   "profile_background_color"=>"C0DEED"}}

The Twitter API directly exposes the data you want. I used the Twitter API console to request http://api.twitter.com/1/statuses/show/234552300176293888.json, and it gave me back:

{
  "id": 234552300176293900,
  "id_str": "234552300176293888",
  // ...
  "user":  {
    "id": 331063009,
    "id_str": "331063009",
    "name": "ZORO",
    "screen_name": "ZORO1959",
    // ...
  },
}

It happily returns the user ID given the status ID.

Translating... 0%