NAME
Net::GitHub::V3::Orgs - GitHub Orgs API
SYNOPSIS
use Net::GitHub::V3;
my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info
my $org = $gh->org;
DESCRIPTION
METHODS
Orgs
http://developer.github.com/v3/orgs/
- orgs
-
my @orgs = $org->orgs(); # /user/org my @orgs = $org->orgs( 'nothingmuch' ); # /users/:user/org while (my $o = $org->next_org) { ...; }
- org
-
my $org = $org->org('perlchina');
- update_org
-
my $org = $org->update_org($org_name, { name => 'new org name' });
Members
http://developer.github.com/v3/orgs/members/
- members
- is_member
- delete_member
-
my @members = $org->members('perlchina'); while (my $m = $org->next_member) { ...; } my $is_member = $org->is_member('perlchina', 'fayland'); my $st = $org->delete_member('perlchina', 'fayland');
- public_members
- is_public_member
- publicize_member
- conceal_member
-
my @members = $org->public_members('perlchina'); while (my $public_member = $org->next_public_member) { ...; } my $is_public_member = $org->is_public_member('perlchina', 'fayland'); my $st = $org->publicize_member('perlchina', 'fayland'); my $st = $org->conceal_member('perlchina', 'fayland');
- owner_members
-
my @admins = $org->owner_members('perlchina'); while (my $admin = $org->next_owner_member) { ...; }
- no_2fa_members
-
my @no_2fa_members = $org->no_2fa_members('perlchina'); while (my $n2a_m = $org->next_no_2fa_member) { ...; }
- outside_collaborators
-
my @collaborators = $org->outside_collaborators('perlchina'); while (my $helper = $org->next_outside_collaborator) { ...; }
- membership
- repos
-
List all repositories for an organization. (can use pagination)
my $first_100_repos = $org->repos( $organization_name );
Iterate over all repositories for an organization.
while (my $repo = $org->next_repos( 'Your-Org-Name' ) ) { # do something with $repo say $repo->{name}; ... } $org->close_repos( 'Your-Org-Name' );
- update_membership
- delete_membership
-
my $membership = $org->membership( { org => 'perlchina', username => 'fayland' } ); my $membership = $org->update_membership('perlchina', 'fayland', { role => 'admin', }); my $st = $org->delete_membership('perlchina', 'fayland');
Org Teams API
http://developer.github.com/v3/orgs/teams/
- teams
- team
- create_team
- update_team
- delete_team
-
my @teams = $org->teams('perlchina'); while (my $team = $org->next_team('perlchina')) { ...; } my $team = $org->team($team_id); my $team = $org->create_team('perlchina', { "name" => "new team" }); my $team = $org->update_team($team_id, { name => "new team name" }); my $st = $org->delete_team($team_id);
- team_members
- is_team_member
- add_team_member
- delete_team_member
-
my @members = $org->team_members($team_id); while (my $member = $org->next_team_member($team_id)) { ...; } my $is_team_member = $org->is_team_member($team_id, 'fayland'); my $st = $org->add_team_member($team_id, 'fayland'); my $st = $org->delete_team_member($team_id, 'fayland');
- team_maintainers
-
my @maintainers = $org->team_maintainers($team_id); while (my $maintainer = $org->next_team_maintainer($team_id)) { ...; }
- team_repos
- is_team_repos
- add_team_repos
- delete_item_repos
-
my @repos = $org->team_repos($team_id); while (my $repo = $org->next_team_repo($team_id)) { ...; } my $is_team_repos = $org->is_team_repos($team_id, 'Hello-World'); my $st = $org->add_team_repos($team_id, 'Hello-World'); my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'admin' }); my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'push' }); my $st = $org->add_team_repos($team_id, 'YoinkOrg/Hello-World', { permission => 'pull' }); my $st = $org->delete_team_repos($team_id, 'Hello-World');
AUTHOR & COPYRIGHT & LICENSE
Refer Net::GitHub