Teams

Note

See the official GitHub API v2 documentation for organizations and teams.

class github2.teams.Team(type)[source]

Team container.

New in version 0.4.0.

permission

Permissions of the team

id

The team id

name

Name of the team

class github2.teams.Teams(type)[source]

GitHub API teams functionality.

New in version 0.4.0.

add_member(team_id, username)[source]

Add a new member to a team.

param int team_id:
 team to add new member to
param str username:
 GitHub username to add to team

Warning

Requires authentication

add_project(team_id, project)[source]

Add a project to a team.

param int team_id:
 team to add repository to
param str project:
 GitHub project

Warning

Requires authentication

members(team_id)[source]

Get list of all team members.

Parameters:team_id (int) – team to get information for
remove_project(team_id, project)[source]

Remove a project to a team.

param int team_id:
 team to remove project from
param str project:
 GitHub project

Warning

Requires authentication

repositories(team_id)[source]

Get list of all team repositories.

Parameters:team_id (int) – team to get information for
show(team_id)[source]

Get information on team_id.

Parameters:team_id (int) – team to get information for

Examples

Fetch Teams Info

>>> team = github.teams.show(56855)
>>> team[0].name
u'Owners'
>>> github.teams.members(56855)
[<User: JNRowe>]
>>> repos = github.teams.repositories(56855)
>>> repos[0].name
u'org_repo_test'

Table Of Contents

Previous topic

Organizations

Next topic

Issues

This Page