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
|
|||||||||||
cb |
Requestable.callback
|
<optional> |
will receive the membership status of added user |
Returns:
- Type:
-
Promise
- the promise for the http request
deleteTeam(cbopt) → {Promise}
Delete Team
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
editTeam(options, cbopt) → {Promise}
Edit Team information
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object
|
Parameters for team edit
|
||||||||||||||||||||||||||
cb |
Requestable.callback
|
<optional> |
will receive the updated team |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
getTeam(cbopt) → {Promise}
Get Team information
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the team |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
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
|
|||||||||||
cb |
Requestable.callback
|
<optional> |
will receive the list of users |
Returns:
- Type:
-
Promise
- the promise for the http request
listRepos(cbopt) → {Promise}
List the Team's repositories
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
manageRepo(owner, repo, options, cbopt) → {Promise}
Add or Update repo management status for team
- Source:
- See:
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
|
|||||||||
cb |
Requestable.callback
|
<optional> |
will receive the membership status of added user |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request