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 11, 2022
1 parent 71ebcd7 commit a1a5e2d
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 59 deletions.
22 changes: 11 additions & 11 deletions packages/kitsu-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ kitsuCore.camel(...)

### deattribute

[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub")

Hoists attributes to be top-level

Expand Down Expand Up @@ -155,7 +155,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub")

Deserialises a JSON-API response

Expand Down Expand Up @@ -205,7 +205,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/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 @@ -242,7 +242,7 @@ error({

### filterIncludes

[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub")

Filters includes for the specific relationship requested

Expand Down Expand Up @@ -282,7 +282,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub")

Links relationships to included data

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

### query

[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/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 @@ -348,7 +348,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### serialise

[packages/kitsu-core/src/serialise/index.js:249-260](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu-core/src/serialise/index.js#L249-L260 "Source code on GitHub")
[packages/kitsu-core/src/serialise/index.js:249-260](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/serialise/index.js#L249-L260 "Source code on GitHub")

Serialises an object into a JSON-API structure

Expand Down Expand Up @@ -393,7 +393,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/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 @@ -435,7 +435,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub")

Converts kebab-case and snake_case into camelCase

Expand All @@ -461,7 +461,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub")

Converts camelCase into kebab-case

Expand All @@ -479,7 +479,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/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/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/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub")

Converts camelCase into snake_case

Expand Down
4 changes: 2 additions & 2 deletions packages/kitsu-core/types/serialise/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
* const output = serialise(model, obj, 'PATCH')
*/
export function serialise(type: string, data?: any | any[], method?: string, options?: {
camelCaseTypes: Function;
pluralTypes: Function;
camelCaseTypes?: Function;
pluralTypes?: Function;
}): any;
4 changes: 2 additions & 2 deletions packages/kitsu-core/types/splitModel/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
* // [ 'libraryEntries', 'library_entries' ]
*/
export function splitModel(url: string, options?: {
resourceCase: Function;
pluralModel: Function;
resourceCase?: Function;
pluralModel?: Function;
}): [string, string];
20 changes: 10 additions & 10 deletions packages/kitsu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,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-474](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L30-L474 "Source code on GitHub")
[packages/kitsu/src/index.js:30-476](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L30-L476 "Source code on GitHub")

Creates a new `kitsu` instance

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

#### plural

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

* **See**: <https://www.npmjs.com/package/pluralize> for documentation
* **See**: [Kitsu](#kitsu) constructor options for disabling pluralization
Expand All @@ -272,7 +272,7 @@ api.plural.plural('paper') //=> 'paper'

#### headers

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

Get the current headers or add additional headers

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

#### interceptors

[packages/kitsu/src/index.js:112-112](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L112-L112 "Source code on GitHub")
[packages/kitsu/src/index.js:112-112](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L112-L112 "Source code on GitHub")

* **See**: <https://github.com/axios/axios#interceptors> for documentation

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

#### get

[packages/kitsu/src/index.js:198-218](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L198-L218 "Source code on GitHub")
[packages/kitsu/src/index.js:198-218](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L198-L218 "Source code on GitHub")

Fetch resources (alias `fetch`)

Expand Down Expand Up @@ -471,7 +471,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
#### patch
[packages/kitsu/src/index.js:251-272](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L251-L272 "Source code on GitHub")
[packages/kitsu/src/index.js:251-272](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L251-L272 "Source code on GitHub")
Update a resource (alias `update`)
Expand Down Expand Up @@ -529,7 +529,7 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
#### post
[packages/kitsu/src/index.js:300-319](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L300-L319 "Source code on GitHub")
[packages/kitsu/src/index.js:300-319](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L300-L319 "Source code on GitHub")
Create a new resource (alias `create`)
Expand Down Expand Up @@ -570,7 +570,7 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
#### delete
[packages/kitsu/src/index.js:334-363](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L334-L363 "Source code on GitHub")
[packages/kitsu/src/index.js:334-363](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L334-L363 "Source code on GitHub")
Remove a resource (alias `remove`)
Expand Down Expand Up @@ -598,7 +598,7 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
#### self
[packages/kitsu/src/index.js:385-392](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L385-L392 "Source code on GitHub")
[packages/kitsu/src/index.js:385-392](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L385-L392 "Source code on GitHub")
Get the authenticated user's data
Expand Down Expand Up @@ -634,7 +634,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
#### request
[packages/kitsu/src/index.js:453-473](https://github.com/wopian/kitsu/blob/d0a0faa5db058d5a61d4be1dc10fd64d0d9193db/packages/kitsu/src/index.js#L453-L473 "Source code on GitHub")
[packages/kitsu/src/index.js:453-475](https://github.com/wopian/kitsu/blob/71ebcd7f6241d5a4833360a1271bbb334bfd8f08/packages/kitsu/src/index.js#L453-L475 "Source code on GitHub")
Send arbitrary requests
Expand Down
68 changes: 34 additions & 34 deletions packages/kitsu/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ export default class Kitsu {
headers: any;
axios: import("axios").AxiosInstance;
fetch: (model: string, params?: {
page: {
limit: number;
offset: number;
number: number;
size: number;
before: string;
after: string;
page?: {
limit?: number;
offset?: number;
number?: number;
size?: number;
before?: string;
after?: string;
};
fields: any;
filter: any;
sort: string;
include: string;
fields?: any;
filter?: any;
sort?: string;
include?: string;
}, headers?: any) => any;
update: (model: string, body: any | any[], headers?: any) => any | any[];
create: (model: string, body: any | any[], headers?: any) => any | any[];
Expand Down Expand Up @@ -178,18 +178,18 @@ export default class Kitsu {
* })
*/
get(model: string, params?: {
page: {
limit: number;
offset: number;
number: number;
size: number;
before: string;
after: string;
page?: {
limit?: number;
offset?: number;
number?: number;
size?: number;
before?: string;
after?: string;
};
fields: any;
filter: any;
sort: string;
include: string;
fields?: any;
filter?: any;
sort?: string;
include?: string;
}, headers?: any): any;
/**
* Update a resource (alias `update`)
Expand Down Expand Up @@ -285,8 +285,8 @@ export default class Kitsu {
* })
*/
self(params?: {
fields: any;
include: string;
fields?: any;
include?: string;
}, headers?: any): any;
/**
* Send arbitrary requests
Expand Down Expand Up @@ -350,16 +350,16 @@ export default class Kitsu {
request({ body, method, params, type, url }?: {
url: string;
type: string;
body: any | any[];
method: string;
params: {
page: {
limit: number;
offset: number;
number: number;
size: number;
before: string;
after: string;
body?: any | any[];
method?: string;
params?: {
page?: {
limit?: number;
offset?: number;
number?: number;
size?: number;
before?: string;
after?: string;
};
};
}, headers?: any): any;
Expand Down

0 comments on commit a1a5e2d

Please sign in to comment.