wiki:Dev/Twitter/Perl/Dumper

example for Net::Twitter::Lite

  • tested with version 0.08006

mentions

$VAR1 = [
          {
            'source' => 'web',
            'retweeted' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
            'favorited' => $VAR1->[0]{'retweeted'},
            'geo' => undef,
            'coordinates' => undef,
            'place' => undef,
            'retweet_count' => undef,
            'truncated' => $VAR1->[0]{'retweeted'},
            'created_at' => 'Mon Oct 04 09:58:00 +0000 2010',
            'contributors' => undef,
            'text' => '@wordiantest test',
            'user' => {
                        'friends_count' => 0,
                        'follow_request_sent' => $VAR1->[0]{'retweeted'},
                        'profile_image_url' => 'http://s.twimg.com/a/1286141004/images/default_profile_2_normal.png',
                        'profile_sidebar_fill_color' => 'DDEEF6',
                        'profile_background_color' => 'C0DEED',
                        'notifications' => $VAR1->[0]{'retweeted'},
                        'url' => undef,
                        'id' => 198443905,
                        'following' => $VAR1->[0]{'retweeted'},
                        'screen_name' => 'wordiantest1',
                        'lang' => 'ja',
                        'location' => undef,
                        'followers_count' => 1,
                        'name' => 'wordian',
                        'statuses_count' => 1,
                        'description' => undef,
                        'favourites_count' => 0,
                        'profile_background_tile' => $VAR1->[0]{'retweeted'},
                        'listed_count' => 0,
                        'profile_link_color' => '0084B4',
                        'contributors_enabled' => $VAR1->[0]{'retweeted'},
                        'profile_sidebar_border_color' => 'C0DEED',
                        'created_at' => 'Mon Oct 04 09:57:26 +0000 2010',
                        'utc_offset' => undef,
                        'verified' => $VAR1->[0]{'retweeted'},
                        'profile_background_image_url' => 'http://s.twimg.com/a/1286141004/images/themes/theme1/bg.png',
                        'show_all_inline_media' => $VAR1->[0]{'retweeted'},
                        'protected' => $VAR1->[0]{'retweeted'},
                        'profile_text_color' => '333333',
                        'time_zone' => undef,
                        'geo_enabled' => $VAR1->[0]{'retweeted'},
                        'profile_use_background_image' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' )
                      },
            'in_reply_to_user_id' => 189045689,
            'id' => '26348442227',
            'in_reply_to_status_id' => undef,
            'in_reply_to_screen_name' => 'wordiantest'
          }
        ];
