Skip to content

insdram/neodb-shelf-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

获取自己 NeoDB 上的项目内容

  1. NeoDB API Developer Console 获取 Access Token;
  2. 在 vercel 上部署该项目,设置环境变量 AUTHORIZATION 为第一步获取的 Access Token;
  3. 部署成功后,访问 https://yourdomain/api?type={type}&category={category}{type}wishlist / progress / complete{category}book / movie / tv / music / game / podcast,可以获得 json 数据。

在本地测试

  1. https://github.com/Lyunvy/neodb-shelf-api/blob/9e42e260d064be9ab02dc73d2673609e971394e0/api/index.py#L15 改为
    headers = {'Authorization': 'Bearer xxx', 'Accept': 'application/json'}
    其中 xxx 替换为 Access Token。
  2. 将以下几行代码取消注释 https://github.com/Lyunvy/neodb-shelf-api/blob/9e42e260d064be9ab02dc73d2673609e971394e0/api/index.py#L47-L54
  3. 在项目文件夹打开终端,依次执行
    pip install -r requirements.txt
    python api/index.py
  4. 访问 http://127.0.0.1:8080/?type={type}&category={category}{type}wishlist / progress / complete{category}book / movie / tv / music / game / podcast,可以获得 json 数据。

About

获取自己 NeoDB 上的项目内容

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%