Subscribed unsubscribe Subscribe Subscribe

1行friends_timeline取得

Twitter

perl -MHTTP::Request -MLWP::UserAgent -MJSON -MEncode -le '($r=HTTP::Request->new(GET=>"http://twitter.com/statuses/friends_timeline.json"))->authorization_basic("username", "password"); print $_->{user}->{screen_name}." : ".encode_utf8($_->{text}) for reverse @{from_json(LWP::UserAgent->new->request($r)->content)}'


Wassr

perl -MHTTP::Request -MLWP::UserAgent -MJSON -le '($r=HTTP::Request->new(GET=>"http://api.wassr.jp/statuses/friends_timeline.json"))->authorization_basic("username", "password"); print $_->{user_login_id}." : ".$_->{text} for reverse @{from_json(LWP::UserAgent->new->request($r)->content)}'


もはや1行じゃないかw