$VAR1 = {
          'page' => 1,
          'query' => '%23twitter+OR+%23twitterapi',
          'completed_in' => '0.051869',
          'refresh_url' => '?since_id=26349591993&q=%23twitter+OR+%23twitterapi',
          'next_page' => '?page=2&max_id=26349591993&q=%23twitter+OR+%23twitterapi',
          'warning' => 'since_id removed for pagination.',
          'results_per_page' => 15,
          'max_id' => '26349591993',
          'results' => [
                         {
                           'source' => '<a href="http://juick.com" rel="nofollow">LainDoner</a>',
                           'to_user_id' => undef,
                           'geo' => undef,
                           'profile_image_url' => 'http://a2.twimg.com/profile_images/1134995850/51646001mf8_normal.jpg',
                           'from_user_id' => 158813965,
                           'iso_language_code' => 'en',
                           'created_at' => 'Mon, 04 Oct 2010 10:21:34 +0000',
                           'text' => '#podcast http://tinyurl.com/33j8x2e is about @DheeDiyana, @ipodcastess and @canf90 #twitter',
                           'metadata' => {
                                           'result_type' => 'recent'
                                         },
                           'id' => '26349591993',
                           'from_user' => 'anesteroff'
                         },
                         {
                           'source' => '<a href="http://ping.fm/" rel="nofollow">Ping.fm</a>',
                           'to_user_id' => undef,
                           'geo' => undef,
                           'profile_image_url' => 'http://a3.twimg.com/profile_images/1134283727/black-button-twitter-bird-450x450_normal.png',
                           'from_user_id' => 160260942,
                           'iso_language_code' => 'en',
                           'created_at' => 'Mon, 04 Oct 2010 10:20:36 +0000',
                           'text' => 'RT @cssrex-Top 25 URL Shortener Tools / Websites http://bit.ly/beHjZy #twitter #socialmedia:  http://bit.ly/cLboXy ...  http://ping.fm/XmTVy',
                           'metadata' => {
                                           'result_type' => 'recent'
                                         },
                           'id' => '26349545845',
                           'from_user' => 'TwiterKinG_'
                         },
                         {
                           'source' => '<a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>',
                           'to_user_id' => undef,
                           'geo' => undef,
                           'profile_image_url' => 'http://a0.twimg.com/profile_images/845369748/ardlogo3_normal.jpg',
                           'from_user_id' => 96093999,
                           'iso_language_code' => 'en',
                           'created_at' => 'Mon, 04 Oct 2010 10:20:15 +0000',
                           'text' => 'Social Media Isn\'t Free: This is attributable to the fact that social media platforms, like Facebook and T... http://bit.ly/8ZM9UM #twitter',
                           'metadata' => {
                                           'result_type' => 'recent'
                                         },
                           'id' => '26349528594',
                           'from_user' => 'Arddrive'
                         },

(snip)

                       ],
          'since_id' => '23988842984'
        };

show_status of retweet tweet

$VAR1 = {
          'source' => 'web',
          'retweeted' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
          'favorited' => $VAR1->{'retweeted'},
          'geo' => undef,
          'coordinates' => undef,
          'place' => undef,
          'retweeted_status' => {
                                  'source' => 'web',
                                  'retweeted' => $VAR1->{'retweeted'},
                                  'favorited' => $VAR1->{'retweeted'},
                                  'geo' => undef,
                                  'coordinates' => undef,
                                  'place' => undef,
                                  'retweet_count' => undef,
                                  'truncated' => $VAR1->{'retweeted'},
                                  'created_at' => 'Mon Oct 04 10:16:43 +0000 2010',
                                  'contributors' => undef,
                                  'text' => 'EVERYONE has #newtwitter EXCEPT me! damn you #twitter peeople! @Shahaaa',
                                  'user' => {
                                              'friends_count' => 227,
                                              'follow_request_sent' => $VAR1->{'retweeted'},
                                              'profile_image_url' => 'http://a2.twimg.com/profile_images/1134407662/Photo_Sep_25__18_41_26_normal.jpg',
                                              'profile_sidebar_fill_color' => 'efefef',
                                              'profile_background_color' => '131516',
                                              'notifications' => $VAR1->{'retweeted'},
                                              'url' => 'http://nainaa.com/',
                                              'id' => 18562353,
                                              'following' => $VAR1->{'retweeted'},
                                              'screen_name' => 'nainaa',
                                              'lang' => 'en',
                                              'location' => 'iPhone: 3.158466,101.622424',
                                              'followers_count' => 394,
                                              'statuses_count' => 19917,
                                              'name' => 'Naina I.',
                                              'description' => 'A Pollyanna who appreciates art in any form. SRK, Bollywood & iPhone lover. Tweets A LOT, consider yourself forewarned.',
                                              'favourites_count' => 86,
                                              'profile_background_tile' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ),
                                              'listed_count' => 30,
                                              'contributors_enabled' => $VAR1->{'retweeted'},
                                              'profile_link_color' => 'd60000',
                                              'profile_sidebar_border_color' => 'eeeeee',
                                              'created_at' => 'Fri Jan 02 20:46:53 +0000 2009',
                                              'utc_offset' => 28800,
                                              'verified' => $VAR1->{'retweeted'},
                                              'show_all_inline_media' => $VAR1->{'retweeted'},
                                              'profile_background_image_url' => 'http://s.twimg.com/a/1285282355/images/themes/theme14/bg.gif',
                                              'protected' => $VAR1->{'retweeted'},
                                              'profile_text_color' => '333333',
                                              'time_zone' => 'Kuala Lumpur',
                                              'profile_use_background_image' => $VAR1->{'retweeted_status'}{'user'}{'profile_background_tile'},
                                              'geo_enabled' => $VAR1->{'retweeted_status'}{'user'}{'profile_background_tile'}
                                            },
                                  'in_reply_to_user_id' => undef,
                                  'id' => '26349358001',
                                  'in_reply_to_status_id' => undef,
                                  'in_reply_to_screen_name' => undef
                                },
          'retweet_count' => undef,
          'truncated' => $VAR1->{'retweeted'},
          'created_at' => 'Mon Oct 04 10:18:16 +0000 2010',
          'contributors' => undef,
          'text' => 'RT @nainaa: EVERYONE has #newtwitter EXCEPT me! damn you #twitter peeople! @Shahaaa',
          'user' => {
                      'friends_count' => 499,
                      'follow_request_sent' => $VAR1->{'retweeted'},
                      'profile_image_url' => 'http://a0.twimg.com/profile_images/1133726500/peanut_normal.gif',
                      'profile_sidebar_fill_color' => 'DDEEF6',
                      'profile_background_color' => 'C0DEED',
                      'notifications' => $VAR1->{'retweeted'},
                      'url' => 'http://www.twitter.com/musalm',
                      'id' => 28346545,
                      'following' => $VAR1->{'retweeted_status'}{'user'}{'profile_background_tile'},
                      'screen_name' => 'musalm',
                      'lang' => 'en',
                      'location' => 'male\'/maldives',
                      'followers_count' => 268,
                      'statuses_count' => 1831,
                      'name' => 'musal',
                      'description' => 'television show producer/director (MNBC).i try to be a good friend.',
                      'favourites_count' => 10,
                      'profile_background_tile' => $VAR1->{'retweeted'},
                      'listed_count' => 13,
                      'contributors_enabled' => $VAR1->{'retweeted'},
                      'profile_link_color' => '0084B4',
                      'profile_sidebar_border_color' => 'C0DEED',
                      'created_at' => 'Thu Apr 02 14:24:45 +0000 2009',
                      'utc_offset' => -21600,
                      'verified' => $VAR1->{'retweeted'},
                      'show_all_inline_media' => $VAR1->{'retweeted'},
                      'profile_background_image_url' => 'http://s.twimg.com/a/1285890902/images/themes/theme1/bg.png',
                      'protected' => $VAR1->{'retweeted'},
                      'profile_text_color' => '333333',
                      'time_zone' => 'Central Time (US & Canada)',
                      'profile_use_background_image' => $VAR1->{'retweeted_status'}{'user'}{'profile_background_tile'},
                      'geo_enabled' => $VAR1->{'retweeted'}
                    },
          'in_reply_to_user_id' => undef,
          'id' => '26349433132',
          'in_reply_to_status_id' => undef,
          'in_reply_to_screen_name' => undef
        };

rate_limit_status

  • print Dumper $bot->rate_limit_status
    $VAR1 = {
              'reset_time_in_seconds' => 1286283652,
              'hourly_limit' => 350,
              'remaining_hits' => 316,
              'reset_time' => 'Tue Oct 05 13:00:52 +0000 2010'
            };
    
  • print Dumper $bot->rate_limit_status( { authenticate => })
    $VAR1 = {
              'reset_time_in_seconds' => 1286286340,
              'hourly_limit' => 150,
              'remaining_hits' => 150,
              'reset_time' => 'Tue Oct 05 13:45:40 +0000 2010'
            };
    
Last modified 13 years ago Last modified on Oct 5, 2010 9:48:54 PM