| 1 | package Net::GitHub::V3::GitData; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | our $VERSION = '1.03'; | |
| 6 | 1 | our $AUTHORITY = 'cpan:FAYLAND'; | |
| 7 | |||
| 8 | 1 | ▶ | use URI::Escape; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | with 'Net::GitHub::V3::Query'; | |
| 11 | |||
| 12 | ## build methods on fly | ||
| 13 | 1 | my %__methods = ( | |
| 14 | blob => { url => "/repos/%s/%s/git/blobs/%s" }, | ||
| 15 | create_blob => { url => "/repos/%s/%s/git/blobs", method => 'POST', args => 1 }, | ||
| 16 | |||
| 17 | commit => { url => "/repos/%s/%s/git/commits/%s" }, | ||
| 18 | create_commit => { url => "/repos/%s/%s/git/commits", method => 'POST', args => 1 }, | ||
| 19 | |||
| 20 | tree => { url => "/repos/%s/%s/git/trees/%s" }, | ||
| 21 | trees => { url => "/repos/%s/%s/git/trees/%s?recursive=1" }, | ||
| 22 | create_tree => { url => "/repos/%s/%s/git/trees", method => 'POST', args => 1 }, | ||
| 23 | |||
| 24 | refs => { url => "/repos/%s/%s/git/refs" }, | ||
| 25 | ref => { url => "/repos/%s/%s/git/refs/%s" }, | ||
| 26 | create_ref => { url => "/repos/%s/%s/git/refs", method => 'POST', args => 1 }, | ||
| 27 | update_ref => { url => "/repos/%s/%s/git/refs/%s", method => 'PATCH', args => 1 }, | ||
| 28 | delete_ref => { url => "/repos/%s/%s/git/refs/%s", method => 'DELETE', check_status => 204 }, | ||
| 29 | |||
| 30 | tag => { url => "/repos/%s/%s/git/tags/%s" }, | ||
| 31 | create_tag => { url => "/repos/%s/%s/git/tags", method => 'POST', args => 1 }, | ||
| 32 | |||
| 33 | ); | ||
| 34 | 1 | __build_methods(__PACKAGE__, %__methods); | |
| 35 | |||
| 36 | 1 | ▶ | no Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | |||
| 38 | 1 | 1; | |
| 39 | __END__ | ||