Annict maintainer announced REST API as deprecated. https://twitter.com/shimbaco/status/1117113862514335744?s=20
This library is no longer maintained. Please use GraphQL instead. https://developers.annict.jp/graphql-api/
annict.js is client library for anime tracking service, Annict. This library supports Node.js and browser.
NPM
npm install annict --save
# or if you use Yarn for package managing
yarn add annict
Bower
bower install annict --save
See also Document for more details.
var Annict = require('annict').default;
var annict = new Annict();
annict.OAuth.token(
CLIENT_ID,
CLIENT_SECRET,
GRANT_TYPE,
REDIRECT_URI,
CODE
)
.then(response => response.json())
.then(token => {
annict.client.setToken(token.access_token);
annict.Work.get({ filter_title: 'shirobako' })
.then(response => response.json())
.then(works => console.log(works));
annict.Me.Record.create({
episode_id: 5013,
comment: 'あぁ^~心がぴょんぴょんするんじゃぁ^~',
rating: 5.0,
share_twitter: 'true',
share_facebook: 'false'
})
.then(response => response.json())
.then(record => console.log(record));
});
<body>
...
<script src='/js/annict.min.js'></script>
<script>
var annict = new Annict();
</script>
</body>
Available methods are partly differ between Node.js and browser.
Copyright (c) 2018 nukosuke
This software is licensed under MIT license.
http://opensource.org/licenses/mit-license.php