Kitsu
Simple, lightweight & framework agnostic JSON-API client for Kitsu.io and other API backends
For breaking changes in 3.0, check the CHANGELOG
Features
- Fully JSON-API complient
- Works in Node and the web
- Uses the Promise API
- Timeout handling
Install
Yarn
yarn add kitsu
NPM 5
npm install kitsu
Usage
import Kitsu from 'kitsu'
const Kitsu = require('kitsu')
const api = new Kitsu()
const api = new Kitsu({
baseURL: 'https://api.example.org',
version: 2
})
api.get('anime').then(res => console.log(res))
api.get('anime/1')
api.get('anime/1/episodes')
api.create('post', {
content: 'some content'
})
api.update('post', {
id: '1',
content: 'new content'
})
api.remove('post', 1)
const { id } = await kitsu.get('users', {
filter: { id: 2 }
})
More Examples
Docs
You can find the kitsu package documentation here
Check out the Kitsu.io API documentation for all the available
models with their attributes and relationships
Contributing
See CONTRIBUTING
Releases
See CHANGELOG
License
All code released under MIT