NAME

Pithub::Gists

VERSION

version 0.01000

METHODS

create

  • Create a gist

    POST /gists

Examples:

my $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
  • List the authenticated user’s gists or if called anonymously, this will returns all public gists:

    GET /gists
  • List all public gists:

    GET /gists/public
  • List the authenticated user’s starred gists:

    GET /gists/starred

Examples:

# List a user’s gists:
$result = $p->gists->list( user => 'plu' );

# List the authenticated user’s gists or if called anonymously,
# this will returns all public gists:
$result = $p->gists->list;

# List the authenticated user’s starred gists:
$result = $p->gists->list( starred => 1 );

# List all public gists:
$result = $p->gists->list( public => 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:

my $result = $p->gists->update(
    gist_id => 784612,
    data    => { description => 'bar foo' }
);

1 POD Error

The following errors were encountered while parsing the POD:

Around line 155:

Non-ASCII character seen before =encoding in 'user’s'. Assuming UTF-8