Comparing version 9.1.3 to 9.1.4
@@ -6,2 +6,20 @@ # Change Log | ||
## [9.1.4](https://github.com/wopian/kitsu/tree/master/packages/kitsu/compare/v9.1.3...v9.1.4) (2020-05-21) | ||
### Chores | ||
* **release:** update documentation ([c2b9e13](https://github.com/wopian/kitsu/tree/master/packages/kitsu/commit/c2b9e13)) | ||
* **release:** update documentation ([e8b37f1](https://github.com/wopian/kitsu/tree/master/packages/kitsu/commit/e8b37f1)) | ||
### Documentation Changes | ||
* **kitsu:** document 1.0/1.1/Extensions pagination strategies ([b54ede6](https://github.com/wopian/kitsu/tree/master/packages/kitsu/commit/b54ede6)) | ||
* **kitsu:** enumerate resourceCase string values ([52c1c82](https://github.com/wopian/kitsu/tree/master/packages/kitsu/commit/52c1c82)) | ||
## [9.1.3](https://github.com/wopian/kitsu/tree/master/packages/kitsu/compare/v9.1.2...v9.1.3) (2020-05-21) | ||
@@ -8,0 +26,0 @@ |
{ | ||
"version": "9.1.3", | ||
"version": "9.1.4", | ||
"name": "kitsu", | ||
@@ -51,3 +51,3 @@ "description": "Simple & lightweight JSON-API client for Kitsu and other compliant APIs", | ||
"axios": "^0.19.0", | ||
"kitsu-core": "^9.1.3", | ||
"kitsu-core": "^9.1.4", | ||
"pluralize": "^8.0.0" | ||
@@ -65,3 +65,3 @@ }, | ||
], | ||
"gitHead": "f231b36c3985820fdbb6e43d75aea512df4e8cab", | ||
"gitHead": "395f88b1e368437964cde4f2e09d5aa4952d2d33", | ||
"devDependencies": { | ||
@@ -68,0 +68,0 @@ "@size-limit/preset-small-lib": "~4.5.0" |
@@ -216,3 +216,3 @@ <h1 align=center>Kitsu</h1> | ||
[packages/kitsu/src/index.js:30-459](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L30-L459 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:30-463](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L30-L463 "Source code on GitHub") | ||
@@ -226,5 +226,5 @@ Creates a new `kitsu` instance | ||
- `options.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the requests | ||
- `options.camelCaseTypes` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, the `type` value will be camelCased, e.g `library-entries` and `library_entries` become `libraryEntries` (optional, default `true`) | ||
- `options.resourceCase` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** `kebab`, `snake` or `none`. If `kebab`, `/libraryEntries` will become `/library-entries`. If `snake`, `/libraryEntries` will become `/library_entries`, If `none`, `/libraryEntries` will be unchanged (optional, default `kebab`) | ||
- `options.pluralize` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If `true`, `/user` will become `/users` in the URL request and `type` will be pluralized in POST, PATCH and DELETE requests (optional, default `true`) | ||
- `options.camelCaseTypes` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If enabled, `type` will be converted to camelCase from kebab-casae or snake_case (optional, default `true`) | ||
- `options.resourceCase` **(`"kebab"` \| `"snake"` \| `"none"`)** Case to convert camelCase to. `kebab` - `/library-entries`; `snake` - /library_entries`;`none`-`/libraryEntries\` (optional, default `kebab`) | ||
- `options.pluralize` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If enabled, `/user` will become `/users` in the URL request and `type` will be pluralized in POST, PATCH and DELETE requests (optional, default `true`) | ||
- `options.timeout` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Set the request timeout in milliseconds (optional, default `30000`) | ||
@@ -265,3 +265,3 @@ - `options.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub") | ||
@@ -288,3 +288,3 @@ - **See: <https://www.npmjs.com/package/pluralize> for documentation | ||
[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub") | ||
@@ -320,3 +320,3 @@ Get the current headers or add additional headers | ||
[packages/kitsu/src/index.js:112-112](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L112-L112 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:112-112](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L112-L112 "Source code on GitHub") | ||
@@ -372,3 +372,3 @@ - **See: <https://github.com/axios/axios#interceptors> for documentation | ||
[packages/kitsu/src/index.js:185-204](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L185-L204 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:189-208](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L189-L208 "Source code on GitHub") | ||
@@ -380,6 +380,10 @@ Fetch resources (alias `fetch`) | ||
- `model` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Model to fetch data from | ||
- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON-API request queries (optional, default `{}`) | ||
- `params.page` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination) | ||
- `params.page.limit` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Max `20` for Kitsu.io except on `libraryEntries` which has a max of `500`) | ||
- `params.page.offset` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to offset the dataset by | ||
- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON-API request queries. Any JSON:API query parameter not mentioned below is supported out of the box. (optional, default `{}`) | ||
- `params.page` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination). All pagination strategies are supported, even if they are not listed below. | ||
- `params.page.limit` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Offset-based) - **Note:** For Kitsu.io, max is `20` except on `libraryEntries` which has a max of `500` | ||
- `params.page.offset` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to offset the dataset by (Offset-based) | ||
- `params.page.number` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Page of resources to return in request (Page-based) - **Note:** Not supported on Kitsu.io | ||
- `params.page.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Page-based and cursor-based) - **Note:** Not supported on Kitsu.io | ||
- `params.page.before` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Get the previous page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
- `params.page.after` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
- `params.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Return a sparse fieldset with only the included attributes/relationships - [JSON:API Sparse Fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets) | ||
@@ -486,3 +490,3 @@ - `params.filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Filter dataset by attribute values - [JSON:API Filtering](http://jsonapi.org/format/#fetching-filtering) | ||
[packages/kitsu/src/index.js:237-257](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L237-L257 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:241-261](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L241-L261 "Source code on GitHub") | ||
@@ -550,3 +554,3 @@ Update a resource (alias `update`) | ||
[packages/kitsu/src/index.js:285-304](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L285-L304 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:289-308](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L289-L308 "Source code on GitHub") | ||
@@ -594,3 +598,3 @@ Create a new resource (alias `create`) | ||
[packages/kitsu/src/index.js:319-348](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L319-L348 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:323-352](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L323-L352 "Source code on GitHub") | ||
@@ -625,3 +629,3 @@ Remove a resource (alias `remove`) | ||
[packages/kitsu/src/index.js:370-377](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L370-L377 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:374-381](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L374-L381 "Source code on GitHub") | ||
@@ -663,3 +667,3 @@ Get the authenticated user's data | ||
[packages/kitsu/src/index.js:438-458](https://github.com/wopian/kitsu/blob/113e60fa60d3029df81c36741703748635470cd6/packages/kitsu/src/index.js#L438-L458 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:442-462](https://github.com/wopian/kitsu/blob/52c1c828aec0eafc07a6c698fdc91664743083a4/packages/kitsu/src/index.js#L442-L462 "Source code on GitHub") | ||
@@ -675,10 +679,10 @@ Send arbitrary requests | ||
- `config.method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Request method - `GET`, `PATCH`, `POST` or `DELETE` (defaults to `GET`, case-insensitive) | ||
- `config.params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON-API request queries | ||
- `config.params.page` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination) | ||
- `config.params.page.limit` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Max `20` for Kitsu.io except on `libraryEntries` which has a max of `500`) | ||
- `config.params.page.offset` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to offset the dataset by | ||
- `config.params.fields` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Return a sparse fieldset with only the included attributes/relationships - [JSON:API Sparse Fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets) | ||
- `config.params.filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Filter dataset by attribute values - [JSON:API Filtering](http://jsonapi.org/format/#fetching-filtering) | ||
- `config.params.sort` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Sort dataset by one or more comma separated attributes (prepend `-` for descending order) - [JSON:API Sorting](http://jsonapi.org/format/#fetching-sorting) | ||
- `config.params.include` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Include relationship data - [JSON:API Includes](http://jsonapi.org/format/#fetching-includes) | ||
- `config.params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON-API request queries. Any JSON:API query parameter not mentioned below is supported out of the box. | ||
- `config.params.page` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination). All pagination strategies are supported, even if they are not listed below. | ||
- `config.params.page.limit` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Offset-based) - **Note:** For Kitsu.io, max is `20` except on `libraryEntries` which has a max of `500` | ||
- `config.params.page.offset` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to offset the dataset by (Offset-based) | ||
- `config.params.page.number` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Page of resources to return in request (Page-based) - **Note:** Not supported on Kitsu.io | ||
- `config.params.page.size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of resources to return in request (Page-based and cursor-based) - **Note:** Not supported on Kitsu.io | ||
- `config.params.page.before` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Get the previous page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
- `config.params.page.after` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
- `config.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The resource type | ||
@@ -685,0 +689,0 @@ - `config.url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The URL path of the resource |
@@ -7,5 +7,5 @@ /** | ||
* @param {Object} [options.headers] Additional headers to send with the requests | ||
* @param {boolean} [options.camelCaseTypes=true] If true, the `type` value will be camelCased, e.g `library-entries` and `library_entries` become `libraryEntries` | ||
* @param {string} [options.resourceCase=kebab] `kebab`, `snake` or `none`. If `kebab`, `/libraryEntries` will become `/library-entries`. If `snake`, `/libraryEntries` will become `/library_entries`, If `none`, `/libraryEntries` will be unchanged | ||
* @param {boolean} [options.pluralize=true] If `true`, `/user` will become `/users` in the URL request and `type` will be pluralized in POST, PATCH and DELETE requests | ||
* @param {boolean} [options.camelCaseTypes=true] If enabled, `type` will be converted to camelCase from kebab-casae or snake_case | ||
* @param {'kebab'|'snake'|'none'} [options.resourceCase=kebab] Case to convert camelCase to. `kebab` - `/library-entries`; `snake` - /library_entries`; `none` - `/libraryEntries` | ||
* @param {boolean} [options.pluralize=true] If enabled, `/user` will become `/users` in the URL request and `type` will be pluralized in POST, PATCH and DELETE requests | ||
* @param {number} [options.timeout=30000] Set the request timeout in milliseconds | ||
@@ -50,2 +50,6 @@ * @param {Object} [options.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
offset: number; | ||
number: number; | ||
size: number; | ||
before: string; | ||
after: string; | ||
}; | ||
@@ -100,6 +104,10 @@ fields: any; | ||
* @param {string} model Model to fetch data from | ||
* @param {Object} [params] JSON-API request queries | ||
* @param {Object} [params.page] [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination) | ||
* @param {number} [params.page.limit] Number of resources to return in request (Max `20` for Kitsu.io except on `libraryEntries` which has a max of `500`) | ||
* @param {number} [params.page.offset] Number of resources to offset the dataset by | ||
* @param {Object} [params] JSON-API request queries. Any JSON:API query parameter not mentioned below is supported out of the box. | ||
* @param {Object} [params.page] [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination). All pagination strategies are supported, even if they are not listed below. | ||
* @param {number} [params.page.limit] Number of resources to return in request (Offset-based) - **Note:** For Kitsu.io, max is `20` except on `libraryEntries` which has a max of `500` | ||
* @param {number} [params.page.offset] Number of resources to offset the dataset by (Offset-based) | ||
* @param {number} [params.page.number] Page of resources to return in request (Page-based) - **Note:** Not supported on Kitsu.io | ||
* @param {number} [params.page.size] Number of resources to return in request (Page-based and cursor-based) - **Note:** Not supported on Kitsu.io | ||
* @param {string} [params.page.before] Get the previous page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* @param {string} [params.page.after] Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* @param {Object} [params.fields] Return a sparse fieldset with only the included attributes/relationships - [JSON:API Sparse Fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets) | ||
@@ -170,2 +178,6 @@ * @param {Object} [params.filter] Filter dataset by attribute values - [JSON:API Filtering](http://jsonapi.org/format/#fetching-filtering) | ||
offset: number; | ||
number: number; | ||
size: number; | ||
before: string; | ||
after: string; | ||
}; | ||
@@ -285,10 +297,10 @@ fields: any; | ||
* @param {string} [config.method] Request method - `GET`, `PATCH`, `POST` or `DELETE` (defaults to `GET`, case-insensitive) | ||
* @param {Object} [config.params] JSON-API request queries | ||
* @param {Object} [config.params.page] [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination) | ||
* @param {number} [config.params.page.limit] Number of resources to return in request (Max `20` for Kitsu.io except on `libraryEntries` which has a max of `500`) | ||
* @param {number} [config.params.page.offset] Number of resources to offset the dataset by | ||
* @param {Object} [config.params.fields] Return a sparse fieldset with only the included attributes/relationships - [JSON:API Sparse Fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets) | ||
* @param {Object} [config.params.filter] Filter dataset by attribute values - [JSON:API Filtering](http://jsonapi.org/format/#fetching-filtering) | ||
* @param {string} [config.params.sort] Sort dataset by one or more comma separated attributes (prepend `-` for descending order) - [JSON:API Sorting](http://jsonapi.org/format/#fetching-sorting) | ||
* @param {string} [config.params.include] Include relationship data - [JSON:API Includes](http://jsonapi.org/format/#fetching-includes) | ||
* @param {Object} [config.params] JSON-API request queries. Any JSON:API query parameter not mentioned below is supported out of the box. | ||
* @param {Object} [config.params.page] [JSON:API Pagination](http://jsonapi.org/format/#fetching-pagination). All pagination strategies are supported, even if they are not listed below. | ||
* @param {number} [config.params.page.limit] Number of resources to return in request (Offset-based) - **Note:** For Kitsu.io, max is `20` except on `libraryEntries` which has a max of `500` | ||
* @param {number} [config.params.page.offset] Number of resources to offset the dataset by (Offset-based) | ||
* @param {number} [config.params.page.number] Page of resources to return in request (Page-based) - **Note:** Not supported on Kitsu.io | ||
* @param {number} [config.params.page.size] Number of resources to return in request (Page-based and cursor-based) - **Note:** Not supported on Kitsu.io | ||
* @param {string} [config.params.page.before] Get the previous page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* @param {string} [config.params.page.after] Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* @param {Object} [headers] Additional headers to send with the request | ||
@@ -343,9 +355,9 @@ * @returns {Object} JSON-parsed response | ||
offset: number; | ||
number: number; | ||
size: number; | ||
before: string; | ||
after: string; | ||
}; | ||
fields: any; | ||
filter: any; | ||
sort: string; | ||
include: string; | ||
}; | ||
}, headers?: any): any; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
629578
378
774
Updatedkitsu-core@^9.1.4