Created
April 17, 2014 17:01
-
-
Save skaji/10998156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use lib "lib"; | |
use Pithub; | |
use Data::Dumper; | |
my $token = $ENV{TOKEN} or die; | |
my $p = Pithub::Repos::Contents->new( | |
user => 'shoichikaji', | |
repo => 'dummy2', | |
token => $token, | |
); | |
my $sha = do { | |
my $r = $p->get(path => "README.md"); | |
$r->content->{sha}; | |
}; | |
my $r = $p->update( | |
path => "README.md", | |
data => { | |
message => "from api update", | |
content => "hogehoge", | |
sha => $sha, | |
} | |
); | |
print Dumper $r; | |
print Dumper $r->content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment