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::ORGS::TEAMS (3)

.ds Aq ’

NAME

Pithub::Orgs::Teams - Github v3 Org Teams API

CONTENTS

VERSION

version 0.01033

METHODS

    add_member

The Add team member API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Add team membership API instead. It allows you to invite new organization members to your teams.

In order to add a user to a team, the authenticated user must have ’admin’ permissions to the team or be an owner of the org that the team is associated with.



    PUT /teams/:id/members/:user



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->add_member(
        team_id => 1,
        user    => plu,
    );



    add_membership

If the user is already a member of the teamXs organization, this endpoint will add the user to the team. In order to add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team.



    PUT /teams/:id/memberships/:user



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->add_membership(
        team_id => 1,
        user    => plu,
        data    => {
            role => member,
        }
    );



    add_repo

In order to add a repo to a team, the authenticated user must be an owner of the org that the team is associated with.



    PUT /teams/:id/repos/:repo



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->add_repo(
        team_id => 1,
        repo    => some_repo,
        org => our_organization,
    );



    create

In order to create a team, the authenticated user must be an owner of the given organization.



    POST /orgs/:org/teams



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->create(
        org  => CPAN-API,
        data => {
            name       => new team,
            permission => push,
            repo_names => [github/dotfiles]
        }
    );



    delete

In order to delete a team, the authenticated user must be an owner of the org that the team is associated with.



    DELETE /teams/:id



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->delete( team_id => 1 );



    get

Get team



    GET /teams/:id



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->get( team_id => 1 );



    has_repo

Get team repo



    GET /teams/:id/repos/:repo



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->has_repo(
        team_id => 1,
        repo    => some_repo,
    );



    is_member

In order to get if a user is a member of a team, the authenticated user must be a member of the team.



    GET /teams/:id/members/:user



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->is_member(
        team_id => 1,
        user    => plu,
    );



    list

List teams



    GET /orgs/:org/teams



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->list( org => CPAN-API );



    list_members

In order to list members in a team, the authenticated user must be a member of the team.



    GET /teams/:id/members



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->list_members( team_id => 1 );



    list_repos

List team repos



    GET /teams/:id/repos



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->list_repos( team_id => 1 );



    remove_member

The Remove team member API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Remove team membership API instead. It allows you to remove both active and pending memberships.

In order to remove a user from a team, the authenticated user must have ’admin’ permissions to the team or be an owner of the org that the team is associated with. NOTE: This does not delete the user, it just remove them from the team.



    DELETE /teams/:id/members/:user



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->remove_member(
        team_id => 1,
        user    => plu,
    );



    remove_membership

In order to remove a membership between a user and a team, the authenticated user must have ’admin’ permissions to the team or be an owner of the organization that the team is associated with. NOTE: This does not delete the user, it just removes their membership from the team.



    DELETE /teams/:id/memberships/:user



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->remove_membership(
        team_id => 1,
        user    => plu,
    );



    remove_repo

In order to remove a repo from a team, the authenticated user must be an owner of the org that the team is associated with.



    DELETE /teams/:id/repos/:repo



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->remove_repo(
        team_id => 1,
        repo    => some_repo,
    );



    update

In order to edit a team, the authenticated user must be an owner of the org that the team is associated with.



    PATCH /teams/:id



Examples:



    my $t = Pithub::Orgs::Teams->new;
    my $result = $t->update(
        team_id => 1,
        data    => {
            name       => new team name,
            permission => push,
        }
    );



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::ORGS::TEAMS (3) 2016-01-22

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