Skip to content

Instantly share code, notes, and snippets.

@semifor
Last active December 15, 2015 06:39
Show Gist options
  • Select an option

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

Select an option

Save semifor/5217973 to your computer and use it in GitHub Desktop.
# Rate limit status example
my $r = $nt->rate_limit_status;
my $status_show_limit = $r->{resources}{'/statuses/show/:id'};
my $remaining = $status_show_limit->{remaining};
# Or, unpack limit, remaining and reset together:
my ( $limit, $remaining, $reset ) = @{$r->{resources}{statuses}{'/statuses/show/:id'}}{qw/limit remaining reset/};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment