Constructor
new Search(defaults, authopt, apiBaseopt)
Create a Search
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
defaults |
Object | defaults for the search |
||
auth |
Requestable.auth |
<optional> |
information required to authenticate to Github |
|
apiBase |
string |
<optional> |
https://api.github.com | the base Github API URL |
Methods
forCode(optionsopt, cbopt) → {Promise}
Search for code
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Search.Params |
<optional> |
additional parameters for the search |
cb |
Requestable.callback |
<optional> |
will receive the results of the search |
Returns:
- the promise for the http request
- Type
- Promise
forIssues(optionsopt, cbopt) → {Promise}
Search for issues
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Search.Params |
<optional> |
additional parameters for the search |
cb |
Requestable.callback |
<optional> |
will receive the results of the search |
Returns:
- the promise for the http request
- Type
- Promise
forRepositories(optionsopt, cbopt) → {Promise}
Search for repositories
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Search.Params |
<optional> |
additional parameters for the search |
cb |
Requestable.callback |
<optional> |
will receive the results of the search |
Returns:
- the promise for the http request
- Type
- Promise
forUsers(optionsopt, cbopt) → {Promise}
Search for users
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Search.Params |
<optional> |
additional parameters for the search |
cb |
Requestable.callback |
<optional> |
will receive the results of the search |
Returns:
- the promise for the http request
- Type
- Promise
Type Definitions
Params
Available search options
Type:
- Object