Skip to content

Instantly share code, notes, and snippets.

@dpzmick
Created March 8, 2013 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpzmick/5119556 to your computer and use it in GitHub Desktop.
Save dpzmick/5119556 to your computer and use it in GitHub Desktop.
Only the first occurrence of "created_at" is held as a date. Additionally :user now points to a user object, not a hash.
[27] pry(main)> tweet.to_hash
=> {:created_at=>2013-03-08 13:40:22 -0600,
:id=>310112778675425281,
:id_str=>"310112778675425281",
:text=>"post a twitter.",
:source=>"web",
:truncated=>false,
:in_reply_to_status_id=>nil,
:in_reply_to_status_id_str=>nil,
:in_reply_to_user_id=>nil,
:in_reply_to_user_id_str=>nil,
:in_reply_to_screen_name=>nil,
:user=>
#<Twitter::User:0x007f8b1b4ab610
@attrs=
{:id=>1155825132,
:id_str=>"1155825132",
:name=>"Not David Zmick",
:screen_name=>"NotZmick",
:location=>"",
:url=>nil,
:description=>nil,
:protected=>false,
:followers_count=>2,
:friends_count=>2,
:listed_count=>0,
:created_at=>"Thu Feb 07 03:05:53 +0000 2013",
:favourites_count=>0,
:utc_offset=>nil,
:time_zone=>nil,
:geo_enabled=>false,
:verified=>false,
:statuses_count=>41,
:lang=>"en",
:contributors_enabled=>false,
:is_translator=>false,
:profile_background_color=>"C0DEED",
:profile_background_image_url=>
"http://a0.twimg.com/images/themes/theme1/bg.png",
:profile_background_image_url_https=>
"https://si0.twimg.com/images/themes/theme1/bg.png",
:profile_background_tile=>false,
:profile_image_url=>
"http://a0.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
:profile_image_url_https=>
"https://si0.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
:profile_link_color=>"0084B4",
:profile_sidebar_border_color=>"C0DEED",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment