File Coverage

blib/lib/Net/Twitter/Role/API/RESTv1_1.pm
Criterion Covered Total %
statement 21 23 91.3
branch 2 2 100.0
condition n/a
subroutine 6 7 85.7
pod n/a
total 29 32 90.6


line stmt bran cond sub pod time code
1             package Net::Twitter::Role::API::RESTv1_1;
2             $Net::Twitter::Role::API::RESTv1_1::VERSION = '4.01010';
3 5     5   4872 use Moose::Role;
  5         9323  
  5         26  
4 5     5   18574 use Carp::Clan qw/^(?:Net::Twitter|Moose|Class::MOP)/;
  5         8  
  5         40  
5 5     5   2854 use Net::Twitter::API;
  5         12  
  5         25  
6 5     5   3376 use DateTime::Format::Strptime;
  5         10  
  5         531  
7 5     5   26 use URI;
  5         5  
  5         19028  
8              
9             with 'Net::Twitter::Role::API::UploadMedia';
10              
11             # API v1.1 incorporates the Search and Upload APIs
12             excludes map "Net::Twitter::Role::$_", qw/API::Search API::Upload Net::Twitter::Role::RateLimit/;
13              
14             has apiurl => ( isa => 'Str', is => 'ro', default => 'http://api.twitter.com/1.1' );
15             has apihost => ( isa => 'Str', is => 'ro', lazy => 1, builder => '_build_apihost' );
16             has apirealm => ( isa => 'Str', is => 'ro', default => 'Twitter API' );
17              
18             sub _build_apihost {
19 0     0   0 my $uri = URI->new(shift->apiurl);
20 0         0 join ':', $uri->host, $uri->port;
21             }
22              
23             after BUILD => sub {
24             my $self = shift;
25              
26             $self->{apiurl} =~ s/^http:/https:/ if $self->ssl;
27             };
28              
29             base_url 'apiurl';
30             authenticate 1;
31              
32             our $DATETIME_PARSER = DateTime::Format::Strptime->new(pattern => '%a %b %d %T %z %Y');
33             datetime_parser $DATETIME_PARSER;
34              
35             twitter_api_method mentions => (
36             description => <<'',
37             Returns the 20 most recent mentions (statuses containing @username) for the
38             authenticating user.
39              
40             aliases => [qw/replies mentions_timeline/],
41             path => 'statuses/mentions_timeline',
42             method => 'GET',
43             params => [qw/since_id max_id count trim_user include_entities contributor_details/],
44             booleans => [qw/trim_user include_entities contributor_details/],
45             required => [],
46             returns => 'ArrayRef[Status]',
47             );
48              
49             twitter_api_method user_timeline => (
50             description => <<'',
51             Returns the 20 most recent statuses posted by the authenticating user, or the
52             user specified by C<screen_name> or C<user_id>.
53              
54             path => 'statuses/user_timeline',
55             method => 'GET',
56             params => [qw/user_id screen_name since_id max_id count trim_user exclude_replies include_rts contributor_details/],
57             booleans => [qw/trim_user exclude_replies include_rts contributor_details/],
58             required => [],
59             returns => 'ArrayRef[Status]',
60             );
61              
62             twitter_api_method home_timeline => (
63             description => <<'',
64             Returns the 20 most recent statuses, including retweets, posted by the
65             authenticating user and that user's friends.
66              
67             path => 'statuses/home_timeline',
68             method => 'GET',
69             params => [qw/since_id max_id count exclude_replies contributor_details
70             include_entities trim_user/],
71             booleans => [qw/skip_user exclude_replies contributor_details include_rts include_entities
72             trim_user include_my_retweet/],
73             required => [],
74             returns => 'ArrayRef[Status]',
75             );
76              
77             twitter_api_method friends_timeline => (
78             description => <<'',
79             Returns the 20 most recent statuses, including retweets, posted by the
80             authenticating user and that user's friends.
81              
82             path => 'statuses/home_timeline',
83             aliases => [qw/following_timeline/],
84             method => 'GET',
85             params => [qw/since_id max_id count exclude_replies contributor_details
86             include_entities trim_user/],
87             booleans => [qw/skip_user exclude_replies contributor_details include_rts include_entities
88             trim_user include_my_retweet/],
89             required => [],
90             returns => 'ArrayRef[Status]',
91             deprecated => sub { carp "$_[0] DEPRECATED: using home_timeline instead" },
92             );
93              
94             twitter_api_method retweets => (
95             description => <<'',
96             Returns up to 100 of the first retweets of a given tweet.
97              
98             path => 'statuses/retweets/:id',
99             method => 'GET',
100             params => [qw/id count trim_user/],
101             booleans => [qw/trim_user/],
102             required => [qw/id/],
103             returns => 'Arrayref[Status]',
104             );
105              
106             twitter_api_method show_status => (
107             description => <<'',
108             Returns a single status, specified by the id parameter. The
109             status's author will be returned inline.
110              
111             path => 'statuses/show/:id',
112             method => 'GET',
113             params => [qw/id trim_user include_entities include_my_retweet/],
114             booleans => [qw/trim_user include_entities include_my_retweet/],
115             required => [qw/id/],
116             returns => 'Status',
117             );
118              
119             twitter_api_method destroy_status => (
120             description => <<'',
121             Destroys the status specified by the required ID parameter. The
122             authenticating user must be the author of the specified status.
123              
124             path => 'statuses/destroy/:id',
125             method => 'POST',
126             params => [qw/id trim_user/],
127             booleans => [qw/trim_user/],
128             required => [qw/id/],
129             returns => 'Status',
130             );
131              
132             twitter_api_method update => (
133             path => 'statuses/update',
134             method => 'POST',
135             params => [qw/media_ids status lat long place_id display_coordinates in_reply_to_status_id trim_user/],
136             required => [qw/status/],
137             booleans => [qw/display_coordinates trim_user/],
138             add_source => 1,
139             returns => 'Status',
140             description => <<EOT,
141              
142             Updates the authenticating user's status. Requires the status parameter
143             specified. A status update with text identical to the authenticating
144             user's current status will be ignored.
145              
146             \=over 4
147              
148             \=item status
149              
150             Required. The text of your status update. URL encode as necessary. Statuses
151             over 140 characters will cause a 403 error to be returned from the API.
152              
153             \=item in_reply_to_status_id
154              
155             Optional. The ID of an existing status that the update is in reply to. o Note:
156             This parameter will be ignored unless the author of the tweet this parameter
157             references is mentioned within the status text. Therefore, you must include
158             \@username, where username is the author of the referenced tweet, within the
159             update.
160              
161             \=item lat
162              
163             Optional. The location's latitude that this tweet refers to. The valid ranges
164             for latitude is -90.0 to +90.0 (North is positive) inclusive. This parameter
165             will be ignored if outside that range, if it is not a number, if geo_enabled is
166             disabled, or if there not a corresponding long parameter with this tweet.
167              
168             \=item long
169              
170             Optional. The location's longitude that this tweet refers to. The valid ranges
171             for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter
172             will be ignored if outside that range, if it is not a number, if geo_enabled is
173             disabled, or if there not a corresponding lat parameter with this tweet.
174              
175             \=item place_id
176              
177             Optional. The place to attach to this status update. Valid place_ids can be
178             found by querying C<reverse_geocode>.
179              
180             \=item display_coordinates
181              
182             Optional. By default, geo-tweets will have their coordinates exposed in the
183             status object (to remain backwards compatible with existing API applications).
184             To turn off the display of the precise latitude and longitude (but keep the
185             contextual location information), pass C<display_coordinates => 0> on the
186             status update.
187              
188             \=back
189              
190             EOT
191              
192             );
193              
194             twitter_api_method retweet => (
195             description => <<'',
196             Retweets a tweet.
197              
198             path => 'statuses/retweet/:id',
199             method => 'POST',
200             params => [qw/idtrim_user/],
201             booleans => [qw/trim_user/],
202             required => [qw/id/],
203             returns => 'Status',
204             );
205              
206             twitter_api_method update_with_media => (
207             path => 'statuses/update_with_media',
208             method => 'POST',
209             params => [qw/
210             status media[] possibly_sensitive in_reply_to_status_id lat long place_id display_coordinates
211             /],
212             required => [qw/status media[]/],
213             booleans => [qw/possibly_sensitive display_coordinates/],
214             returns => 'Status',
215             description => <<'EOT',
216             Updates the authenticating user's status and attaches media for upload.
217              
218             The C<media[]> parameter is an arrayref with the following interpretation:
219              
220             [ $file ]
221             [ $file, $filename ]
222             [ $file, $filename, Content_Type => $mime_type ]
223             [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ]
224              
225             The first value of the array (C<$file>) is the name of a file to open. The
226             second value (C<$filename>) is the name given to Twitter for the file. If
227             C<$filename> is not provided, the basename portion of C<$file> is used. If
228             C<$mime_type> is not provided, it will be provided automatically using
229             L<LWP::MediaTypes::guess_media_type()>.
230              
231             C<$raw_image_data> can be provided, rather than opening a file, by passing
232             C<undef> as the first array value.
233              
234             The Tweet text will be rewritten to include the media URL(s), which will reduce
235             the number of characters allowed in the Tweet text. If the URL(s) cannot be
236             appended without text truncation, the tweet will be rejected and this method
237             will return an HTTP 403 error.
238             EOT
239              
240             );
241              
242             twitter_api_method oembed => (
243             description => <<'EOT',
244             Returns information allowing the creation of an embedded representation of a
245             Tweet on third party sites. See the L<oEmbed|http://oembed.com/> specification
246             for information about the response format.
247              
248             While this endpoint allows a bit of customization for the final appearance of
249             the embedded Tweet, be aware that the appearance of the rendered Tweet may
250             change over time to be consistent with Twitter's L<Display
251             Requirements|https://dev.twitter.com/terms/display-requirements>. Do not rely
252             on any class or id parameters to stay constant in the returned markup.
253              
254             EOT
255              
256             method => 'GET',
257             path => 'statuses/oembed',
258             params => [qw/id url maxwidth hide_media hide_thread omit_script align related lang/],
259             required => [qw//],
260             booleans => [qw/hide_media hide_thread omit_script/],
261             returns => 'Status',
262             );
263              
264             twitter_api_method retweeters_ids => (
265             description => <<'EOT',
266             Returns a collection of up to 100 user IDs belonging to users who have
267             retweeted the tweet specified by the id parameter.
268              
269             This method offers similar data to C<retweets> and replaces API v1's
270             C<retweeted_by_ids> method.
271             EOT
272             method => 'GET',
273             path => 'statuses/retweeters/ids',
274             params => [qw/id cursor stringify_ids/],
275             required => [qw/id/],
276             booleans => [qw/stringify_ids/],
277             returns => 'HashRef',
278             );
279              
280             twitter_api_method search => (
281             description => <<'EOT',
282             Returns a HASH reference with some meta-data about the query including the
283             C<next_page>, C<refresh_url>, and C<max_id>. The statuses are returned in
284             C<results>. To iterate over the results, use something similar to:
285              
286             my $r = $nt->search($search_term);
287             for my $status ( @{$r->{statuses}} ) {
288             print "$status->{text}\n";
289             }
290             EOT
291              
292             path => 'search/tweets',
293             method => 'GET',
294             params => [qw/q count callback lang locale rpp since_id max_id until geocode result_type include_entities/],
295             required => [qw/q/],
296             booleans => [qw/include_entities/],
297             returns => 'HashRef',
298             );
299              
300             twitter_api_method direct_messages => (
301             description => <<'EOT',
302             Returns a list of the 20 most recent direct messages sent to the authenticating
303             user including detailed information about the sending and recipient users.
304              
305             Important: this method requires an access token with RWD (read, write, and
306             direct message) permissions.
307             EOT
308              
309             path => 'direct_messages',
310             method => 'GET',
311             params => [qw/since_id max_id count page include_entities skip_status/],
312             required => [],
313             booleans => [qw/include_entities skip_status/],
314             returns => 'ArrayRef[DirectMessage]',
315             );
316              
317             twitter_api_method sent_direct_messages => (
318             description => <<'EOT',
319             Returns a list of the 20 most recent direct messages sent by the authenticating
320             user including detailed information about the sending and recipient users.
321              
322             Important: this method requires an access token with RWD (read, write, and
323             direct message) permissions.
324             EOT
325              
326             aliases => [qw/direct_messages_sent/],
327             path => 'direct_messages/sent',
328             method => 'GET',
329             params => [qw/since_id max_id page count include_entities/],
330             booleans => [qw/include_entities/],
331             required => [qw//],
332             returns => 'ArrayRef[DirectMessage]',
333             );
334              
335             twitter_api_method show_direct_message => (
336             description => <<'EOT',
337             Returns a single direct message, specified by an id parameter. Like
338             the C<direct_messages> request, this method will include the
339             user objects of the sender and recipient. Requires authentication.
340              
341             Important: this method requires an access token with RWD (read, write, and
342             direct message) permissions.
343             EOT
344              
345             path => 'direct_messages/show',
346             method => 'GET',
347             params => [qw/id/],
348             booleans => [],
349             required => [qw/id/],
350             returns => 'HashRef',
351             );
352              
353             twitter_api_method destroy_direct_message => (
354             description => <<'EOT',
355             Destroys the direct message specified in the required ID parameter.
356             The authenticating user must be the recipient of the specified direct
357             message.
358              
359             Important: this method requires an access token with RWD (read, write, and
360             direct message) permissions.
361             EOT
362              
363             path => 'direct_messages/destroy',
364             method => 'POST',
365             params => [qw/id include_entities/],
366             booleans => [qw/include_entities/],
367             required => [qw/id/],
368             returns => 'DirectMessage',
369             );
370              
371             twitter_api_method new_direct_message => (
372             description => <<'EOT',
373             Sends a new direct message to the specified user from the authenticating user.
374             Requires both the user and text parameters. Returns the sent message when
375             successful. In order to support numeric screen names, the C<screen_name> or
376             C<user_id> parameters may be used instead of C<user>.
377              
378             Important: this method requires an access token with RWD (read, write, and
379             direct message) permissions.
380             EOT
381              
382             path => 'direct_messages/new',
383             method => 'POST',
384             params => [qw/user_id screen_name text/],
385             booleans => [qw//],
386             required => [qw/text/],
387             returns => 'DirectMessage',
388             );
389              
390             around new_direct_message => sub {
391             my $orig = shift;
392             my $self = shift;
393              
394             my $args = ref $_[-1] eq ref {} ? pop : {};
395             $args->{user} = shift unless exists $args->{user} || exists $args->{screen_name} || exists $args->{user_id};
396             $args->{text} = shift unless exists $args->{text};
397              
398             croak "too many args" if @_;
399              
400             if ( my $user = delete $args->{user} ) {
401             warn "user argument to new_direct_message deprecated; use screen_name or user_id";
402              
403             if ( $user =~ /^\d+$/ ) {
404             $args->{user_id} = $user;
405             }
406             else {
407             $args->{screen_name} = $user;
408             }
409             }
410              
411             return $self->$orig($args);
412             };
413              
414             twitter_api_method friends_ids => (
415             description => <<'EOT',
416             Returns a reference to an array of numeric IDs for every user followed by the
417             specified user. The order of the IDs is reverse chronological.
418              
419             Use the optional C<cursor> parameter to retrieve IDs in pages of 5000. When
420             the C<cursor> parameter is used, the return value is a reference to a hash with
421             keys C<previous_cursor>, C<next_cursor>, and C<ids>. The value of C<ids> is a
422             reference to an array of IDS of the user's friends. Set the optional C<cursor>
423             parameter to -1 to get the first page of IDs. Set it to the prior return's
424             value of C<previous_cursor> or C<next_cursor> to page forward or backwards.
425             When there are no prior pages, the value of C<previous_cursor> will be 0. When
426             there are no subsequent pages, the value of C<next_cursor> will be 0.
427             EOT
428              
429             aliases => [qw/following_ids/],
430             path => 'friends/ids',
431             method => 'GET',
432             params => [qw/user_id screen_name cursor stringify_ids/],
433             required => [qw//],
434             booleans => [qw/stringify_ids/],
435             returns => 'HashRef|ArrayRef[Int]',
436             );
437              
438             twitter_api_method followers => (
439             description => <<'',
440             Returns a cursored collection of user objects for users following the specified user.
441              
442             aliases => [qw/followers_list/],
443             path => 'followers/list',
444             method => 'GET',
445             params => [qw/user_id screen_name cursor/],
446             required => [qw//],
447             returns => 'HashRef',
448             );
449              
450             twitter_api_method friends => (
451             description => <<'',
452             Returns a cursored collection of user objects for users followed by the specified user.
453              
454             aliases => [qw/friends_list/],
455             path => 'friends/list',
456             method => 'GET',
457             params => [qw/user_id screen_name cursor/],
458             required => [qw//],
459             returns => 'HashRef',
460             );
461              
462             twitter_api_method followers_ids => (
463             description => <<'EOT',
464             Returns a reference to an array of numeric IDs for every user following the
465             specified user. The order of the IDs may change from call to call. To obtain
466             the screen names, pass the arrayref to L</lookup_users>.
467              
468             Use the optional C<cursor> parameter to retrieve IDs in pages of 5000. When
469             the C<cursor> parameter is used, the return value is a reference to a hash with
470             keys C<previous_cursor>, C<next_cursor>, and C<ids>. The value of C<ids> is a
471             reference to an array of IDS of the user's followers. Set the optional C<cursor>
472             parameter to -1 to get the first page of IDs. Set it to the prior return's
473             value of C<previous_cursor> or C<next_cursor> to page forward or backwards.
474             When there are no prior pages, the value of C<previous_cursor> will be 0. When
475             there are no subsequent pages, the value of C<next_cursor> will be 0.
476             EOT
477              
478             path => 'followers/ids',
479             method => 'GET',
480             params => [qw/user_id screen_name cursor/],
481             params => [qw/user_id screen_name cursor stringify_ids/],
482             required => [qw//],
483             booleans => [qw/stringify_ids/],
484             returns => 'HashRef|ArrayRef[Int]',
485             );
486              
487             twitter_api_method lookup_friendships => (
488             path => 'friendships/lookup',
489             method => 'GET',
490             params => [qw/user_id screen_name/],
491             required => [],
492             returns => 'ArrayRef',
493             description => <<''
494             Returns the relationship of the authenticating user to the comma separated list
495             or ARRAY ref of up to 100 screen_names or user_ids provided. Values for
496             connections can be: following, following_requested, followed_by, none.
497             Requires authentication.
498              
499             );
500              
501             twitter_api_method friendships_incoming => (
502             description => <<'EOT',
503             Returns an HASH ref with an array of numeric IDs in the C<ids> element for
504             every user who has a pending request to follow the authenticating user.
505             EOT
506              
507             aliases => [qw/incoming_friendships/],
508             path => 'friendships/incoming',
509             method => 'GET',
510             params => [qw/cursor stringify_ids/],
511             required => [],
512             booleans => [qw/stringify_ids/],
513             returns => 'HashRef',
514             );
515              
516             twitter_api_method friendships_outgoing => (
517             description => <<'EOT',
518             Returns an HASH ref with an array of numeric IDs in the C<ids> element for
519             every protected user for whom the authenticating user has a pending follow
520             request.
521             EOT
522              
523             aliases => [qw/outgoing_friendships/],
524             path => 'friendships/outgoing',
525             method => 'GET',
526             params => [qw/cursor stringify_ids/],
527             required => [],
528             booleans => [qw/stringify_ids/],
529             returns => 'HashRef',
530              
531             );
532              
533             twitter_api_method create_friend => (
534             description => <<'',
535             Follows the user specified in the C<user_id> or C<screen_name> parameter as the
536             authenticating user. Returns the befriended user when successful. Returns a
537             string describing the failure condition when unsuccessful.
538              
539             aliases => [qw/follow follow_new create_friendship/],
540             path => 'friendships/create',
541             method => 'POST',
542             params => [qw/user_id screen_name follow/],
543             booleans => [qw/follow/],
544             required => [qw//],
545             returns => 'BasicUser',
546             );
547              
548             twitter_api_method destroy_friend => (
549             description => <<'',
550             Discontinues friendship with the user specified in the C<user_id> or
551             C<screen_name> parameter as the authenticating user. Returns the un-friended
552             user when successful. Returns a string describing the failure condition when
553             unsuccessful.
554              
555             aliases => [qw/unfollow destroy_friendship/],
556             path => 'friendships/destroy',
557             method => 'POST',
558             params => [qw/user_id screen_name/],
559             booleans => [qw//],
560             required => [qw/id/],
561             returns => 'BasicUser',
562             );
563              
564             twitter_api_method update_friendship => (
565             path => 'friendships/update',
566             method => 'POST',
567             params => [qw/user_id screen_name device retweets/],
568             required => [qw//],
569             booleans => [qw/device retweets/],
570             returns => 'HashRef',
571             description => <<''
572             Allows you enable or disable retweets and device notifications from the
573             specified user. All other values are assumed to be false. Requires
574             authentication.
575              
576             );
577              
578             twitter_api_method show_friendship => (
579             description => <<'',
580             Returns detailed information about the relationship between two users.
581              
582             aliases => [qw/show_relationship/],
583             path => 'friendships/show',
584             method => 'GET',
585             params => [qw/source_id source_screen_name target_id target_screen_name/],
586             required => [qw//],
587             returns => 'Relationship',
588             );
589              
590             # infer source and target from positional args for convenience
591             around show_friendship => sub {
592             my $orig = shift;
593             my $self = shift;
594              
595             my $args = ref $_[-1] eq ref {} ? pop : {};
596             if ( @_ == 2 ) {
597             for ( qw/source target/ ) {
598             my $id = shift;
599             $$args{$id =~ /^\d+$/ ? "${_}_id" : "${_}_screen_name"} = $id;
600             }
601             }
602             return $self->$orig(@_, $args);
603             };
604              
605             # provided for backwards compatibility
606             twitter_api_method friendship_exists => (
607             description => <<'EOT',
608             This method is provided for backwards compatibility with Twitter API V1.0.
609             Twitter API V1.1 does not provide an endpoint for this call. Instead,
610             C<show_friendship> is called, the result is inspected, and an appropriate value
611             is returned which can be evaluated in a boolean context.
612              
613             Tests for the existence of friendship between two users. Will return true if
614             user_a follows user_b, otherwise will return false.
615              
616             Use of C<user_a> and C<user_b> is deprecated. It has been preserved for backwards
617             compatibility, and is used for the two-argument positional form:
618              
619             $nt->friendship_exists($user_a, $user_b);
620              
621             Instead, you should use one of the named argument forms:
622              
623             $nt->friendship_exists({ user_id_a => $id1, user_id_b => $id2 });
624             $nt->friendship_exists({ screen_name_a => $name1, screen_name_b => $name2 });
625              
626             Consider using C<show_friendship> instead.
627             EOT
628              
629             aliases => [qw/relationship_exists follows/],
630             path => 'friendships/show',
631             method => 'GET',
632             params => [qw/user_id_a user_id_b screen_name_a screen_name_b user_a user_b/],
633             required => [qw/user_a user_b/],
634             returns => 'Bool',
635             deprecated => sub { carp "$_[0] DEPRECATED: using show_friendship instead" },
636             );
637              
638             around [qw/friendship_exists relationship_exists follows/] => sub {
639             my $orig = shift;
640             my $self = shift;
641              
642             my $args = ref $_[-1] eq ref {} ? pop : {};
643             my ( $user_a, $user_b ) = @_; # default ags, if they exist
644             if ( $user_a ||= delete $$args{user_a} ) {
645             if ( $user_a =~ /^\d+$/ ) {
646             $$args{source_id} = $user_a;
647             }
648             else {
649             $$args{source_screen_name} = $user_a;
650             }
651             }
652             elsif ( $user_a = delete $$args{screen_name_a} ) {
653             $$args{source_screen_name} = $user_a;
654             }
655             elsif ( $user_a = delete $$args{user_id_a} ) {
656             $$args{source_user_id} = $user_a;
657             }
658             else {
659             croak "source user not specified";
660             }
661              
662             if ( $user_b ||= delete $$args{user_b} ) {
663             if ( $user_b =~ /^\d+$/ ) {
664             $$args{target_id} = $user_b;
665             }
666             else {
667             $$args{target_screen_name} = $user_b;
668             }
669             }
670             elsif ( $user_b = delete $$args{screen_name_b} ) {
671             $$args{target_screen_name} = $user_b;
672             }
673             elsif ( $user_b = delete $$args{user_id_b} ) {
674             $$args{target_user_id} = $user_b;
675             }
676             else {
677             croak "target user not specified";
678             }
679              
680             my $r = $self->$orig($args);
681             return !!$$r{relationship}{target}{followed_by};
682             };
683              
684             twitter_api_method account_settings => (
685             description => <<'',
686             Returns the current trend, geo and sleep time information for the
687             authenticating user.
688              
689             path => 'account/settings',
690             method => 'GET',
691             params => [],
692             required => [],
693             returns => 'HashRef',
694             );
695              
696             twitter_api_method verify_credentials => (
697             description => <<'',
698             Returns an HTTP 200 OK response code and a representation of the
699             requesting user if authentication was successful; returns a 401 status
700             code and an error message if not. Use this method to test if supplied
701             user credentials are valid.
702              
703             path => 'account/verify_credentials',
704             method => 'GET',
705             params => [qw/include_entities skip_status/],
706             booleans => [qw/include_entities skip_status/],
707             required => [qw//],
708             returns => 'ExtendedUser',
709             );
710              
711             twitter_api_method update_account_settings => (
712             description => <<'',
713             Updates the authenticating user's settings.
714              
715             path => 'account/settings',
716             method => 'POST',
717             params => [qw/trend_location_woid sleep_time_enabled start_sleep_time end_sleep_time time_zone lang/],
718             required => [],
719             booleans => [qw/sleep_time_enabled/],
720             returns => 'HashRef',
721             );
722              
723             twitter_api_method update_delivery_device => (
724             description => <<'',
725             Sets which device Twitter delivers updates to for the authenticating user.
726             Sending none as the device parameter will disable SMS updates.
727              
728             path => 'account/update_delivery_device',
729             method => 'POST',
730             params => [qw/device include_entities/],
731             required => [qw/device/],
732             booleans => [qw/include_entities/],
733             returns => 'BasicUser',
734             );
735              
736             twitter_api_method update_profile => (
737             description => <<'',
738             Sets values that users are able to set under the "Account" tab of their
739             settings page. Only the parameters specified will be updated; to only
740             update the "name" attribute, for example, only include that parameter
741             in your request.
742              
743             path => 'account/update_profile',
744             method => 'POST',
745             params => [qw/name url location description include_entities skip_status/],
746             required => [qw//],
747             booleans => [qw/include_entities skip_status/],
748             returns => 'ExtendedUser',
749             );
750              
751             twitter_api_method update_location => (
752             description => <<'',
753             This method has been deprecated in favor of the update_profile method.
754             Its URL will continue to work, but please consider migrating to the newer
755             and more comprehensive method of updating profile attributes.
756              
757             path => 'account/update_profile',
758             method => 'POST',
759             params => [qw/location/],
760             required => [qw/location/],
761             returns => 'BasicUser',
762             deprecated => sub { carp "$_[0] DEPRECATED: using update_profile instead" },
763             );
764              
765             twitter_api_method update_profile_background_image => (
766             description => <<'',
767             Updates the authenticating user's profile background image. The C<image>
768             parameter must be an arrayref with the same interpretation as the C<image>
769             parameter in the C<update_profile_image> method. See that method's
770             documentation for details. The C<use> parameter allows you to specify whether
771             to use the uploaded profile background or not.
772              
773             path => 'account/update_profile_background_image',
774             method => 'POST',
775             params => [qw/image tile include_entities skip_status use/],
776             required => [qw//],
777             booleans => [qw/include_entities skip_status use/],
778             returns => 'ExtendedUser',
779             );
780              
781             twitter_api_method update_profile_colors => (
782             description => <<'',
783             Sets one or more hex values that control the color scheme of the
784             authenticating user's profile page on twitter.com. These values are
785             also returned in the /users/show API method.
786              
787             path => 'account/update_profile_colors',
788             method => 'POST',
789             params => [qw/
790             profile_background_color
791             profile_text_color
792             profile_link_color
793             profile_sidebar_fill_color
794             profile_sidebar_border_color
795             include_entities
796             skip_status
797             /],
798             required => [qw//],
799             booleans => [qw/include_entities skip_status/],
800             returns => 'ExtendedUser',
801             );
802              
803             twitter_api_method update_profile_image => (
804             description => <<'EOT',
805             Updates the authenticating user's profile image. The C<image> parameter is an
806             arrayref with the following interpretation:
807              
808             [ $file ]
809             [ $file, $filename ]
810             [ $file, $filename, Content_Type => $mime_type ]
811             [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ]
812              
813             The first value of the array (C<$file>) is the name of a file to open. The
814             second value (C<$filename>) is the name given to Twitter for the file. If
815             C<$filename> is not provided, the basename portion of C<$file> is used. If
816             C<$mime_type> is not provided, it will be provided automatically using
817             L<LWP::MediaTypes::guess_media_type()>.
818              
819             C<$raw_image_data> can be provided, rather than opening a file, by passing
820             C<undef> as the first array value.
821             EOT
822              
823             path => 'account/update_profile_image',
824             method => 'POST',
825             params => [qw/image include_entities skip_status/],
826             required => [qw/image/],
827             booleans => [qw/include_entities skip_status/],
828             returns => 'ExtendedUser',
829             );
830              
831             twitter_api_method blocking => (
832             description => <<'',
833             Returns an array of user objects that the authenticating user is blocking.
834              
835             path => 'blocks/list',
836             aliases => [qw/blocks_list/],
837             method => 'GET',
838             params => [qw/cursor include_entities skip_status/],
839             required => [qw//],
840             returns => 'ArrayRef[BasicUser]',
841             );
842              
843             twitter_api_method blocking_ids => (
844             description => <<'',
845             Returns an array of numeric user ids the authenticating user is blocking.
846              
847             path => 'blocks/ids',
848             aliases => [qw/blocks_ids/],
849             method => 'GET',
850             params => [qw/cursor stringify_ids/],
851             required => [qw//],
852             booleans => [qw/stringify_ids/],
853             returns => 'ArrayRef[Int]',
854             );
855              
856             twitter_api_method create_block => (
857             description => <<'',
858             Blocks the user specified in the C<user_id> or C<screen_name> parameter as the
859             authenticating user. Returns the blocked user when successful. You can find
860             out more about blocking in the Twitter Support Knowledge Base.
861              
862             path => 'blocks/create',
863             method => 'POST',
864             params => [qw/user_id screen_name include_entities skip_status/],
865             booleans => [qw/include_entities skip_status/],
866             required => [qw/id/],
867             returns => 'BasicUser',
868             );
869              
870             twitter_api_method destroy_block => (
871             description => <<'',
872             Un-blocks the user specified in the C<user_id> or C<screen_name> parameter as
873             the authenticating user. Returns the un-blocked user when successful.
874              
875             path => 'blocks/destroy',
876             method => 'POST',
877             params => [qw/user_id screen_name include_entities skip_status/],
878             booleans => [qw/include_entities skip_status/],
879             required => [qw/id/],
880             returns => 'BasicUser',
881             );
882              
883             twitter_api_method lookup_users => (
884             description => <<'EOT',
885             Return up to 100 users worth of extended information, specified by either ID,
886             screen name, or combination of the two. The author's most recent status (if the
887             authenticating user has permission) will be returned inline. This method is
888             rate limited to 1000 calls per hour.
889              
890             This method will accept user IDs or screen names as either a comma delimited
891             string, or as an ARRAY ref. It will also accept arguments in the normal
892             HASHREF form or as a simple list of named arguments. I.e., any of the
893             following forms are acceptable:
894              
895             $nt->lookup_users({ user_id => '1234,6543,3333' });
896             $nt->lookup_users(user_id => '1234,6543,3333');
897             $nt->lookup_users({ user_id => [ 1234, 6543, 3333 ] });
898             $nt->lookup_users({ screen_name => 'fred,barney,wilma' });
899             $nt->lookup_users(screen_name => ['fred', 'barney', 'wilma']);
900              
901             $nt->lookup_users(
902             screen_name => ['fred', 'barney' ],
903             user_id => '4321,6789',
904             );
905             EOT
906              
907             path => 'users/lookup',
908             method => 'GET',
909             params => [qw/user_id screen_name include_entities/],
910             booleans => [qw/include_entities/],
911             required => [],
912             returns => 'ArrayRef[User]',
913             );
914              
915             twitter_api_method show_user => (
916             description => <<'',
917             Returns extended information of a given user, specified by ID or screen
918             name as per the required id parameter. This information includes
919             design settings, so third party developers can theme their widgets
920             according to a given user's preferences. You must be properly
921             authenticated to request the page of a protected user.
922              
923             path => 'users/show',
924             method => 'GET',
925             params => [qw/user_id screen_name include_entities/],
926             booleans => [qw/include_entities/],
927             required => [qw//],
928             returns => 'ExtendedUser',
929             );
930              
931             twitter_api_method users_search => (
932             description => <<'',
933             Run a search for users similar to Find People button on Twitter.com; the same
934             results returned by people search on Twitter.com will be returned by using this
935             API (about being listed in the People Search). It is only possible to retrieve
936             the first 1000 matches from this API.
937              
938             aliases => [qw/find_people search_users/],
939             path => 'users/search',
940             method => 'GET',
941             params => [qw/q per_page page count include_entities/],
942             booleans => [qw/include_entities/],
943             required => [qw/q/],
944             returns => 'ArrayRef[Users]',
945             );
946              
947             twitter_api_method contributees => (
948             path => 'users/contributees',
949             method => 'GET',
950             params => [qw/user_id screen_name include_entities skip_satus/],
951             required => [],
952             booleans => [qw/include_entities skip_satus/],
953             returns => 'ArrayRef[User]',
954             description => <<'',
955             Returns an array of users that the specified user can contribute to.
956              
957             );
958              
959             twitter_api_method contributors => (
960             path => 'users/contributors',
961             method => 'GET',
962             params => [qw/user_id screen_name include_entities skip_satus/],
963             required => [],
964             booleans => [qw/include_entities skip_satus/],
965             returns => 'ArrayRef[User]',
966             description => <<'',
967             Returns an array of users who can contribute to the specified account.
968              
969             );
970              
971             twitter_api_method suggestion_categories => (
972             path => 'users/suggestions',
973             method => 'GET',
974             params => [],
975             required => [],
976             returns => 'ArrayRef',
977             description => <<''
978             Returns the list of suggested user categories. The category slug can be used in
979             the C<user_suggestions> API method get the users in that category . Does not
980             require authentication.
981              
982             );
983              
984             twitter_api_method user_suggestions_for => (
985             aliases => [qw/follow_suggestions/],
986             path => 'users/suggestions/:category',
987             method => 'GET',
988             params => [qw/category lang/],
989             required => [qw/category/],
990             returns => 'ArrayRef',
991             description => <<''
992             Access the users in a given category of the Twitter suggested user list.
993              
994             );
995              
996             twitter_api_method user_suggestions => (
997             aliases => [qw/follow_suggestions/],
998             path => 'users/suggestions/:category/members',
999             method => 'GET',
1000             params => [qw/category lang/],
1001             required => [qw/category/],
1002             returns => 'ArrayRef',
1003             description => <<''
1004             Access the users in a given category of the Twitter suggested user list and
1005             return their most recent status if they are not a protected user. Currently
1006             supported values for optional parameter C<lang> are C<en>, C<fr>, C<de>, C<es>,
1007             C<it>. Does not require authentication.
1008              
1009             );
1010              
1011             twitter_api_method favorites => (
1012             description => <<'',
1013             Returns the 20 most recent favorite statuses for the authenticating
1014             user or user specified by the ID parameter.
1015              
1016             path => 'favorites/list',
1017             method => 'GET',
1018             params => [qw/user_id screen_name count since_id max_id include_entities/],
1019             booleans => [qw/include_entities/],
1020             required => [qw//],
1021             returns => 'ArrayRef[Status]',
1022             );
1023              
1024             twitter_api_method destroy_favorite => (
1025             description => <<'',
1026             Un-favorites the status specified in the ID parameter as the
1027             authenticating user. Returns the un-favorited status.
1028              
1029             path => 'favorites/destroy',
1030             method => 'POST',
1031             params => [qw/id include_entities/],
1032             booleans => [qw/include_entities/],
1033             required => [qw/id/],
1034             returns => 'Status',
1035             );
1036              
1037             twitter_api_method create_favorite => (
1038             description => <<'',
1039             Favorites the status specified in the ID parameter as the
1040             authenticating user. Returns the favorite status when successful.
1041              
1042             path => 'favorites/create',
1043             method => 'POST',
1044             params => [qw/id include_entities/],
1045             booleans => [qw/include_entities/],
1046             required => [qw/id/],
1047             returns => 'Status',
1048             );
1049              
1050             ### Lists ###
1051              
1052             twitter_api_method get_lists => (
1053             description => <<'EOT',
1054             Returns all lists the authenticating or specified user subscribes to, including
1055             their own. The user is specified using the user_id or screen_name parameters.
1056             If no user is given, the authenticating user is used.
1057              
1058             A maximum of 100 results will be returned by this call. Subscribed lists are
1059             returned first, followed by owned lists. This means that if a user subscribes
1060             to 90 lists and owns 20 lists, this method returns 90 subscriptions and 10
1061             owned lists. The reverse method returns owned lists first, so with C<reverse =>
1062             1>, 20 owned lists and 80 subscriptions would be returned. If your goal is to
1063             obtain every list a user owns or subscribes to, use <list_ownerships> and/or
1064             C<list_subscriptions> instead.
1065             EOT
1066              
1067             path => 'lists/list',
1068             aliases => [qw/list_lists all_subscriptions/],
1069             method => 'GET',
1070             params => [qw/user_id screen_name reverse/],
1071             required => [],
1072             returns => 'Hashref',
1073             );
1074              
1075             twitter_api_method list_statuses => (
1076             description => <<'',
1077             Returns tweet timeline for members of the specified list. Historically,
1078             retweets were not available in list timeline responses but you can now use the
1079             include_rts=true parameter to additionally receive retweet objects.
1080              
1081             path => 'lists/statuses',
1082             method => 'GET',
1083             params => [qw/
1084             list_id slug owner_screen_name owner_id since_id max_id count
1085             include_entities include_rts
1086             /],
1087             required => [],
1088             booleans => [qw/include_entities include_rts/],
1089             returns => 'ArrayRef[Status]',
1090             );
1091              
1092             twitter_api_method delete_list_member => (
1093             description => <<'',
1094             Removes the specified member from the list. The authenticated user must be the
1095             list's owner to remove members from the list.
1096              
1097             path => 'lists/members/destroy',
1098             method => 'POST',
1099             params => [qw/list_id slug user_id screen_name owner_screen_name owner_id/],
1100             required => [],
1101             returns => 'User',
1102             aliases => [qw/remove_list_member/],
1103             );
1104              
1105             twitter_api_method list_memberships => (
1106             description => <<'',
1107             Returns the lists the specified user has been added to. If user_id or
1108             screen_name are not provided the memberships for the authenticating user are
1109             returned.
1110              
1111             path => 'lists/memberships',
1112             method => 'GET',
1113             params => [qw/user_id screen_name cursor filter_to_owned_lists/],
1114             required => [],
1115             booleans => [qw/filter_to_owned_lists/],
1116             returns => 'Hashref',
1117             );
1118              
1119             twitter_api_method list_subscribers => (
1120             path => 'lists/subscribers',
1121             method => 'GET',
1122             params => [qw/list_id slug owner_screen_name owner_id cursor include_entities skip_status/],
1123             required => [],
1124             booleans => [qw/include_entities skip_status/],
1125             returns => 'Hashref',
1126             description => <<'',
1127             Returns the subscribers of the specified list. Private list subscribers will
1128             only be shown if the authenticated user owns the specified list.
1129              
1130             );
1131              
1132             twitter_api_method subscribe_list => (
1133             description => <<'',
1134             Subscribes the authenticated user to the specified list.
1135              
1136             path => 'lists/subscribers/create',
1137             method => 'POST',
1138             params => [qw/owner_screen_name owner_id list_id slug/],
1139             required => [],
1140             returns => 'List',
1141             );
1142              
1143             twitter_api_method show_list_subscriber => (
1144             description => <<'',
1145             Returns the user if they are a subscriber.
1146              
1147             path => 'lists/subscribers/show',
1148             aliases => [qw/is_list_subscriber is_subscriber_lists/],
1149             method => 'GET',
1150             params => [qw/
1151             owner_screen_name owner_id list_id slug user_id screen_name
1152             include_entities skip_status
1153             /],
1154             required => [],
1155             booleans => [qw/include_entities skip_status/],
1156             returns => 'User',
1157             );
1158              
1159             around [qw/is_list_subscriber is_subscriber_lists/] => sub {
1160             my $orig = shift;
1161             my $self = shift;
1162              
1163             $self->_user_or_undef($orig, 'subscriber', @_);
1164             };
1165              
1166             twitter_api_method unsubscribe_list => (
1167             description => <<'',
1168             Unsubscribes the authenticated user from the specified list.
1169              
1170             path => 'lists/subscribers/destroy',
1171             method => 'POST',
1172             params => [qw/list_id slug owner_screen_name owner_id/],
1173             required => [],
1174             returns => 'List',
1175             );
1176              
1177             twitter_api_method members_create_all => (
1178             description => <<'',
1179             Adds multiple members to a list, by specifying a reference to an array or a
1180             comma-separated list of member ids or screen names. The authenticated user must
1181             own the list to be able to add members to it. Note that lists can't have more
1182             than 500 members, and you are limited to adding up to 100 members to a list at
1183             a time with this method.
1184              
1185             path => 'lists/members/create_all',
1186             method => 'POST',
1187             params => [qw/list_id slug owner_screen_name owner_id/],
1188             required => [],
1189             returns => 'List',
1190             aliases => [qw/add_list_members/],
1191             );
1192              
1193             twitter_api_method show_list_member => (
1194             description => <<'',
1195             Check if the specified user is a member of the specified list. Returns the user or undef.
1196              
1197             path => 'lists/members/show',
1198             aliases => [qw/is_list_member/],
1199             method => 'GET',
1200             params => [qw/
1201             owner_screen_name owner_id list_id slug user_id screen_name
1202             include_entities skip_status
1203             /],
1204             required => [],
1205             booleans => [qw/include_entities skip_status/],
1206             returns => 'Maybe[User]',
1207             );
1208              
1209             around is_list_member => sub {
1210             my $orig = shift;
1211             my $self = shift;
1212              
1213             $self->_user_or_undef($orig, 'member', @_);
1214             };
1215              
1216             twitter_api_method list_members => (
1217             description => <<'',
1218             Returns the members of the specified list. Private list members will only be
1219             shown if the authenticated user owns the specified list.
1220              
1221             path => 'lists/members',
1222             method => 'GET',
1223             params => [qw/
1224             list_id slug owner_screen_name owner_id cursor
1225             include_entities skip_status
1226             /],
1227             required => [],
1228             booleans => [qw/include_entities skip_status/],
1229             returns => 'Hashref',
1230             );
1231              
1232             twitter_api_method add_list_member => (
1233             description => <<'',
1234             Add a member to a list. The authenticated user must own the list to be able to
1235             add members to it. Note that lists can't have more than 500 members.
1236              
1237             path => 'lists/members/create',
1238             method => 'POST',
1239             params => [qw/list_id slug user_id screen_name owner_screen_name owner_id/],
1240             required => [],
1241             returns => 'User',
1242             );
1243              
1244             twitter_api_method delete_list => (
1245             description => <<'',
1246             Deletes the specified list. The authenticated user must own the list to be able
1247             to destroy it.
1248              
1249             path => 'lists/destroy',
1250             method => 'POST',
1251             params => [qw/owner_screen_name owner_id list_id slug/],
1252             required => [],
1253             returns => 'List',
1254             );
1255              
1256             twitter_api_method update_list => (
1257             description => <<'',
1258             Updates the specified list. The authenticated user must own the list to be able
1259             to update it.
1260              
1261             path => 'lists/update',
1262             method => 'POST',
1263             params => [qw/list_id slug name mode description owner_screen_name owner_id/],
1264             required => [],
1265             returns => 'List',
1266             );
1267              
1268             twitter_api_method create_list => (
1269             description => <<'',
1270             Creates a new list for the authenticated user. Note that you can't create more
1271             than 20 lists per account.
1272              
1273             path => 'lists/create',
1274             method => 'POST',
1275             params => [qw/list_id slug name mode description owner_screen_name owner_id/],
1276             required => [qw/name/],
1277             returns => 'List',
1278             );
1279              
1280             twitter_api_method get_list => (
1281             description => <<'',
1282             Returns the specified list. Private lists will only be shown if the
1283             authenticated user owns the specified list.
1284              
1285             aliases => [qw/show_list/],
1286             path => 'lists/show',
1287             method => 'GET',
1288             params => [qw/list_id slug owner_screen_name owner_id/],
1289             required => [],
1290             returns => 'List',
1291             );
1292              
1293             twitter_api_method list_subscriptions => (
1294             description => <<'',
1295             Obtain a collection of the lists the specified user is subscribed to, 20 lists
1296             per page by default. Does not include the user's own lists.
1297              
1298             path => 'lists/subscriptions',
1299             method => 'GET',
1300             params => [qw/user_id screen_name count cursor/],
1301             required => [],
1302             returns => 'ArrayRef[List]',
1303             aliases => [qw/subscriptions/],
1304             );
1305              
1306             twitter_api_method members_destroy_all => (
1307             description => <<'EOT',
1308             Removes multiple members from a list, by specifying a reference to an array of
1309             member ids or screen names, or a string of comma separated user ids or screen
1310             names. The authenticated user must own the list to be able to remove members
1311             from it. Note that lists can't have more than 500 members, and you are limited
1312             to removing up to 100 members to a list at a time with this method.
1313              
1314             Please note that there can be issues with lists that rapidly remove and add
1315             memberships. Take care when using these methods such that you are not too
1316             rapidly switching between removals and adds on the same list.
1317              
1318             EOT
1319              
1320             path => 'lists/members/destroy_all',
1321             aliases => [qw/remove_list_members/],
1322             method => 'POST',
1323             params => [qw/list_id slug user_id screen_name owner_screen_name owner_id/],
1324             required => [],
1325             returns => 'List',
1326             );
1327              
1328             twitter_api_method list_ownerships => (
1329             description => <<'',
1330             Obtain a collection of the lists owned by the specified Twitter user. Private
1331             lists will only be shown if the authenticated user is also the owner of the lists.
1332              
1333             path => 'lists/ownerships',
1334             method => 'GET',
1335             params => [qw/user_id screen_name count cursor/],
1336             required => [],
1337             returns => 'ArrayRef[List]',
1338             aliases => [],
1339             );
1340              
1341             ## saved searches ##
1342              
1343             twitter_api_method saved_searches => (
1344             description => <<'',
1345             Returns the authenticated user's saved search queries.
1346              
1347             path => 'saved_searches/list',
1348             method => 'GET',
1349             params => [],
1350             required => [],
1351             returns => 'ArrayRef[SavedSearch]',
1352             );
1353              
1354             twitter_api_method show_saved_search => (
1355             description => <<'',
1356             Retrieve the data for a saved search, by C<id>, owned by the authenticating user.
1357              
1358             path => 'saved_searches/show/:id',
1359             method => 'GET',
1360             params => [qw/id/],
1361             required => [qw/id/],
1362             returns => 'SavedSearch',
1363             );
1364              
1365             twitter_api_method create_saved_search => (
1366             description => <<'',
1367             Creates a saved search for the authenticated user.
1368              
1369             path => 'saved_searches/create',
1370             method => 'POST',
1371             params => [qw/query/],
1372             required => [qw/query/],
1373             returns => 'SavedSearch',
1374             );
1375              
1376             twitter_api_method destroy_saved_search => (
1377             description => <<'',
1378             Destroys a saved search. The search, specified by C<id>, must be owned
1379             by the authenticating user.
1380              
1381             aliases => [qw/delete_saved_search/],
1382             path => 'saved_searches/destroy/:id',
1383             method => 'POST',
1384             params => [qw/id/],
1385             required => [qw/id/],
1386             returns => 'SavedSearch',
1387             );
1388              
1389             ## geo ##
1390              
1391             twitter_api_method geo_id => (
1392             description => <<'',
1393             Returns details of a place returned from the C<reverse_geocode> method.
1394              
1395             path => 'geo/id/:id',
1396             method => 'GET',
1397             params => [qw/id/],
1398             required => [qw/id/],
1399             returns => 'HashRef',
1400             );
1401              
1402             twitter_api_method reverse_geocode => (
1403             description => <<EOT,
1404             Search for places (cities and neighborhoods) that can be attached to a
1405             statuses/update. Given a latitude and a longitude, return a list of all the
1406             valid places that can be used as a place_id when updating a status.
1407             Conceptually, a query can be made from the user's location, retrieve a list of
1408             places, have the user validate the location he or she is at, and then send the
1409             ID of this location up with a call to statuses/update.
1410              
1411             There are multiple granularities of places that can be returned --
1412             "neighborhoods", "cities", etc. At this time, only United States data is
1413             available through this method.
1414              
1415             \=over 4
1416              
1417             \=item lat
1418              
1419             Required. The latitude to query about. Valid ranges are -90.0 to +90.0 (North
1420             is positive) inclusive.
1421              
1422             \=item long
1423              
1424             Required. The longitude to query about. Valid ranges are -180.0 to +180.0
1425             (East is positive) inclusive.
1426              
1427             \=item accuracy
1428              
1429             Optional. A hint on the "region" in which to search. If a number, then this is
1430             a radius in meters, but it can also take a string that is suffixed with ft to
1431             specify feet. If this is not passed in, then it is assumed to be 0m. If
1432             coming from a device, in practice, this value is whatever accuracy the device
1433             has measuring its location (whether it be coming from a GPS, WiFi
1434             triangulation, etc.).
1435              
1436             \=item granularity
1437              
1438             Optional. The minimal granularity of data to return. If this is not passed
1439             in, then C<neighborhood> is assumed. C<city> can also be passed.
1440              
1441             \=item max_results
1442              
1443             Optional. A hint as to the number of results to return. This does not
1444             guarantee that the number of results returned will equal max_results, but
1445             instead informs how many "nearby" results to return. Ideally, only pass in the
1446             number of places you intend to display to the user here.
1447              
1448             \=back
1449              
1450             EOT
1451              
1452             path => 'geo/reverse_geocode',
1453             method => 'GET',
1454             params => [qw/lat long accuracy granularity max_results callback/],
1455             required => [qw/lat long/],
1456             returns => 'HashRef',
1457             );
1458              
1459             twitter_api_method geo_search => (
1460             description => <<'EOT',
1461             Search for places that can be attached to a statuses/update. Given a latitude
1462             and a longitude pair, an IP address, or a name, this request will return a list
1463             of all the valid places that can be used as the place_id when updating a
1464             status.
1465              
1466             Conceptually, a query can be made from the user's location, retrieve a list of
1467             places, have the user validate the location he or she is at, and then send the
1468             ID of this location with a call to statuses/update.
1469              
1470             This is the recommended method to use find places that can be attached to
1471             statuses/update. Unlike geo/reverse_geocode which provides raw data access,
1472             this endpoint can potentially re-order places with regards to the user who
1473             is authenticated. This approach is also preferred for interactive place
1474             matching with the user.
1475             EOT
1476              
1477             path => 'geo/search',
1478             method => 'GET',
1479             params => [qw/
1480             lat long query ip granularity accuracy max_results
1481             contained_within attribute:street_address callback
1482             /],
1483             required => [],
1484             returns => 'HashRef',
1485             );
1486              
1487             twitter_api_method similar_places => (
1488             description => <<'EOT',
1489             Locates places near the given coordinates which are similar in name.
1490              
1491             Conceptually you would use this method to get a list of known places to choose
1492             from first. Then, if the desired place doesn't exist, make a request to
1493             C<add_place> to create a new one.
1494              
1495             The token contained in the response is the token needed to be able to create a
1496             new place.
1497             EOT
1498              
1499             path => 'geo/similar_places',
1500             method => 'GET',
1501             params => [qw/lat long name contained_within attribute:street_address callback/],
1502             required => [qw/lat long name/],
1503             returns => 'HashRef',
1504             );
1505              
1506             twitter_api_method add_place => (
1507             description => <<'EOT',
1508             Creates a new place object at the given latitude and longitude.
1509              
1510             Before creating a place you need to query C<similar_places> with the latitude,
1511             longitude and name of the place you wish to create. The query will return an
1512             array of places which are similar to the one you wish to create, and a token.
1513             If the place you wish to create isn't in the returned array you can use the
1514             token with this method to create a new one.
1515             EOT
1516              
1517             path => 'geo/place',
1518             method => 'POST',
1519             params => [qw/name contained_within token lat long attribute:street_address callback/],
1520             required => [qw/name contained_within token lat long/],
1521             returns => 'Place',
1522             );
1523              
1524             ## trends ##
1525              
1526             twitter_api_method trends_place => (
1527             description => <<'',
1528             Returns the top 10 trending topics for a specific WOEID. The response is an
1529             array of "trend" objects that encode the name of the trending topic, the query
1530             parameter that can be used to search for the topic on Search, and the direct
1531             URL that can be issued against Search. This information is cached for five
1532             minutes, and therefore users are discouraged from querying these endpoints
1533             faster than once every five minutes. Global trends information is also
1534             available from this API by using a WOEID of 1.
1535              
1536             path => 'trends/place',
1537             aliases => [qw/trends_location/],
1538             method => 'GET',
1539             params => [qw/id exclude/],
1540             required => [qw/id/],
1541             returns => 'ArrayRef[Trend]',
1542             );
1543              
1544             # accept woeid parameter for backwards compatibility with old trends/location endpoint
1545             around trends_location => sub {
1546             my $orig = shift;
1547             my $self = shift;
1548              
1549             carp "trends_location DEPRECATED: using trends_place({ id => ... }) instead";
1550              
1551             my $args = ref $_[-1] eq ref {} ? pop : {};
1552             $$args{id} = delete $$args{woeid} || shift;
1553              
1554             return $self->$orig($args);
1555             };
1556              
1557             twitter_api_method trends_available => (
1558             description => <<EOT,
1559             Returns the locations with trending topic information. The response is an
1560             array of "locations" that encode the location's WOEID (a Yahoo! Where On Earth
1561             ID L<http://developer.yahoo.com/geo/geoplanet/>) and some other human-readable
1562             information such as a the location's canonical name and country.
1563              
1564             For backwards compatibility, this method accepts optional C<lat> and C<long>
1565             parameters. You should call C<trends_closest> directly, instead.
1566              
1567             Use the WOEID returned in the location object to query trends for a specific
1568             location.
1569             EOT
1570              
1571             path => 'trends/available',
1572             method => 'GET',
1573             params => [],
1574             required => [],
1575             returns => 'ArrayRef[Location]',
1576             );
1577              
1578             around trends_available => sub {
1579             my $orig = shift;
1580             my $self = shift;
1581              
1582             my $args = ref $_[-1] eq ref {} ? pop : {};
1583              
1584             my $method = exists $$args{lat} || exists $$args{long} ? 'trends_closest' : $orig;
1585              
1586             return $self->$method(@_, $args);
1587             };
1588              
1589             twitter_api_method trends_closest => (
1590             description => <<EOT,
1591             Returns the locations with trending topic information. The response is an array
1592             of "locations" that encode the location's WOEID (a Yahoo! Where On Earth ID
1593             L<http://developer.yahoo.com/geo/geoplanet/>) and some other human-readable
1594             information such as a the location's canonical name and country. The results
1595             are sorted by distance from that location, nearest to farthest.
1596              
1597             Use the WOEID returned in the location object to query trends for a specific
1598             location.
1599             EOT
1600              
1601             path => 'trends/closest',
1602             method => 'GET',
1603             params => [qw/lat long/],
1604             required => [],
1605             returns => 'ArrayRef[Location]',
1606             );
1607              
1608             ## spam reporting ##
1609              
1610             twitter_api_method report_spam => (
1611             description => <<'',
1612             The user specified in the id is blocked by the authenticated user and reported as a spammer.
1613              
1614             path => 'users/report_spam',
1615             method => 'POST',
1616             params => [qw/user_id screen_name/],
1617             required => [qw/id/],
1618             returns => 'User',
1619             );
1620              
1621             twitter_api_method get_languages => (
1622             description => <<'',
1623             Returns the list of languages supported by Twitter along with their ISO 639-1
1624             code. The ISO 639-1 code is the two letter value to use if you include lang
1625             with any of your requests.
1626              
1627             path => 'help/languages',
1628             method => 'GET',
1629             params => [],
1630             required => [],
1631             returns => 'ArrayRef[Lanugage]',
1632             );
1633              
1634             ## Help ##
1635              
1636             twitter_api_method get_configuration => (
1637             description => <<'EOT',
1638             Returns the current configuration used by Twitter including twitter.com slugs
1639             which are not usernames, maximum photo resolutions, and t.co URL lengths.
1640              
1641             It is recommended applications request this endpoint when they are loaded, but
1642             no more than once a day.
1643             EOT
1644              
1645             path => 'help/configuration',
1646             method => 'GET',
1647             params => [],
1648             required => [],
1649             returns => 'HashRef',
1650             );
1651              
1652             twitter_api_method get_privacy_policy => (
1653             description => <<'',
1654             Returns Twitter's privacy policy.
1655              
1656             path => 'help/privacy',
1657             method => 'GET',
1658             params => [],
1659             required => [],
1660             returns => 'HashRef',
1661             );
1662              
1663             twitter_api_method get_tos => (
1664             description => <<'',
1665             Returns the Twitter Terms of Service. These are not the same as the Developer
1666             Rules of the Road.
1667              
1668             path => 'help/tos',
1669             method => 'GET',
1670             params => [],
1671             required => [],
1672             returns => 'HashRef',
1673             );
1674              
1675             twitter_api_method rate_limit_status => (
1676             description => <<'EOT',
1677             Returns the remaining number of API requests available to the
1678             authenticated user before the API limit is reached for the current hour.
1679              
1680             Use C<< ->rate_limit_status({ authenticate => 0 }) >> to force an
1681             unauthenticated call, which will return the status for the IP address rather
1682             than the authenticated user. (Note: for a web application, this is the server's
1683             IP address.)
1684             EOT
1685              
1686             path => 'application/rate_limit_status',
1687             method => 'GET',
1688             params => [qw/resources/],
1689             required => [qw//],
1690             returns => 'RateLimitStatus',
1691             );
1692              
1693             # translate resources arrayref to a comma separated string
1694             around rate_limit_status => sub {
1695             my $orig = shift;
1696             my $self = shift;
1697              
1698             my $args = ref $_[-1] eq ref {} ? pop : {};
1699             croak "too many arguments" if @_;
1700              
1701             if ( exists $args->{resources} && ref $args->{resources} eq ref [] ) {
1702             $args->{resources} = join ',' => @{$args->{resources}};
1703             }
1704              
1705             return $self->$orig($args);
1706             };
1707              
1708             twitter_api_method test => (
1709             description => <<'',
1710             Returns the string "ok" status code.
1711              
1712             path => 'account/verify_credentials',
1713             method => 'GET',
1714             params => [qw//],
1715             required => [qw//],
1716             returns => 'Hash',
1717             deprecated => sub { carp "$_[0] DEPRECATED: using verify_credentials instead" },
1718             );
1719              
1720             ## not included in API v1.1 ##
1721              
1722             twitter_api_method retweeted_by_me => (
1723             description => <<'',
1724             Returns the 20 most recent retweets posted by the authenticating user.
1725              
1726             path => 'statuses/retweeted_by_me',
1727             method => 'GET',
1728             params => [qw/since_id max_id count page trim_user include_entities/],
1729             booleans => [qw/trim_user include_entities/],
1730             required => [],
1731             returns => 'ArrayRef[Status]',
1732             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1733             );
1734              
1735             twitter_api_method retweeted_to_me => (
1736             description => <<'',
1737             Returns the 20 most recent retweets posted by the authenticating user's friends.
1738              
1739             path => 'statuses/retweeted_to_me',
1740             method => 'GET',
1741             params => [qw/since_id max_id count page/],
1742             required => [],
1743             returns => 'ArrayRef[Status]',
1744             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1745             );
1746              
1747             twitter_api_method retweets_of_me => (
1748             description => <<'',
1749             Returns the 20 most recent tweets of the authenticated user that have been
1750             retweeted by others.
1751              
1752             aliases => [qw/retweeted_of_me/],
1753             path => 'statuses/retweets_of_me',
1754             method => 'GET',
1755             params => [qw/since_id max_id count trim_user include_entities include_user_entities/],
1756             booleans => [qw/trim_user include_entities/],
1757             required => [],
1758             returns => 'ArrayRef[Status]',
1759             );
1760              
1761             twitter_api_method no_retweet_ids => (
1762             description => <<'',
1763             Returns an ARRAY ref of user IDs for which the authenticating user does not
1764             want to receive retweets.
1765              
1766             aliases => [qw/no_retweets_ids/],
1767             path => 'friendships/no_retweets/ids',
1768             method => 'GET',
1769             params => [],
1770             required => [],
1771             returns => 'ArrayRef[UserIDs]',
1772             );
1773              
1774             twitter_api_method end_session => (
1775             description => <<'',
1776             Ends the session of the authenticating user, returning a null cookie.
1777             Use this method to sign users out of client-facing applications like
1778             widgets.
1779              
1780             path => 'account/end_session',
1781             method => 'POST',
1782             params => [qw//],
1783             required => [qw//],
1784             returns => 'Error', # HTTP Status: 200, error content. Silly!
1785             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1786             );
1787              
1788             twitter_api_method enable_notifications => (
1789             description => <<'',
1790             Enables notifications for updates from the specified user to the
1791             authenticating user. Returns the specified user when successful.
1792              
1793             path => 'notifications/follow/:id',
1794             method => 'POST',
1795             params => [qw/id screen_name include_entities/],
1796             booleans => [qw/include_entities/],
1797             required => [qw/id/],
1798             returns => 'BasicUser',
1799             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1800             );
1801              
1802             around enable_notifications => sub {
1803             my $orig = shift;
1804             my $self = shift;
1805              
1806             return $self->_enable_disable_notifications(1, @_);
1807             };
1808              
1809             sub _enable_disable_notifications {
1810 4     4   9 my $self = shift;
1811 4         2 my $enable = shift;
1812              
1813 4         13 carp "enable_notifications/disable_notifications DEPRECATED: using update_friendship instead";
1814              
1815 4 100       1149 my $args = ref $_[-1] eq ref {} ? pop : {};
1816 4         9 $$args{device} = $enable;
1817 4         13 return $self->update_friendship(@_, $args);
1818             };
1819              
1820             twitter_api_method disable_notifications => (
1821             description => <<'',
1822             Disables notifications for updates from the specified user to the
1823             authenticating user. Returns the specified user when successful.
1824              
1825             path => 'notifications/leave/:id',
1826             method => 'POST',
1827             params => [qw/id screen_name include_entities/],
1828             booleans => [qw/include_entities/],
1829             required => [qw/id/],
1830             returns => 'BasicUser',
1831             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1832             );
1833              
1834             around disable_notifications => sub {
1835             my $orig = shift;
1836             my $self = shift;
1837              
1838             return $self->_enable_disable_notifications(0, @_);
1839             };
1840              
1841             twitter_api_method block_exists => (
1842             description => <<'',
1843             Returns if the authenticating user is blocking a target user. Will return the blocked user's
1844             object if a block exists, and error with HTTP 404 response code otherwise.
1845              
1846             path => 'blocks/exists/:id',
1847             method => 'GET',
1848             params => [qw/id user_id screen_name include_entities/],
1849             booleans => [qw/include_entities/],
1850             required => [qw/id/],
1851             returns => 'BasicUser',
1852             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1853             );
1854              
1855             twitter_api_method trends_current => (
1856             description => <<'',
1857             Returns the current top ten trending topics on Twitter. The response includes
1858             the time of the request, the name of each trending topic, and query used on
1859             Twitter Search results page for that topic.
1860              
1861             path => 'trends/current',
1862             method => 'GET',
1863             params => [qw/exclude/],
1864             required => [qw//],
1865             returns => 'HashRef',
1866             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1867             );
1868              
1869             around trends_current => sub {
1870             my $orig = shift;
1871             my $self = shift;
1872              
1873             carp "trends_current DEPRECATED: using trends_place({ id => 1 }) instead";
1874              
1875             my $args = ref $_[-1] eq ref {} ? pop : {};
1876             $$args{id} = 1;
1877              
1878             return $self->trends_place($args);
1879             };
1880              
1881             twitter_api_method trends_daily => (
1882             description => <<'',
1883             Returns the top 20 trending topics for each hour in a given day.
1884              
1885             path => 'trends/daily',
1886             method => 'GET',
1887             params => [qw/date exclude/],
1888             required => [qw//],
1889             returns => 'HashRef',
1890             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1891             );
1892              
1893             twitter_api_method trends_weekly => (
1894             description => <<'',
1895             Returns the top 30 trending topics for each day in a given week.
1896              
1897             path => 'trends/weekly',
1898             method => 'GET',
1899             params => [qw/date exclude/],
1900             required => [qw//],
1901             returns => 'HashRef',
1902             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1903             );
1904              
1905             twitter_api_method retweeted_by => (
1906             description => <<'',
1907             Returns up to 100 users who retweeted the status identified by C<id>.
1908              
1909             path => 'statuses/:id/retweeted_by',
1910             method => 'GET',
1911             params => [qw/id count page trim_user include_entities/],
1912             booleans => [qw/include_entities trim_user/],
1913             required => [qw/id/],
1914             returns => 'ArrayRef[User]',
1915             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1916             );
1917              
1918             twitter_api_method retweeted_by_ids => (
1919             description => <<'',
1920             Returns the IDs of up to 100 users who retweeted the status identified by C<id>.
1921              
1922             path => 'statuses/:id/retweeted_by/ids',
1923             method => 'GET',
1924             params => [qw/id count page trim_user include_entities/],
1925             booleans => [qw/include_entities trim_user/],
1926             required => [qw/id/],
1927             returns => 'ArrayRef[User]',
1928             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1929             );
1930              
1931             # new in 3.17001 2010-10-19
1932              
1933             twitter_api_method account_totals => (
1934             description => <<'',
1935             Returns the current count of friends, followers, updates (statuses)
1936             and favorites of the authenticating user.
1937              
1938             path => 'account/totals',
1939             method => 'GET',
1940             params => [],
1941             required => [],
1942             returns => 'HashRef',
1943             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1944             );
1945              
1946             twitter_api_method retweeted_to_user => (
1947             description => <<'',
1948             Returns the 20 most recent retweets posted by users the specified user
1949             follows. The user is specified using the user_id or screen_name
1950             parameters. This method is identical to C<retweeted_to_me>
1951             except you can choose the user to view.
1952             Does not require authentication, unless the user is protected.
1953              
1954             path => 'statuses/retweeted_to_user',
1955             method => 'GET',
1956             params => [qw/id user_id screen_name/],
1957             required => [qw/id/],
1958             returns => 'ArrayRef',
1959             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1960             );
1961              
1962             twitter_api_method retweeted_by_user => (
1963             description => <<'',
1964             Returns the 20 most recent retweets posted by the specified user. The user is
1965             specified using the user_id or screen_name parameters. This method is identical
1966             to C<retweeted_by_me> except you can choose the user to view. Does not require
1967             authentication, unless the user is protected.
1968              
1969             path => 'statuses/retweeted_by_user',
1970             method => 'GET',
1971             params => [qw/id user_id screen_name/],
1972             required => [qw/id/],
1973             returns => 'ArrayRef',
1974             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1975             );
1976              
1977             twitter_api_method related_results => (
1978             description => <<'',
1979             If available, returns an array of replies and mentions related to the specified
1980             status. There is no guarantee there will be any replies or mentions in the
1981             response. This method is only available to users who have access to
1982             #newtwitter. Requires authentication.
1983              
1984             path => 'related_results/show/:id',
1985             method => 'GET',
1986             params => [qw/id/],
1987             required => [qw/id/],
1988             returns => 'ArrayRef[Status]',
1989             deprecated => sub { croak "$_[0] not available in Twitter API V1.1" },
1990             );
1991              
1992             twitter_api_method remove_profile_banner => (
1993             description => <<'',
1994             Removes the uploaded profile banner for the authenticating user.
1995              
1996             path => 'account/remove_profile_banner',
1997             method => 'POST',
1998             params => [qw//],
1999             required => [qw//],
2000             returns => 'Nothing',
2001             );
2002              
2003             twitter_api_method update_profile_banner => (
2004             description => <<'EOT',
2005             Uploads a profile banner on behalf of the authenticating user. The C<image>
2006             parameter is an arrayref with the following interpretation:
2007              
2008             [ $file ]
2009             [ $file, $filename ]
2010             [ $file, $filename, Content_Type => $mime_type ]
2011             [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ]
2012              
2013             The first value of the array (C<$file>) is the name of a file to open. The
2014             second value (C<$filename>) is the name given to Twitter for the file. If
2015             C<$filename> is not provided, the basename portion of C<$file> is used. If
2016             C<$mime_type> is not provided, it will be provided automatically using
2017             L<LWP::MediaTypes::guess_media_type()>.
2018              
2019             C<$raw_image_data> can be provided, rather than opening a file, by passing
2020             C<undef> as the first array value.
2021             EOT
2022              
2023             path => 'account/update_profile_banner',
2024             method => 'POST',
2025             params => [qw/banner width height offset_left offset_top/],
2026             required => [qw/banner/],
2027             returns => 'Nothing',
2028             );
2029              
2030             twitter_api_method profile_banner => (
2031             description => <<'',
2032             Returns a hash reference mapping available size variations to URLs that can be
2033             used to retrieve each variation of the banner.
2034              
2035             path => 'users/profile_banner',
2036             method => 'GET',
2037             params => [qw/user_id screen_name/],
2038             required => [qw//],
2039             returns => 'HashRef',
2040             );
2041              
2042             twitter_api_method mutes => (
2043             description => <<'',
2044             Returns an array of numeric user ids the authenticating user has muted.
2045              
2046             path => 'mutes/users/ids',
2047             aliases => [qw/muting_ids muted_ids/],
2048             method => 'GET',
2049             params => [qw/cursor/],
2050             required => [qw//],
2051             booleans => [qw//],
2052             returns => 'ArrayRef[Int]',
2053             );
2054              
2055             twitter_api_method muting => (
2056             description => <<'',
2057             Returns an array of user objects that the authenticating user is muting.
2058              
2059             path => 'mutes/users/list',
2060             aliases => [qw/mutes_list/],
2061             method => 'GET',
2062             params => [qw/cursor include_entities skip_status/],
2063             required => [qw//],
2064             returns => 'ArrayRef[BasicUser]',
2065             );
2066              
2067             twitter_api_method create_mute => (
2068             description => <<'',
2069             Mutes the user specified in the C<user_id> or C<screen_name> parameter as the
2070             authenticating user. Returns the muted user when successful. You can find
2071             out more about muting in the Twitter Support Knowledge Base.
2072              
2073             path => 'mutes/users/create',
2074             method => 'POST',
2075             params => [qw/user_id screen_name/],
2076             booleans => [qw//],
2077             required => [qw/id/],
2078             returns => 'BasicUser',
2079             );
2080              
2081             twitter_api_method destroy_mute => (
2082             description => <<'',
2083             Un-mutes the user specified in the C<user_id> or C<screen_name> parameter as
2084             the authenticating user. Returns the un-muted user when successful.
2085              
2086             path => 'mutes/users/destroy',
2087             method => 'POST',
2088             params => [qw/user_id screen_name/],
2089             booleans => [qw//],
2090             required => [qw/id/],
2091             returns => 'BasicUser',
2092             );
2093              
2094             twitter_api_method lookup_statuses => (
2095             description => <<'',
2096             Returns a hash reference of tweets from an arbitrary set of ids.
2097              
2098             path => 'statuses/lookup',
2099             method => 'GET',
2100             params => [qw/id include_entities trim_user map/],
2101             required => [qw/id/],
2102             returns => 'HashRef',
2103             );
2104              
2105             # infer screen_name or user_id from positional args for backwards compatibility
2106             # and convenience
2107             around [qw/
2108             show_user
2109             create_friend
2110             follow_new
2111             destroy_friend
2112             unfollow
2113             friends_ids
2114             following_ids
2115             followers_ids
2116             create_block
2117             destroy_block
2118             block_exists
2119             report_spam
2120             retweeted_by_user
2121             update_friendship
2122             /] => sub {
2123             my $orig = shift;
2124             my $self = shift;
2125              
2126             my $args = ref $_[-1] eq ref {} ? pop : {};
2127             if ( @_ && !exists $$args{user_id} && !exists $$args{screen_name} ) {
2128             my $id = shift;
2129             $$args{$id =~ /^\d+\$/ ? 'user_id' : 'screen_name' } = $id;
2130             }
2131              
2132             return $self->$orig(@_, $args);
2133             };
2134              
2135             1;
2136              
2137             __END__
2138              
2139              
2140             =head1 NAME
2141              
2142             Net::Twitter::Role::API::RESTv1_1 - A definition of the Twitter REST API v1.1 as a Moose role
2143              
2144             =head1 VERSION
2145              
2146             version 4.01010
2147              
2148             =head1 SYNOPSIS
2149              
2150             package My::Twitter;
2151             use Moose;
2152             with 'Net::Twitter::API::RESTv1_1';
2153              
2154             =head1 DESCRIPTION
2155              
2156             B<Net::Twitter::Role::API::RESTv1_1> provides definitions for all the Twitter REST API
2157             v1.1 methods. Applying this role to any class provides methods for all of the
2158             Twitter REST API methods.
2159              
2160              
2161             =head1 AUTHOR
2162              
2163             Marc Mims <marc@questright.com>
2164              
2165             =head1 LICENSE
2166              
2167             Copyright (c) 2009 Marc Mims
2168              
2169             The Twitter API itself, and the description text used in this module is:
2170              
2171             Copyright (c) 2009 Twitter
2172              
2173             This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2174              
2175             =head1 DISCLAIMER OF WARRANTY
2176              
2177             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2178             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
2179             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2180             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
2181             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2182             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
2183             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
2184             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
2185             NECESSARY SERVICING, REPAIR, OR CORRECTION.
2186              
2187             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2188             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2189             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
2190             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
2191             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
2192             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
2193             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
2194             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
2195             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
2196             SUCH DAMAGES.