Skip to content

Commit

Permalink
tweak user(), org() to pass on extra args and handle named users
Browse files Browse the repository at this point in the history
  • Loading branch information
rsrchboy committed Apr 12, 2013
1 parent df027b1 commit b04f0ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/GitHub/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ Returns a L<GitHub::API::Org> object representing the named organization.
=cut

sub user { shift->_next(User, '/user') }
#sub users { ... } # needs a Users class

sub org { shift->_next(Org, "/orgs/$_[0]") }
sub user { shift->_next(User, '/user', ($_[0] ? (user => @_) : @_) ) }
sub org { shift->_next(Org, "/orgs/$_[0]", @_) }

!!42;
__END__
Expand Down

0 comments on commit b04f0ee

Please sign in to comment.