Constructor
new Organization(organization, authopt, apiBaseopt)
Create a new Organization
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
organization |
string
|
the name of the organization |
||
auth |
Requestable.auth
|
<optional> |
information required to authenticate to Github |
|
apiBase |
string
|
<optional> |
https://api.github.com |
the base Github API URL |
Methods
createProject(options, cb) → {Promise}
Create a new project
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
the description of the project |
cb |
Requestable.callback
|
will receive the newly created project |
Returns:
- Type:
-
Promise
- the promise for the http request
createRepo(options, cbopt) → {Promise}
Create a repository in an organization
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object
|
the repository definition |
|
cb |
Requestable.callback
|
<optional> |
will receive the created repository |
Returns:
- Type:
-
Promise
- the promise for the http request
createTeam(options, cbopt) → {Promise}
Create a team
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object
|
Team creation parameters
|
||||||||||||||||||||||||||
cb |
Requestable.callback
|
<optional> |
will receive the created team |
Returns:
- Type:
-
Promise
- the promise for the http request
getRepos(cbopt) → {Promise}
List the repositories in an organization
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
getTeams(cbopt) → {Promise}
List the Teams in the Organization
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the list of teams |
Returns:
- Type:
-
Promise
- the promise for the http request
isMember(username, cbopt) → {Promise}
Query if the user is a member or not
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
username |
string
|
the user in question |
|
cb |
Requestable.callback
|
<optional> |
will receive true if the user is a member |
Returns:
- Type:
-
Promise
- the promise for the http request
listMembers(options, cbopt) → {Promise}
List the users who are members of the company
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object
|
filtering options
|
||||||||||||||||
cb |
Requestable.callback
|
<optional> |
will receive the list of users |
Returns:
- Type:
-
Promise
- the promise for the http request
listProjects(cbopt) → {Promise}
Get information about all projects
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cb |
Requestable.callback
|
<optional> |
will receive the list of projects |
Returns:
- Type:
-
Promise
- the promise for the http request