Skip to content

Commit

Permalink
chore(release): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wopian committed Aug 4, 2020
1 parent 173277e commit 56b33eb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
24 changes: 12 additions & 12 deletions packages/kitsu-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ All code released under [MIT]

### deattribute

[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")
[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")

Hoists attributes to be top-level

Expand Down Expand Up @@ -171,7 +171,7 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

### deserialise

[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")
[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")

Deserialises a JSON-API response

Expand Down Expand Up @@ -223,7 +223,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### error

[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")
[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")

Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.

Expand Down Expand Up @@ -260,7 +260,7 @@ error({

### filterIncludes

[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")
[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")

Filters includes for the specific relationship requested

Expand Down Expand Up @@ -299,7 +299,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl

### linkRelationships

[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")
[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")

Links relationships to included data

Expand Down Expand Up @@ -337,7 +337,7 @@ Returns **any** Parsed data

### query

[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")
[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")

Constructs a URL query string for JSON:API parameters

Expand Down Expand Up @@ -365,7 +365,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### serialise

[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")
[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")

Serialises an object into a JSON-API structure

Expand All @@ -380,7 +380,7 @@ Serialises an object into a JSON-API structure

#### Examples

Setting camelCaseTypes and pluralTypes options (example shows options used by `kitsu` by default)
Setting camelCaseTypes and pluralTypes options (example shows options used by the `kitsu` package by default)


```javascript
Expand Down Expand Up @@ -411,7 +411,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### splitModel

[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")
[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")

Split model name from the model's resource URL

Expand Down Expand Up @@ -454,7 +454,7 @@ Returns **\[[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference

### camel

[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")
[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")

Converts kebab-case and snake_case into camelCase

Expand Down Expand Up @@ -482,7 +482,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### kebab

[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")
[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")

Converts camelCase into kebab-case

Expand All @@ -500,7 +500,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### snake

[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")
[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")

Converts camelCase into snake_case

Expand Down
2 changes: 1 addition & 1 deletion packages/kitsu-core/types/serialise/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @param {Function} [options.pluralTypes=s=>s] Pluralise types (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package)
* @returns {Object} The serialised data
*
* @example <caption>Setting camelCaseTypes and pluralTypes options (example shows options used by `kitsu` by default)</caption>
* @example <caption>Setting camelCaseTypes and pluralTypes options (example shows options used by the `kitsu` package by default)</caption>
* import { serialise, camel } from 'kitsu-core'
* import pluralize from 'pluralize'
*
Expand Down
28 changes: 14 additions & 14 deletions packages/kitsu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ If you're working with [Kitsu.io]'s API, their [API docs][kitsu.io api docs] lis

### Kitsu

[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")
[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")

Creates a new `kitsu` instance

Expand Down Expand Up @@ -269,7 +269,7 @@ const api = new Kitsu({

#### plural

[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")
[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")

- **See: <https://www.npmjs.com/package/pluralize> for documentation
**
Expand All @@ -291,7 +291,7 @@ api.plural.plural('paper') //=> 'paper'

#### headers

[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")
[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")

Get the current headers or add additional headers

Expand Down Expand Up @@ -322,7 +322,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

#### interceptors

[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")
[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")

- **See: <https://github.com/axios/axios#interceptors> for documentation
**
Expand Down Expand Up @@ -373,13 +373,13 @@ api.interceptors.request.eject(myInterceptor)

#### get

[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")
[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")

Fetch resources (alias `fetch`)

##### Parameters

- `model` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Model to fetch data from
- `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` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional configuration (optional, default `{}`)
- `config.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request
- `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
Expand Down Expand Up @@ -490,13 +490,13 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

#### patch

[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")
[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")

Update a resource (alias `update`)

##### Parameters

- `model` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Model to update data in
- `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)
- `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)&lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Data to send in the request
- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional configuration (optional, default `{}`)
- `config.params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
Expand Down Expand Up @@ -555,13 +555,13 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

#### post

[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")
[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")

Create a new resource (alias `create`)

##### Parameters

- `model` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Model to create a resource under
- `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)
- `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)&lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Data to send in the request
- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional configuration (optional, default `{}`)
- `config.params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
Expand Down Expand Up @@ -600,13 +600,13 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

#### delete

[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")
[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")

Remove a resource (alias `remove`)

##### Parameters

- `model` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Model to remove data from
- `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)
- `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)&lt;[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` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional configuration (optional, default `{}`)
- `config.params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON:API request queries. See [#get](#get) for documentation
Expand All @@ -632,7 +632,7 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

#### self

[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")
[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")

Get the authenticated user's data

Expand Down Expand Up @@ -668,7 +668,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

#### request

[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")
[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")

Send arbitrary requests

Expand Down
Loading

0 comments on commit 56b33eb

Please sign in to comment.