Created
April 17, 2013 01:21
-
-
Save semifor/5401066 to your computer and use it in GitHub Desktop.
Upgrading from legacy Lists API to REST list methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The legacy Lists API identified lists a `user` and `list_id`, which were the list | |
| # owners screen name and the list slug, respectively. | |
| # | |
| # The current list methods identify a list either by numeric ID (list_id => $list_id), | |
| # or by the owning user's screen_name and slug { owner_screen_name => $name, slug => $slug }, | |
| # or owning user's user ID as slug { owner_id => $id, slug => $slug }. | |
| # | |
| # So, for the most part, it's an easy transition. | |
| # | |
| # E.g., lines 251-255 | |
| my $list_people = nt_with_retry($nt,$list_group => { | |
| user => $user_screen_name, | |
| list_id => $list_slug, | |
| cursor => $cursor, | |
| }); | |
| # become | |
| my $list_people = nt_with_retry($nt, $list_group => { | |
| owner_screen_name => $user_screen_name, | |
| slug => $list_slug, | |
| cursor => $cursor, | |
| }); | |
| # see: https://dev.twitter.com/docs/api/1.1#99 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment