1Net::GitHub::V3::Gists(U3s)er Contributed Perl DocumentatNieotn::GitHub::V3::Gists(3)
2
3
4

NAME

6       Net::GitHub::V3::Gists - GitHub Gists API
7

SYNOPSIS

9           use Net::GitHub::V3;
10
11           my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info
12           my $gist = $gh->gist;
13

DESCRIPTION

15   METHODS
16       Git Data
17
18       <http://developer.github.com/v3/gists/>
19
20       gists
21               my @gists = $gist->gists;
22               my @gists = $gist->gists('nothingmuch');
23               while (my $g = $gist->next_gist) { ...; }
24
25       public_gists
26       starred_gists
27               my @gists = $gist->public_gists;
28               my @gists = $gist->starred_gists;
29               while (my $g = $gist->next_public_gist) { ...; }
30               while (my $g = $gist->next_starred_gist) { ...; }
31
32       gist
33               my $gist = $gist->gist($gist_id);
34
35       create
36               my $gist = $gist->create( {
37                 "description" => "the description for this gist",
38                 "public" => 'true',
39                 "files"  =>  {
40                   "file1.txt" => {
41                       "content" => "String file contents"
42                   }
43                 }
44               } );
45
46       update
47               my $g = $gist->update( $gist_id, {
48                   description => "edited desc"
49               } );
50
51       star
52       unstar
53       is_starred
54               my $st = $gist->star($gist_id);
55               my $st = $gist->unstar($gist_id);
56               my $st = $gist->is_starred($gist_id);
57
58       fork
59       delete
60               my $g  = $gist->fork($gist_id);
61               my $st = $gist->delete($gist_id);
62
63       Gist Comments API
64
65       <http://developer.github.com/v3/gists/comments/>
66
67       comments
68       comment
69       create_comment
70       update_comment
71       delete_comment
72               my @comments = $gist->comments();
73               while (my $c = $gist->next_comment) { ...; }
74               my $comment  = $gist->comment($comment_id);
75               my $comment  = $gist->create_comment($gist_id, {
76                   "body" => "a new comment"
77               });
78               my $comment = $gist->update_comment($gist_id, $comment_id, {
79                   "body" => "Nice change"
80               });
81               my $st = $gist->delete_comment($gist_id, $comment_id);
82
84       Refer Net::GitHub
85
86
87
88perl v5.34.0                      2021-07-22         Net::GitHub::V3::Gists(3)
Impressum