Created
May 19, 2009 18:34
-
-
Save perigrin/114304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Net::Twitter::Lite::API::REST; | |
use Moose::Role; | |
use Net::Twitter::Lite::API::Sugar; # import the sugar | |
use namespace::autoclean; | |
with 'Net::Twitter::Lite::API'; | |
base_url => sub { shift->apiurl || 'http://twitter.com' }; | |
# Definition is stored as a sub in order to return a deep copy; | |
# we don't want the caller inadvertently changing the definition! | |
# Status Methods | |
definition public_timeline => ( | |
description => <<'', | |
Returns the 20 most recent statuses from non-protected users who have | |
set a custom user icon. Does not require authentication. Note that | |
the public timeline is cached for 60 seconds so requesting it more | |
often than that is a waste of resources. | |
path => 'statuses/public_timeline', | |
method => 'GET', | |
returns => 'ArrayRef[Status]', | |
params => [], | |
required => [], | |
); | |
defintion friends_timeline => ( | |
description => <<'', | |
Returns the 20 most recent statuses posted by the authenticating user | |
and that user's friends. This is the equivalent of /home on the Web. | |
aliases => [qw/following_timeline/], | |
path => 'statuses/friends_timeline', | |
method => 'GET', | |
params => [qw/since_id max_id count page/], | |
required => [], | |
returns => 'ArrayRef[Status]', | |
); | |
__PACKAGE__->meta->make_immutable; | |
1; | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment