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-Tag: r89-trunk~20 X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=567a134d7d421d2c54b5fff0ed25d9a5514d2285;p=lab.git * add new hash members to return value of or_search and mentions_ids git-svn-id: https://lab.mitty.jp/svn/lab/trunk@65 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/twitter/twitterbot.pl b/twitter/twitterbot.pl index eb9079d..d1dd229 100755 --- a/twitter/twitterbot.pl +++ b/twitter/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} };