Pithub...omments(3pm)

πŸ“¦
version 0.01043 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Pithub::Gists::Comments β€” the manual page, but make it a group chat πŸ’–

okay so bestie, welcome to Pithub::Gists::Comments β€” it's a Perl module, it lives in the Pithub::Gists::Comments namespace, and it is literally your bestie for the Github v3 Gist Comments API. comments on gists. that's the whole vibe. πŸŽ€


✨ VERSION ✨

this is version 0.01043. yes we're keeping the version number, no we're not being weird about it. πŸ’…


🌸 METHODS 🌸

πŸ’¬ create

  • creates a comment β€” yes queen, you're leaving a comment
POST /gists/:gist_id/comments

Parameters:

  • gist_id: mandatory string 🫢
  • data: mandatory hashref, and it has these keys inside it:
    • body: 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: Status: 201 Created πŸ”₯

{
    "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

  • deletes a comment β€” bye bestie πŸ’€
DELETE /gists/:gist_id/comments/:id

Parameters:

  • gist_id: mandatory string
  • comment_id: mandatory integer

Examples:

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

Response: Status: 204 No Content β€” that's it, nothing comes back, and that's iconic of it honestly ✨


πŸ” get

  • gets a single comment β€” one (1) comment, freshly fetched, no cap
GET /gists/:gist_id/comments/:id

Parameters:

  • gist_id: mandatory string
  • comment_id: mandatory integer

Examples:

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

Response: Status: 200 OK 🌈

{
    "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

  • lists comments on a gist β€” the whole comment section, the way that it's giving "scroll down, it gets good" 😭
GET /gists/:gist_id/comments

Parameters:

  • gist_id: mandatory string

Examples:

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

Response: Status: 200 OK πŸ‘‘

[
    {
        "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

  • edits a comment β€” you said what you said, but now you're saying it differently πŸ’…
PATCH /gists/:gist_id/comments/:id

Parameters:

  • gist_id: mandatory string
  • comment_id: mandatory integer
  • data: mandatory hashref, and it has these keys inside it:
    • body: mandatory string

Examples:

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

Response: Status: 200 OK ⭐

{
    "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> β€” the actual main character who wrote this. show some respect fr fr 🫢


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.


and that's the whole page bestie βœ¨πŸ’– this was the Pithub::Gists::Comments manual from the User Contributed Perl Documentation set, perl v5.40.1, dated 2025-06-08. go forth and comment on gists responsibly, mwah πŸ’…πŸŽ€

πŸ“¦ where this page comes from