Changeset 4351b0c in lab.git for Dev/github


Ignore:
Timestamp:
Aug 21, 2013 6:59:25 PM (11 years ago)
Author:
Ken-ichi Mito <mitty@…>
Branches:
master
Children:
29f6915b
Parents:
13e2400
Message:

use access_token

Location:
Dev/github
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/github/GitHubBackup.pm

    r13e2400 r4351b0c  
    3636    my %parameters = @_; 
    3737     
     38    if ($self->access_token) { 
     39        $parameters{access_token} = $self->access_token; 
     40    } 
    3841    my $parameters = ''; 
    3942    while (my($key, $value) = each %parameters) { 
     
    146149     
    147150    my $account = $self->account or croak "account is not set"; 
     151    my $token = ($self->access_token) ? "?access_token=" . $self->access_token : ''; 
    148152    my $result; 
    149153    if (my $repository = $self->repository) { 
    150         $result = [ $self->api->json_api("/repos/$account/$repository") ]; 
     154        $result = [ $self->api->json_api("/repos/$account/$repository$token") ]; 
    151155    } 
    152156    else { 
  • Dev/github/github-backup.pl

    rf7f894d r4351b0c  
    1111    repository => 'munin-plugins', 
    1212    directory => 'repos', 
     13    access_token => 'e72e16c7e42f292c6912e7710c838347ae178b4a', 
    1314); 
    1415 
Note: See TracChangeset for help on using the changeset viewer.