NAME
Pithub::Gists - Github v3 Gists API
VERSION
version 0.01003
METHODS
create
Create a gist
POST /gists
Examples:
$result = $p->gists->create( data => { description => 'the description for this gist', public => 1, files => { 'file1.txt' => { content => 'String file content' } } } );
delete
Delete a gist
DELETE /gists/:id
Examples:
$result = $p->gists->delete( gist_id => 784612 );
fork
Fork a gist
POST /gists/:id/fork
Examples:
$result = $p->gists->fork( gist_id => 784612 );
get
Get a single gist
GET /gists/:id
Examples:
$result = $p->gists->get( gist_id => 784612 );
is_starred
Check if a gist is starred
GET /gists/:id/star
Examples:
$result = $p->gists->is_starred( gist_id => 784612 );
list
List a user’s gists:
GET /users/:user/gists
Examples:
$result = $p->gists->list( user => 'plu' );
List the authenticated user’s gists or if called anonymously, this will returns all public gists:
GET /gists
Examples:
$result = $p->gists->list;
List all public gists:
GET /gists/public
Examples:
$result = $p->gists->list( public => 1 );
List the authenticated user’s starred gists:
GET /gists/starred
Examples:
$result = $p->gists->list( starred => 1 );
star
Star a gist
PUT /gists/:id/star
Examples:
$result = $p->gists->star( gist_id => 784612 );
unstar
Unstar a gist
DELETE /gists/:id/star
Examples:
$result = $p->gists->unstar( gist_id => 784612 );
update
Edit a gist
PATCH /gists/:id
Examples:
$result = $p->gists->update( gist_id => 784612, data => { description => 'bar foo' } );
AUTHOR
Johannes Plunien <plu@cpan.org>
COPYRIGHT AND LICENSE
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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 196:
Non-ASCII character seen before =encoding in 'user’s'. Assuming UTF-8