0.0.9 • Published 5 years ago

annict v0.0.9

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

npm version Bower version Build Status Dependency Status devDependency Status

annict.js

アニメ視聴記録サービスAnnictのAPIクライアントライブラリです。

インストール

npm install annict --save

ブラウザの場合

bower install annict --save

使い方

詳しくはドキュメントを参照してください。

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

});

ブラウザ

<body>
    ...
    <script src='/js/annict.min.js'></script>
    <script>
        var annict = new Annict();
    </script>
</body>

Node.jsとブラウザで一部使用できるメソッドに差があります。

ライセンス

Copyright (c) 2018 ぬこすけ
本ソフトウェアはMITライセンスのもと配布します。
http://opensource.org/licenses/mit-license.php

0.0.9

5 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago