Pithub::Issues::Labels - Github v3 Issue Labels API
version 0.01034
Add labels to an issue
POST /repos/:user/:repo/issues/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new; my $result = $l->add( repo => 'Pithub', user => 'plu', issue_id => 1, data => ['Label1', 'Label2'], );
Create a label
POST /repos/:user/:repo/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->create( repo => 'Pithub', user => 'plu', data => { color => 'FFFFFF', name => 'some label', } );
Delete a label
DELETE /repos/:user/:repo/labels/:id
my $l = Pithub::Issues::Labels->new; my $result = $l->delete( repo => 'Pithub', user => 'plu', label => 1, );
Get a single label
GET /repos/:user/:repo/labels/:id
my $l = Pithub::Issues::Labels->new; my $result = $l->get( repo => 'Pithub', user => 'plu', label => 1, );
List all labels for this repository
GET /repos/:user/:repo/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->list( repo => 'Pithub', user => 'plu' );
List labels on an issue
GET /repos/:user/:repo/issues/:id/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->list( repo => 'Pithub', user => 'plu', issue_id => 1, );
Get labels for every issue in a milestone
GET /repos/:user/:repo/milestones/:id/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->get( repo => 'Pithub', user => 'plu', milestone_id => 1 );
Remove a label from an issue
DELETE /repos/:user/:repo/issues/:id/labels/:id
my $l = Pithub::Issues::Labels->new; my $result = $l->delete( repo => 'Pithub', user => 'plu', issue_id => 1, label => 1, );
Remove all labels from an issue
DELETE /repos/:user/:repo/issues/:id/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->delete( repo => 'Pithub', user => 'plu', issue_id => 1, );
Replace all labels for an issue
PUT /repos/:user/:repo/issues/:id/labels
my $l = Pithub::Issues::Labels->new; my $result = $l->replace( repo => 'Pithub', user => 'plu', issue_id => 1, data => [qw(label3 label4)], );
Update a label
PATCH /repos/:user/:repo/labels/:id
my $l = Pithub::Issues::Labels->new; my $result = $l->update( repo => 'Pithub', user => 'plu', label => 1, data => { color => 'FFFFFF', name => 'API', } );
Johannes Plunien <plu@cpan.org>
This software is copyright (c) 2011 by Johannes Plunien.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Pithub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pithub
CPAN shell
perl -MCPAN -e shell install Pithub
For more information on module installation, please visit the detailed CPAN module installation guide.