Skip to content

Commit

Permalink
Added API method subscriptions; list_subscriptions is now all_subscri…
Browse files Browse the repository at this point in the history
…ptions

Either I missread the API docs previosly, or Twitter made a change to the API
which could cause some confusion.  API method list_subscriptions is mapped to
lists/all, and Net::Twitter had no method for lists/subscriptions.  The former
returns all lists a user is subscribed to, including their own.

I added method subscriptions for endpoint lists/subscriptions, renamed
list_subscriptions to all_subscriptions, but kept list_subscriptions as an
alias for backwards compatibility with previos versions of Net::Twitter.
  • Loading branch information
semifor committed Mar 30, 2012
1 parent 4d3083e commit 9eaab0a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,3 +1,5 @@
- added API method subscriptions; list_subscriptions is now
all_subscriptions with alias list_subscriptions
- deprecated TwitterVision API support
- added API method members_destroy_all with alias remove_list_members
- added deprecation warning for 'trends'; calls trends_location(1), instead
Expand Down
21 changes: 17 additions & 4 deletions lib/Net/Twitter/Role/API/REST.pm
Expand Up @@ -1415,13 +1415,13 @@ response. This method is only available to users who have access to

### Lists ###

twitter_api_method list_subscriptions => (
twitter_api_method all_subscriptions => (
path => 'lists/all',
method => 'GET',
params => [qw/id user_id screen_name/],
required => [qw/id/],
params => [qw/user_id screen_name count cursor/],
required => [],
returns => 'ArrayRef[List]',
aliases => [qw/all_lists/],
aliases => [qw/all_lists list_subscriptions/],
description => <<'',
Returns all lists the authenticating or specified user subscribes to, including
their own. The user is specified using the user_id or screen_name parameters.
Expand Down Expand Up @@ -1681,6 +1681,19 @@ authenticated user owns the specified list.
);

twitter_api_method subscriptions => (
path => 'lists/subscriptions',
method => 'GET',
params => [qw/user_id screen_name count cursor/],
required => [],
returns => 'ArrayRef[List]',
aliases => [],
description => <<'',
Obtain a collection of the lists the specified user is subscribed to, 20 lists
per page by default. Does not include the user's own lists.
);

### Legal ###

twitter_api_method get_privacy_policy => (
Expand Down

0 comments on commit 9eaab0a

Please sign in to comment.