Wondering what’s next for npm?Check out our public roadmap! »

    annict
    TypeScript icon, indicating that this package has built-in type declarations

    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

    0

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    42.2 kB

    Total Files

    22

    Last publish

    Collaborators

    • avatar