Constructor
new Team(teamIdopt, authopt, apiBaseopt)
Create a Team.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
teamId |
string |
<optional> |
the id for the team |
|
auth |
Requestable.auth |
<optional> |
information required to authenticate to Github |
|
apiBase |
string |
<optional> |
https://api.github.com | the base Github API URL |
Methods
addMembership(username, options, cbopt) → {Promise}
Add a member to the Team
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
username |
string | can be one of: |
|||||||||||
options |
object | Parameters for adding a team member Properties
|
|||||||||||
cb |
Requestable.callback |
<optional> |
will receive the membership status of added user |
Returns:
- the promise for the http request
- Type
- Promise
deleteTeam(cbopt) → {Promise}
Delete Team
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback |
<optional> |
will receive the list of repositories |
Returns:
- the promise for the http request
- Type
- Promise
editTeam(options, cbopt) → {Promise}
Edit Team information
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Parameters for team edit Properties
|
||||||||||||||||||||||||||
cb |
Requestable.callback |
<optional> |
will receive the updated team |
Returns:
- the promise for the http request
- Type
- Promise
getMembership(username, cbopt) → {Promise}
Get Team membership status for a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
username |
string | can be one of: |
|
cb |
Requestable.callback |
<optional> |
will receive the membership status of a user |
Returns:
- the promise for the http request
- Type
- Promise
getTeam(cbopt) → {Promise}
Get Team information
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback |
<optional> |
will receive the team |
Returns:
- the promise for the http request
- Type
- Promise
isManagedRepo(owner, repo, cbopt) → {Promise}
Get repo management status for team
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
owner |
string | Organization name |
|
repo |
string | Repo name |
|
cb |
Requestable.callback |
<optional> |
will receive the membership status of added user |
Returns:
- the promise for the http request
- Type
- Promise
listMembers(options, cbopt) → {Promise}
List the users who are members of the Team
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Parameters for listing team users Properties
|
|||||||||||
cb |
Requestable.callback |
<optional> |
will receive the list of users |
Returns:
- the promise for the http request
- Type
- Promise
listRepos(cbopt) → {Promise}
List the Team's repositories
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback |
<optional> |
will receive the list of repositories |
Returns:
- the promise for the http request
- Type
- Promise
manageRepo(owner, repo, options, cbopt) → {Promise}
Add or Update repo management status for team
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
owner |
string | Organization name |
|||||||||
repo |
string | Repo name |
|||||||||
options |
object | Parameters for adding or updating repo management for the team Properties
|
|||||||||
cb |
Requestable.callback |
<optional> |
will receive the membership status of added user |
- Source:
- See:
Returns:
- the promise for the http request
- Type
- Promise
unmanageRepo(owner, repo, cbopt) → {Promise}
Remove repo management status for team
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
owner |
string | Organization name |
|
repo |
string | Repo name |
|
cb |
Requestable.callback |
<optional> |
will receive the membership status of added user |
Returns:
- the promise for the http request
- Type
- Promise