GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PITHUB::GISTS::COMMENTS (3)

.ds Aq ’

NAME

Pithub::Gists::Comments - Github v3 Gist Comments API

CONTENTS

VERSION

version 0.01033

METHODS

    create

o Create a comment



    POST /gists/:gist_id/comments



Parameters:
o <B>gist_idB>: mandatory string
o <B>dataB>: mandatory hashref, having following keys:
o <B>bodyB>: mandatory string

Examples:



    my $c = Pithub::Gists::Comments->new;
    my $result = $c->create(
        gist_id => c0ff33,
        data    => { body => Just commenting for the sake of commenting },
    );



Response: <B>Status: 201 CreatedB>



    {
        "id": 1,
        "url": "https://api.github.com/gists/c0ff33/comments/1",
        "body": "Just commenting for the sake of commenting",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "created_at": "2011-04-18T23:23:56Z"
    }



    delete

o Delete a comment



    DELETE /gists/:gist_id/comments/:id



Parameters:
o <B>gist_idB>: mandatory string
o <B>comment_idB>: mandatory integer

Examples:



    my $c = Pithub::Gists::Comments->new;
    my $result = $c->delete(
        gist_id    => c0ff33,
        comment_id => 1
    );



Response: <B>Status: 204 No ContentB>

    get

o Get a single comment



    GET /gists/:gist_id/comments/:id



Parameters:
o <B>gist_idB>: mandatory string
o <B>comment_idB>: mandatory integer

Examples:



    my $c = Pithub::Gists::Comments->new;
    my $result = $c->get(
        gist_id    => c0ff33,
        comment_id => 1
    );



Response: <B>Status: 200 OKB>



    {
        "id": 1,
        "url": "https://api.github.com/gists/c0ff33/comments/1",
        "body": "Just commenting for the sake of commenting",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "created_at": "2011-04-18T23:23:56Z"
    }



    list

o List comments on a gist



    GET /gists/:gist_id/comments



Parameters:
o <B>gist_idB>: mandatory string

Examples:



    my $c = Pithub::Gists::Comments->new;
    my $result = $c->list( gist_id => 1 );



Response: <B>Status: 200 OKB>



    [
        {
            "id": 1,
            "url": "https://api.github.com/gists/c0ff33/comments/1",
            "body": "Just commenting for the sake of commenting",
            "user": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "created_at": "2011-04-18T23:23:56Z"
        }
    ]



    update

o Edit a comment



    PATCH /gists/:gist_id/comments/:id



Parameters:
o <B>gist_idB>: mandatory string
o <B>comment_idB>: mandatory integer
o <B>dataB>: mandatory hashref, having following keys:
o <B>bodyB>: mandatory string

Examples:



    my $c = Pithub::Gists::Comments->new;
    my $result = $c->update(
        gist_id    => c0ff33,
        comment_id => 1,
        data       => { body => some comment }
    );



Response: <B>Status: 200 OKB>



    {
        "id": 1,
        "url": "https://api.github.com/gists/c0ff33/comments/1",
        "body": "Just commenting for the sake of commenting",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "created_at": "2011-04-18T23:23:56Z"
    }



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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PITHUB::GISTS::COMMENTS (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.