Skip to content

Instantly share code, notes, and snippets.

@semifor
Created April 17, 2013 01:21
Show Gist options
  • Select an option

  • Save semifor/5401066 to your computer and use it in GitHub Desktop.

Select an option

Save semifor/5401066 to your computer and use it in GitHub Desktop.
Upgrading from legacy Lists API to REST list methods.
# 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