用于anilist.co api的python库。
anip的Python项目详细描述
#阿尼皮[构建状态](https://travis-ci.org/twissell--/anipy.svg?branch=master)(https://travis ci.org/twissell-/anipy)
[![科达西徽章](https://api.codacy.com/project/badge/grade/d811779af6ee4c14a03137894930bb04)(https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&;utm_medium=referration&;utm_content=twissell-/anipy&;utm_campaign=badge_grade)
[![科达西徽章](https://api.codacy.com/project/badge/coverage/d811779af6ee4c14a03137894930bb04)(https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&utm_medium=referral&utm_content=twissell-/anipy&utm_campaign=badge_coverage)
[![Python版本](https://img.shields.io/badge/python-3.5-blue.svg)](
[![项目许可证](https://img.shields.io/badge/license mit blue.svg)(https://raw.githubusercontent.com/twissell-/anipy/master/license)
anipy是一个python库,它将[anilist]rest api包装并组织到模块、类和函数中,以便可以快速、轻松、正确地使用它。开箱即用。您可以查看api[官方文档]。蓝名单是一个[乔希之星]的项目**
/>
目前只有alphas版本可用。您可以通过以下方式安装las:
``bash
$git clone https://github.com/twissell-/anipy.git
$cd anipy
$python setup.py确保使用python 3
````
###身份验证
在您可以访问任何anilist资源之前,您必须获得身份验证。[创建客户端]之后,必须使用凭据配置"auth.authenticationprovider"类。
另外,anipy有一个``granttype.refreshttoken```以防您从以前的身份验证中保存了一个refresh token。*注意,只有代码和pin身份验证才能为您提供刷新令牌。*
``python
from anipy import authenticationprovider
from anipy import authentication
authenticationprovider.config('your-client-id','your client secret','your redirect uri')
=身份验证。fromRefreshToken(刷新令牌)
```
即:
`` python
如果显示auth.isexpired:
auth.refresh()
```
他们负责从anilist api获取数据。每个域类都有一个资源,您可以将它们与*数据访问对象*进行比较。所有资源都是**singleton**。
=user.resource().bydisplayname('demo')
```
一些资源也被注入到其他类中,以保持简单(即```animeListResource```)。所以如果你想得到一个用户的反监视列表,你可以这样做:
``python
项目状态。
r/>
-[x]**身份验证**
-[x]授权代码
-[x]授权PIN
-[x]客户端凭据
-[x]**用户**
-[x]基础
-[]**用户列表**
-[]动画列表
-[x]更新观看的片段
-[x]更新重写
-[x]更新注释
-[x]更新列表状态
-[]更新分数(简单)
-[]创建条目
-[]删除条目
-[]管理列表
-[]列表分数类型
-[]动画**
-[]基础
-[]播放
-[]搜索
-[]**manga**
-[]基础
-[]搜索
https://anilist-api.readthedocs.io
[josh-star]:https://github.com/joshstar
[创建客户端]:https://anilist-api.readthedocs.io/en/latest/introduction.html\creating-a-client
[授予类型]:https://anilist-api.readthedocs.io/en/latest/authentication.html哪个授予要使用的类型
[![科达西徽章](https://api.codacy.com/project/badge/grade/d811779af6ee4c14a03137894930bb04)(https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&;utm_medium=referration&;utm_content=twissell-/anipy&;utm_campaign=badge_grade)
[![科达西徽章](https://api.codacy.com/project/badge/coverage/d811779af6ee4c14a03137894930bb04)(https://www.codacy.com/app/dmaggioesne/anipy?utm_source=github.com&utm_medium=referral&utm_content=twissell-/anipy&utm_campaign=badge_coverage)
[![Python版本](https://img.shields.io/badge/python-3.5-blue.svg)](
[![项目许可证](https://img.shields.io/badge/license mit blue.svg)(https://raw.githubusercontent.com/twissell-/anipy/master/license)
anipy是一个python库,它将[anilist]rest api包装并组织到模块、类和函数中,以便可以快速、轻松、正确地使用它。开箱即用。您可以查看api[官方文档]。蓝名单是一个[乔希之星]的项目**
/>
目前只有alphas版本可用。您可以通过以下方式安装las:
``bash
$git clone https://github.com/twissell-/anipy.git
$cd anipy
$python setup.py确保使用python 3
````
###身份验证
在您可以访问任何anilist资源之前,您必须获得身份验证。[创建客户端]之后,必须使用凭据配置"auth.authenticationprovider"类。
另外,anipy有一个``granttype.refreshttoken```以防您从以前的身份验证中保存了一个refresh token。*注意,只有代码和pin身份验证才能为您提供刷新令牌。*
``python
from anipy import authenticationprovider
from anipy import authentication
authenticationprovider.config('your-client-id','your client secret','your redirect uri')
```
即:
`` python
如果显示auth.isexpired:
auth.refresh()
```
他们负责从anilist api获取数据。每个域类都有一个资源,您可以将它们与*数据访问对象*进行比较。所有资源都是**singleton**。
=user.resource().bydisplayname('demo')
```
一些资源也被注入到其他类中,以保持简单(即```animeListResource```)。所以如果你想得到一个用户的反监视列表,你可以这样做:
``python
项目状态。
r/>
-[x]**身份验证**
-[x]授权代码
-[x]授权PIN
-[x]客户端凭据
-[x]**用户**
-[x]基础
-[]**用户列表**
-[]动画列表
-[x]更新观看的片段
-[x]更新重写
-[x]更新注释
-[x]更新列表状态
-[]更新分数(简单)
-[]创建条目
-[]删除条目
-[]管理列表
-[]列表分数类型
-[]动画**
-[]基础
-[]播放
-[]搜索
-[]**manga**
-[]基础
-[]搜索
https://anilist-api.readthedocs.io
[josh-star]:https://github.com/joshstar
[创建客户端]:https://anilist-api.readthedocs.io/en/latest/introduction.html\creating-a-client
[授予类型]:https://anilist-api.readthedocs.io/en/latest/authentication.html哪个授予要使用的类型