* Sets the default options for API requests * @protected * @param {Object} [requestOptions={}] - the current options for the request * @return {Object} - the options to pass to the request
(requestOptions = {})
| 113 | * @return {Object} - the options to pass to the request |
| 114 | */ |
| 115 | _getOptionsWithDefaults(requestOptions = {}) { |
| 116 | if (!(requestOptions.visibility || requestOptions.affiliation)) { |
| 117 | requestOptions.type = requestOptions.type || 'all'; |
| 118 | } |
| 119 | requestOptions.sort = requestOptions.sort || 'updated'; |
| 120 | requestOptions.per_page = requestOptions.per_page || '100'; // eslint-disable-line |
| 121 | |
| 122 | return requestOptions; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * if a `Date` is passed to this function it will be converted to an ISO string |
no outgoing calls
no test coverage detected