my $url = shift;
my %parameters = @_;
+ if ($self->access_token) {
+ $parameters{access_token} = $self->access_token;
+ }
my $parameters = '';
while (my($key, $value) = each %parameters) {
$parameters .= "&$key=$value";
$self->{repos} = [];
my $account = $self->account or croak "account is not set";
+ my $token = ($self->access_token) ? "?access_token=" . $self->access_token : '';
my $result;
if (my $repository = $self->repository) {
- $result = [ $self->api->json_api("/repos/$account/$repository") ];
+ $result = [ $self->api->json_api("/repos/$account/$repository$token") ];
}
else {
$result = $self->api->get("/users/$account/repos");