npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

annict

0.0.9 • Public • Published

npm version Bower version Build Status Dependency Status devDependency Status Greenkeeper badge

annict.js

annict.js is client library for anime tracking service, Annict. This library supports Node.js and browser.

Install

NPM

npm install annict --save
# or if you use Yarn for package managing
yarn add annict

Bower

bower install annict --save

Usage

See also Document for more details.

Node.js

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));
 
});

Browser

<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.

License

Copyright (c) 2018 nukosuke
This software is licensed under MIT license. http://opensource.org/licenses/mit-license.php

install

npm i annict

Downloadsweekly downloads

2

version

0.0.9

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability