Skip to content

Commit

Permalink
allow user to define all API params via the hash arg
Browse files Browse the repository at this point in the history
  • Loading branch information
aggrolite committed Jun 17, 2015
1 parent f79dc0a commit 932d028
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Mojo/Snoo/Subreddit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ sub _get_links {
# Did we receive extra endpoint parameters?
my $params = ref $_[-1] eq 'HASH' ? pop : {};

$params->{t} = shift;
# Define these from special method calls unless
# user has already done so via the params hash
$params->{t} ||= shift;
$params->{limit} ||= shift;

my $res = $self->_do_request('GET', $path, %$params);
Expand Down

0 comments on commit 932d028

Please sign in to comment.