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-core/README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ All code released under [MIT]
127
127
128
128
### deattribute
129
129
130
-
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/deattribute/index.js#L29-L51"Source code on GitHub")
130
+
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/deattribute/index.js#L29-L51"Source code on GitHub")
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/deserialise/index.js#L57-L72"Source code on GitHub")
174
+
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/deserialise/index.js#L57-L72"Source code on GitHub")
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/error/index.js#L27-L33"Source code on GitHub")
226
+
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/error/index.js#L27-L33"Source code on GitHub")
227
227
228
228
Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.
229
229
@@ -260,7 +260,7 @@ error({
260
260
261
261
### filterIncludes
262
262
263
-
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/filterIncludes/index.js#L33-L46"Source code on GitHub")
263
+
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/filterIncludes/index.js#L33-L46"Source code on GitHub")
264
264
265
265
Filters includes for the specific relationship requested
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/linkRelationships/index.js#L97-L117"Source code on GitHub")
302
+
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/linkRelationships/index.js#L97-L117"Source code on GitHub")
303
303
304
304
Links relationships to included data
305
305
@@ -337,7 +337,7 @@ Returns **any** Parsed data
337
337
338
338
### query
339
339
340
-
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/query/index.js#L33-L44"Source code on GitHub")
340
+
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/query/index.js#L33-L44"Source code on GitHub")
341
341
342
342
Constructs a URL query string for JSON:API parameters
[packages/kitsu-core/src/serialise/index.js:210-221](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/serialise/index.js#L210-L221"Source code on GitHub")
368
+
[packages/kitsu-core/src/serialise/index.js:210-221](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/serialise/index.js#L210-L221"Source code on GitHub")
369
369
370
370
Serialises an object into a JSON-API structure
371
371
@@ -380,7 +380,7 @@ Serialises an object into a JSON-API structure
380
380
381
381
#### Examples
382
382
383
-
Setting camelCaseTypes and pluralTypes options (example shows options used by `kitsu` by default)
383
+
Setting camelCaseTypes and pluralTypes options (example shows options used by the `kitsu` package by default)
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/splitModel/index.js#L29-L39"Source code on GitHub")
414
+
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/splitModel/index.js#L29-L39"Source code on GitHub")
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/camel/index.js#L14-L14"Source code on GitHub")
457
+
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/camel/index.js#L14-L14"Source code on GitHub")
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/kebab/index.js#L11-L11"Source code on GitHub")
485
+
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/kebab/index.js#L11-L11"Source code on GitHub")
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu-core/src/snake/index.js#L11-L11"Source code on GitHub")
503
+
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu-core/src/snake/index.js#L11-L11"Source code on GitHub")
Copy file name to clipboardExpand all lines: packages/kitsu-core/types/serialise/index.d.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
* @param {Function} [options.pluralTypes=s=>s] Pluralise types (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package)
10
10
* @returns {Object} The serialised data
11
11
*
12
-
* @example <caption>Setting camelCaseTypes and pluralTypes options (example shows options used by `kitsu` by default)</caption>
12
+
* @example <caption>Setting camelCaseTypes and pluralTypes options (example shows options used by the `kitsu` package by default)</caption>
Copy file name to clipboardExpand all lines: packages/kitsu/README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,7 +222,7 @@ If you're working with [Kitsu.io]'s API, their [API docs][kitsu.io api docs] lis
222
222
223
223
### Kitsu
224
224
225
-
[packages/kitsu/src/index.js:31-482](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L31-L482"Source code on GitHub")
225
+
[packages/kitsu/src/index.js:31-482](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L31-L482"Source code on GitHub")
226
226
227
227
Creates a new `kitsu` instance
228
228
@@ -269,7 +269,7 @@ const api = new Kitsu({
269
269
270
270
#### plural
271
271
272
-
[packages/kitsu/src/index.js:53-54](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L53-L54"Source code on GitHub")
272
+
[packages/kitsu/src/index.js:53-54](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L53-L54"Source code on GitHub")
273
273
274
274
-**See: <https://www.npmjs.com/package/pluralize> for documentation
[packages/kitsu/src/index.js:68-68](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L68-L68"Source code on GitHub")
294
+
[packages/kitsu/src/index.js:68-68](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L68-L68"Source code on GitHub")
[packages/kitsu/src/index.js:113-113](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L113-L113"Source code on GitHub")
325
+
[packages/kitsu/src/index.js:113-113](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L113-L113"Source code on GitHub")
326
326
327
327
-**See: <https://github.com/axios/axios#interceptors> for documentation
[packages/kitsu/src/index.js:191-211](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L191-L211"Source code on GitHub")
376
+
[packages/kitsu/src/index.js:191-211](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L191-L211"Source code on GitHub")
377
377
378
378
Fetch resources (alias `fetch`)
379
379
380
380
##### Parameters
381
381
382
-
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Model to fetch data from
382
+
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Resource to fetch data from. Expected formats are [`:resource`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id/:relationship`](https://jsonapi.org/format/#document-resource-object-relationships) or [`:resource/:id/relationships/:relationship`](https://jsonapi.org/format/#document-resource-object-linkage)
-`config.headers`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request
385
385
-`config.params`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. JSON:API query parameters not listed are supported
[packages/kitsu/src/index.js:246-273](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L246-L273"Source code on GitHub")
493
+
[packages/kitsu/src/index.js:246-273](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L246-L273"Source code on GitHub")
494
494
495
495
Update a resource (alias `update`)
496
496
497
497
##### Parameters
498
498
499
-
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Model to update data in
499
+
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Resource to update data in. Expected formats are [`:resource`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id/:relationship`](https://jsonapi.org/format/#document-resource-object-relationships) or [`:resource/:id/relationships/:relationship`](https://jsonapi.org/format/#document-resource-object-linkage)
500
500
-`body`**([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Data to send in the request
-`config.params`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
[packages/kitsu/src/index.js:303-328](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L303-L328"Source code on GitHub")
558
+
[packages/kitsu/src/index.js:303-328](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L303-L328"Source code on GitHub")
559
559
560
560
Create a new resource (alias `create`)
561
561
562
562
##### Parameters
563
563
564
-
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Model to create a resource under
564
+
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Resource to create. Expected formats are [`:resource`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id/:relationship`](https://jsonapi.org/format/#document-resource-object-relationships) or [`:resource/:id/relationships/:relationship`](https://jsonapi.org/format/#document-resource-object-linkage)
565
565
-`body`**([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Data to send in the request
-`config.params`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
[packages/kitsu/src/index.js:345-378](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L345-L378"Source code on GitHub")
603
+
[packages/kitsu/src/index.js:345-378](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L345-L378"Source code on GitHub")
604
604
605
605
Remove a resource (alias `remove`)
606
606
607
607
##### Parameters
608
608
609
-
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Model to remove data from
609
+
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Resource to remove. Expected formats are [`:resource`](https://jsonapi.org/format/#document-resource-objects), [`:resource/:id/:relationship`](https://jsonapi.org/format/#document-resource-object-relationships) or [`:resource/:id/relationships/:relationship`](https://jsonapi.org/format/#document-resource-object-linkage)
610
610
-`id`**([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\|[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\|[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>)** Resource ID to remove. Pass an array of IDs to delete multiple resources (Bulk Extension)
-`config.params`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
[packages/kitsu/src/index.js:399-408](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L399-L408"Source code on GitHub")
635
+
[packages/kitsu/src/index.js:399-408](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L399-L408"Source code on GitHub")
[packages/kitsu/src/index.js:462-481](https://github.com/wopian/kitsu/blob/3a090660c4999f97a5d158cd2cee495ac8f0bb25/packages/kitsu/src/index.js#L462-L481"Source code on GitHub")
671
+
[packages/kitsu/src/index.js:462-481](https://github.com/wopian/kitsu/blob/173277ea90ed8cc95169a30df0ff4fc06b13547e/packages/kitsu/src/index.js#L462-L481"Source code on GitHub")
0 commit comments