Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added API method subscriptions; list_subscriptions is now all_subscri…

…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...
commit 9eaab0a442490c4a3a40df067813ba55323b600d 1 parent 4d3083e
Marc Mims authored
Showing with 19 additions and 4 deletions.
  1. +2 −0  Changes
  2. +17 −4 lib/Net/Twitter/Role/API/REST.pm
2  Changes
View
@@ -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
21 lib/Net/Twitter/Role/API/REST.pm
View
@@ -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.
@@ -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 => (
Please sign in to comment.
Something went wrong with that request. Please try again.