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 May 7, 2020
1 parent bf282af commit 03ec026
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
29 changes: 14 additions & 15 deletions packages/kitsu-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@

<p align=center>Core <a href=http://jsonapi.org>JSON:API</a> serialisation and deserialisation components</p>


<p align=center><a href=https://github.com/wopian/kitsu/blob/master/packages/kitsu-core/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>

#
#

## Features

Expand Down Expand Up @@ -115,7 +114,7 @@ kitsuCore.camel(...)

### deattribute

[packages/kitsu-core/src/deattribute/index.js:29-38](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/deattribute/index.js#L29-L38 "Source code on GitHub")
[packages/kitsu-core/src/deattribute/index.js:29-38](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/deattribute/index.js#L29-L38 "Source code on GitHub")

Hoists attributes to be top-level

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

### deserialise

[packages/kitsu-core/src/deserialise/index.js:57-74](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/deserialise/index.js#L57-L74 "Source code on GitHub")
[packages/kitsu-core/src/deserialise/index.js:57-74](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/deserialise/index.js#L57-L74 "Source code on GitHub")

Deserialises a JSON-API response

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

### error

[packages/kitsu-core/src/error/index.js:7-13](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/error/index.js#L7-L13 "Source code on GitHub")
[packages/kitsu-core/src/error/index.js:7-13](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/error/index.js#L7-L13 "Source code on GitHub")

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

Expand All @@ -224,22 +223,22 @@ Uniform error handling for Axios, JSON:API and internal package errors. Mutated

### filterIncludes

[packages/kitsu-core/src/filterIncludes/index.js:12-25](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/filterIncludes/index.js#L12-L25 "Source code on GitHub")
[packages/kitsu-core/src/filterIncludes/index.js:12-25](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/filterIncludes/index.js#L12-L25 "Source code on GitHub")

Filters includes for the specific relationship

#### Parameters

- `included` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response included object
- `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `opts.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship ID
- `opts.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship type

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The matched includes

### linkRelationships

[packages/kitsu-core/src/linkRelationships/index.js:75-96](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/linkRelationships/index.js#L75-L96 "Source code on GitHub")
[packages/kitsu-core/src/linkRelationships/index.js:75-96](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/linkRelationships/index.js#L75-L96 "Source code on GitHub")

Links relationships to included data

Expand All @@ -250,7 +249,7 @@ Links relationships to included data

### query

[packages/kitsu-core/src/query/index.js:21-32](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/query/index.js#L21-L32 "Source code on GitHub")
[packages/kitsu-core/src/query/index.js:21-32](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/query/index.js#L21-L32 "Source code on GitHub")

Constructs a URL query string for JSON:API parameters

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

### serialise

[packages/kitsu-core/src/serialise/index.js:119-152](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu-core/src/serialise/index.js#L119-L152 "Source code on GitHub")
[packages/kitsu-core/src/serialise/index.js:119-152](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/serialise/index.js#L119-L152 "Source code on GitHub")

Serialises an object into a JSON-API structure

Expand Down Expand Up @@ -309,14 +308,14 @@ 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/8576749f2211c86ac5fcbada6328efdf023c8eb4/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/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub")

Split model name from the model's resource URL

#### Parameters

- `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL path for the model
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `options.resourceCase` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Convert libraryEntries to library-entries or library_entries (default no conversion). To use parameter, import kebab or snake from kitsu-core
- `options.pluralModel` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Pluralise models (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package)

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

### camel

[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/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/bf282af3ea6662f771434821495f27b01c2dc3c8/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 @@ -380,7 +379,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/8576749f2211c86ac5fcbada6328efdf023c8eb4/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/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub")

Converts camelCase into kebab-case

Expand All @@ -398,7 +397,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/8576749f2211c86ac5fcbada6328efdf023c8eb4/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/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub")

Converts camelCase into snake_case

Expand Down
21 changes: 10 additions & 11 deletions packages/kitsu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@

<p align=center>A simple, lightweight & framework agnostic <a href=http://jsonapi.org>JSON:API</a> client for <a href=https://kitsu.io>Kitsu.io</a> and other APIs</p>


<p align=center><a href=https://github.com/wopian/kitsu/blob/master/packages/kitsu/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>

#
#

## Features

Expand Down Expand Up @@ -195,7 +194,7 @@ If you're working with [Kitsu.io]'s API, their [API docs][kitsu.io api docs] lis

### Kitsu

[packages/kitsu/src/index.js:30-342](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L30-L342 "Source code on GitHub")
[packages/kitsu/src/index.js:30-342](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L30-L342 "Source code on GitHub")

Creates a new `kitsu` instance

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

#### plural

[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub")
[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub")

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

#### headers

[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub")
[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub")

Get the current headers or add additional headers

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

#### interceptors

[packages/kitsu/src/index.js:111-111](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L111-L111 "Source code on GitHub")
[packages/kitsu/src/index.js:111-111](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L111-L111 "Source code on GitHub")

Axios Interceptors (alias of `axios.interceptors`)

Expand Down Expand Up @@ -343,7 +342,7 @@ api.interceptors.request.eject(myInterceptor)

#### get

[packages/kitsu/src/index.js:184-203](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L184-L203 "Source code on GitHub")
[packages/kitsu/src/index.js:184-203](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L184-L203 "Source code on GitHub")

Fetch resources (alias `fetch`)

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

#### patch

[packages/kitsu/src/index.js:219-239](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L219-L239 "Source code on GitHub")
[packages/kitsu/src/index.js:219-239](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L219-L239 "Source code on GitHub")

Update a resource (alias `update`)

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

#### post

[packages/kitsu/src/index.js:262-281](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L262-L281 "Source code on GitHub")
[packages/kitsu/src/index.js:262-281](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L262-L281 "Source code on GitHub")

Create a new resource (alias `create`)

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

#### delete

[packages/kitsu/src/index.js:294-312](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L294-L312 "Source code on GitHub")
[packages/kitsu/src/index.js:294-312](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L294-L312 "Source code on GitHub")

Remove a resource (alias `remove`)

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

#### self

[packages/kitsu/src/index.js:334-341](https://github.com/wopian/kitsu/blob/8576749f2211c86ac5fcbada6328efdf023c8eb4/packages/kitsu/src/index.js#L334-L341 "Source code on GitHub")
[packages/kitsu/src/index.js:334-341](https://github.com/wopian/kitsu/blob/bf282af3ea6662f771434821495f27b01c2dc3c8/packages/kitsu/src/index.js#L334-L341 "Source code on GitHub")

Get the authenticated user's data

Expand Down

0 comments on commit 03ec026

Please sign in to comment.