1Net::GitHub::V3::Orgs(3U)ser Contributed Perl DocumentatiNoent::GitHub::V3::Orgs(3)
2
3
4

NAME

6       Net::GitHub::V3::Orgs - GitHub Orgs 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 $org = $gh->org;
13

DESCRIPTION

15   METHODS
16       Orgs
17
18       <http://developer.github.com/v3/orgs/>
19
20       orgs
21               my @orgs = $org->orgs(); # /user/org
22               my @orgs = $org->orgs( 'nothingmuch' ); # /users/:user/org
23               while (my $o = $org->next_org) { ...; }
24
25       org
26               my $org  = $org->org('perlchina');
27
28       update_org
29               my $org  = $org->update_org($org_name, { name => 'new org name' });
30
31       Members
32
33       <http://developer.github.com/v3/orgs/members/>
34
35       members
36       is_member
37       delete_member
38               my @members = $org->members('perlchina');
39               while (my $m = $org->next_member) { ...; }
40               my $is_member = $org->is_member('perlchina', 'fayland');
41               my $st = $org->delete_member('perlchina', 'fayland');
42
43       public_members
44       is_public_member
45       publicize_member
46       conceal_member
47               my @members = $org->public_members('perlchina');
48               while (my $public_member = $org->next_public_member) { ...; }
49               my $is_public_member = $org->is_public_member('perlchina', 'fayland');
50               my $st = $org->publicize_member('perlchina', 'fayland');
51               my $st = $org->conceal_member('perlchina', 'fayland');
52
53       owner_members
54               my @admins = $org->owner_members('perlchina');
55               while (my $admin = $org->next_owner_member) { ...; }
56
57       no_2fa_members
58               my @no_2fa_members = $org->no_2fa_members('perlchina');
59               while (my $n2a_m = $org->next_no_2fa_member) { ...; }
60
61       outside_collaborators
62               my @collaborators = $org->outside_collaborators('perlchina');
63               while (my $helper = $org->next_outside_collaborator) { ...; }
64
65       membership
66       repos
67           List all repositories for an organization. (can use pagination)
68
69               my $first_100_repos = $org->repos( $organization_name );
70
71           Iterate over all repositories for an organization.
72
73               while (my $repo = $org->next_repos( 'Your-Org-Name' ) ) {
74                   # do something with $repo
75                   say $repo->{name};
76                   ...
77               }
78               $org->close_repos( 'Your-Org-Name' );
79
80       update_membership
81       delete_membership
82               my $membership = $org->membership( { org => 'perlchina', username => 'fayland' } );
83               my $membership = $org->update_membership('perlchina', 'fayland', {
84                   role => 'admin',
85               });
86               my $st = $org->delete_membership('perlchina', 'fayland');
87
88       Org Teams API
89
90       <http://developer.github.com/v3/orgs/teams/>
91
92       teams
93       team
94       create_team
95       update_team
96       delete_team
97               my @teams = $org->teams('perlchina');
98               while (my $team = $org->next_team('perlchina')) { ...; }
99
100               my $team  = $org->team($team_id);
101               my $team  = $org->create_team('perlchina', {
102                   "name" => "new team"
103               });
104               my $team  = $org->update_team($team_id, {
105                   name => "new team name"
106               });
107               my $st = $org->delete_team($team_id);
108
109       team_members
110       is_team_member
111       add_team_member
112       delete_team_member
113               my @members = $org->team_members($team_id);
114               while (my $member = $org->next_team_member($team_id)) { ...; }
115               my $is_team_member = $org->is_team_member($team_id, 'fayland');
116               my $st = $org->add_team_member($team_id, 'fayland');
117               my $st = $org->delete_team_member($team_id, 'fayland');
118
119       team_maintainers
120               my @maintainers = $org->team_maintainers($team_id);
121               while (my $maintainer = $org->next_team_maintainer($team_id)) { ...; }
122
123       team_repos
124       is_team_repos
125       add_team_repos
126       delete_item_repos
127               my @repos = $org->team_repos($team_id);
128               while (my $repo = $org->next_team_repo($team_id)) { ...; }
129
130               my $is_team_repos = $org->is_team_repos($team_id, 'Hello-World');
131               my $st = $org->add_team_repos($team_id, 'Hello-World');
132               my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'admin' });
133               my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'push' });
134               my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'pull' });
135               my $st = $org->delete_team_repos($team_id, 'Hello-World');
136
138       Refer Net::GitHub
139
140
141
142perl v5.38.0                      2023-07-21          Net::GitHub::V3::Orgs(3)
Impressum