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:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
Type Definitions
Params
Available search options
Type:
-
Object