Kitsu
Simple & lightweight JSON-API client for Kitsu.io and other compliant APIs
For breaking changes in 2.0, check the CHANGELOG
Features
- Supports OAuth2 token authentication
- Uses the Promise API
- Retries on network failure
- Timeout handling
Install
yarn add kitsu
npm install kitsu --save
Usage
import Kitsu from 'kitsu'
const Kitsu = require('kitsu')
const kitsu = new Kitsu()
const example = new Kitsu({
apiUrl: 'https://example.org/api',
apiVer: 2
})
kitsu.get('anime').then(res => console.log(res))
kitsu.get('anime/1')
kitsu.get('anime/1/episodes')
kitsu.post('post', {
content: 'some content'
})
kitsu.patch('post', {
id: '1',
content: 'new content'
})
kitsu.remove('post', 1)
More Examples
Docs
You can find the kitsu package documentation here
Check out the Kitsu.io API documentation for all the available
models and their responses and relationships
Contributing
See CONTRIBUTING
Releases
See CHANGELOG
License
All code released under MIT