You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/kitsu/src/index.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ import pluralise from 'pluralize'
6
6
* Creates a new `kitsu` instance
7
7
*
8
8
* @param {Object} [options] Options
9
-
* @param {string} [options.baseURL=https://kitsu.app/api/edge] Set the API endpoint
9
+
* @param {string} [options.baseURL='https://kitsu.app/api/edge'] Set the API endpoint
10
10
* @param {Object} [options.headers] Additional headers to send with the requests
11
11
* @param {'traditional'|'modern'|Function} [options.query=traditional] Query serializer function to use. This will impact the way keys are serialized when passing arrays as query parameters. 'modern' is recommended for new projects.
12
12
* @param {boolean} [options.camelCaseTypes=true] If enabled, `type` will be converted to camelCase from kebab-casae or snake_case
* @param {string} [config.params.page.before] Get the previous page of resources (Cursor-based) - **Note:** Not Supported on kitsu.app
141
141
* @param {string} [config.params.page.after] Get the next page of resources (Cursor-based) - **Note:** Not Supported on kitsu.app
142
142
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
143
-
* @returns {Object} JSON-parsed response
143
+
* @returns {Promise<Object>} JSON-parsed response
144
144
* @example <caption>Getting a resource with JSON:API parameters</caption>
* @param {Object} [config.params] JSON:API request queries. See [#get](#get) for documentation
263
263
* @param {Object} [config.headers] Additional headers to send with the request
264
264
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
* @param {Object} [config.params] JSON:API request queries. See [#get](#get) for documentation
333
333
* @param {Object} [config.headers] Additional headers to send with the request
334
334
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
* @example <caption>Create a post on a user's profile feed</caption>
337
337
* api.create('posts', {
338
338
* content: 'Hello World',
@@ -399,7 +399,7 @@ export default class Kitsu {
399
399
* @param {Object} [config.params] JSON:API request queries. See [#get](#get) for documentation
400
400
* @param {Object} [config.headers] Additional headers to send with the request
401
401
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
* @example <caption>Remove a single resource</caption>
@@ -459,7 +459,7 @@ export default class Kitsu {
459
459
* @param {Object} [config.params] JSON:API request queries. See [#get](#get) for documentation
460
460
* @param {Object} [config.headers] Additional headers to send with the request
461
461
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
462
-
* @returns {Object} JSON-parsed response
462
+
* @returns {Promise<Object>} JSON-parsed response
463
463
* @example <caption>Get the authenticated user's resource</caption>
@@ -488,15 +488,15 @@ export default class Kitsu {
488
488
* **Note** Planned changes to the `get`, `patch`, `post` and `delete` methods in a future major release may make this method redundent. See https://github.com/wopian/kitsu/issues/415 for details.
489
489
*
490
490
* @memberof Kitsu
491
-
* @param {Object} [config] Request configuration
491
+
* @param {Object} config Request configuration
492
492
* @param {string} config.url The URL path of the resource
493
493
* @param {string} config.type The resource type
494
494
* @param {Object|Object[]} [config.body] Data to send in the request
495
495
* @param {string} [config.method] Request method - `GET`, `PATCH`, `POST` or `DELETE` (defaults to `GET`, case-insensitive)
496
496
* @param {Object} [config.params] JSON:API request queries. See [#get](#get) for documentation
497
497
* @param {Object} [config.headers] Additional headers to send with the request
498
498
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details)
0 commit comments