Skip to content

Instantly share code, notes, and snippets.

@Yamabiko
Last active January 1, 2016 05:08
Show Gist options
  • Save Yamabiko/8096038 to your computer and use it in GitHub Desktop.
Save Yamabiko/8096038 to your computer and use it in GitHub Desktop.
SearchResultsクラスの構造(*****は意図的に変更したところ)
#<Twitter::SearchResults:0x00000001aa3150
@attrs={
:statuses=>[
{
:metadata=>{
:result_type=>"recent",
:iso_language_code=>"ja"
},
:created_at=>"Fri Dec 20 01:54:58 +0000 2013",
:id=>4138499781806*****,
:id_str=>"4138499781806*****",
:text=>"呟きの内容",
:source=>"web",
:truncated=>false,
:in_reply_to_status_id=>4138477998566*****,
:in_reply_to_status_id_str=>"4138477998566*****",
:in_reply_to_user_id=>274943108,
:in_reply_to_user_id_str=>"274943108",
:in_reply_to_screen_name=>"echo_ymbk",
:user=>{
:id=>135*****,
:id_str=>"135*****",
:name=>"投稿したユーザの名前",
:screen_name=>"******",
:location=>"東日本",
:description=>"投稿したユーザのdescription",
:url=>"http://t.co/*****",
:entities=>{
:url=>{
:urls=>[
{
:url=>"http://t.co/*****",
:expanded_url=>"http://www.******.net/",
:display_url=>"******.net",
:indices=>[0, 22]
}
]
},
:description=>{
:urls=>[]
}
},
:protected=>false,
:followers_count=>197,
:friends_count=>187,
:listed_count=>8,
:created_at=>"Sun Feb 17 05:00:04 +0000 2008",
:favourites_count=>383,
:utc_offset=>32400,
:time_zone=>"Tokyo",
:geo_enabled=>true,
:verified=>false,
:statuses_count=>16135,
:lang=>"ja",
:contributors_enabled=>false,
:is_translator=>false,
:profile_background_color=>"C0DEED",
:profile_background_image_url=>"http://a0.twimg.com/*****",
:profile_background_image_url_https=>"https://si0.twimg.com/*****",
:profile_background_tile=>false,
:profile_image_url=>"http://pbs.twimg.com/*****",
:profile_image_url_https=>"https://pbs.twimg.com/*****",
:profile_banner_url=>"https://pbs.twimg.com/*****",
:profile_link_color=>"0084B4",
:profile_sidebar_border_color=>"FFFFFF",
:profile_sidebar_fill_color=>"DDEEF6",
:profile_text_color=>"333333",
:profile_use_background_image=>true,
:default_profile=>false,
:default_profile_image=>false,
:following=>true,
:follow_request_sent=>false,
:notifications=>false
},
:geo=>nil,
:coordinates=>nil,
:place=>nil,
:contributors=>nil,
:retweet_count=>0,
:favorite_count=>0,
:entities=>{
:hashtags=>[],
:symbols=>[],
:urls=>[
{
:url=>"http://t.co/*****",
:expanded_url=>"http://www.*****.jp/*****",
:display_url=>"*****.jp/*****",
:indices=>[56, 78]
}
],
:user_mentions=>[
{
:screen_name=>"echo_ymbk",
:name=>"echo ”yamabiko”;",
:id=>274943108,
:id_str=>"274943108",
:indices=>[0, 10]
}
]
},
:favorited=>false,
:retweeted=>false,
:possibly_sensitive=>false,
:lang=>"ja"
},
... (ほかのtweet)
],
:search_metadata=>{
:completed_in=>0.016,
:max_id=>413849978180608000,
:max_id_str=>"413849978180608000",
:next_results=>"?max_id=413568197464313856&q=%40echo_ymbk&count=20&include_entities=1&result_type=recent",
:query=>"%40echo_ymbk",
:refresh_url=>"?since_id=413849978180608000&q=%40echo_ymbk&result_type=recent&include_entities=1",
:count=>20,
:since_id=>0,
:since_id_str=>"0"
}
},
@collection=[
#<Twitter::Tweet id=4138499781806*****>,
...
]
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment