From: mitty Date: Tue, 5 Oct 2010 03:57:59 +0000 (+0000) Subject: * add new hash members to return value of or_search and mentions_ids X-Git-Url: http://lab.mitty.jp/git/?p=lab.git;a=commitdiff_plain;h=f32b6174a5345f4fca50b69f8667dcaa78c6087d * add new hash members to return value of or_search and mentions_ids git-svn-id: https://lab.mitty.jp/svn/lab/trunk/twitter@65 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/twitterbot.pl b/twitterbot.pl index eb9079d..d1dd229 100755 --- a/twitterbot.pl +++ b/twitterbot.pl @@ -155,9 +155,11 @@ sub or_search { screen_name => $res->{user}{screen_name}, status_id => $res->{id}, text => $res->{text}, + user_id => $res->{user}{id}, }; if ($res->{retweeted_status}) { - $id->{type} = 'retweet'; + $id->{retweet_of} = $res->{retweeted_status}{id}; + $id->{type} = 'retweet'; } else { $id->{type} = 'search'; @@ -206,6 +208,7 @@ sub mentions_ids { status_id => $_->{id}, text => $_->{text}, type => 'mention', + user_id => $_->{user}{id}, } } @{$res} };