* Perform a search on the GitHub API * @private * @param {string} path - the scope of the search * @param {Search.Params} [withOptions] - additional parameters for the search * @param {Requestable.callback} [cb] - will receive the results of the search * @return {Promise} - the p
(path, withOptions = {}, cb = undefined)
| 42 | * @return {Promise} - the promise for the http request |
| 43 | */ |
| 44 | _search(path, withOptions = {}, cb = undefined) { |
| 45 | let requestOptions = {}; |
| 46 | Object.keys(this.__defaults).forEach((prop) => { |
| 47 | requestOptions[prop] = this.__defaults[prop]; |
| 48 | }); |
| 49 | Object.keys(withOptions).forEach((prop) => { |
| 50 | requestOptions[prop] = withOptions[prop]; |
| 51 | }); |
| 52 | |
| 53 | log(`searching ${path} with options:`, requestOptions); |
| 54 | return this._requestAllPages(`/search/${path}`, requestOptions, cb); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Search for repositories |
no test coverage detected