哔谱哔谱接口文档

users (用户)

  1. Get an user information(需验证)
    GET /users/:uid/info

volumes (谱册)

  1. List volumes
    GET /volumes

Response

{
  {
    "vid": 1,
    "name": "2018年01月新番精选",
    "cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
    "describe": "I'm having a problem with this.",
    "uid": 1,
    "label":[
        "新番",
        "老番"
      ],
    "status":0,
    "create_date":@date
  },
  {
    "vid": 1,
    "name": "2018年01月新番精选",
    "cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
    "describe": "I'm having a problem with this.",
    "uid": 1,
    "label":[
        "新番",
        "老番"
      ],
    "status":0,
    "create_date":@date
  },
  {
    "vid": 1,
    "name": "2018年01月新番精选",
    "cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
    "describe": "I'm having a problem with this.",
    "uid": 1,
    "label":[
        "新番",
        "老番"
      ],
    "status":0,
    "create_date":@date
  }
}
  1. List volumes created by a user
    GET /users/:uid/volumes

  2. Get a single volume
    GET /volumes/:vid

  3. Create a volume
    POST /volumes

Example

  {
    "name": "2018年01月新番精选",
    "uid": 1
  }

Response

Status: 201 Created
Location: https://api.bipubipu.com/volumes/:vid

  {
    "vid": 1,
    "name": "2018年01月新番精选",
    "cover": "template_url",
    "describe": "none",
    "uid": 1,
    "label":[ ],
    "status":1,
    "create_date":@date
  }
  1. Edit a volume (需验证)
    PATCH /volumes/:vid

Example

  {
    "name": "2018年01月新番精选",
    "cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
    "describe": "I'm having a problem with this.",
    "label":[
        "新番",
        "老番"
      ],
    "status":0
  }

Response

Status: 200 OK

  {
    "vid": 1,
    "name": "2018年01月新番精选",
    "cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
    "describe": "I'm having a problem with this.",
    "uid": 1,
    "label":[
        "新番",
        "老番"
      ],
    "status":0,
    "create_date":@date
  }
  1. Delete a volume (需验证)
    DELETE /volumes/:vid

Response

Status: 204 No Content
  1. List scores in a volume
    GET /volumes/:vid/scores

  2. Add a score to a volume (需验证)
    POST /volumes/:vid/scores

  3. Delete a score from a volume (需验证)
    DELETE /volumes/:vid/scores/:sid

favorite (收藏夹)

  1. List scores in a favorite
    GET /users/:uid/favorite

  2. Add a score to a favorite (需验证)
    POST /users/:uid/favorite/scores

  3. Delete a score from a favorite (需验证)
    DELETE /users/:uid/favorite/scores/:sid

  4. Setting the status of a favorite(需验证)
    PATCH /users/:uid/favorite

collection(谱册收藏夹)

  1. List volumes in a collection
    GET /users/:uid/collection

  2. Add a volume to a collection (需验证)
    POST /users/:uid/collection/scores

  3. Delete a volume from a collection (需验证)
    DELETE /users/:uid/collection/scores/:sid

  4. Setting the status of a collection(需验证)
    PATCH /users/:uid/collection

search (搜索)

  1. Search volumes
    GET /search/volumes

举例:列出所有含有新番标签,状态公开,按创建日期降序排列的谱册
GET /search/volumes?label=新番&status=1&sort=created&order=desc

举例:列出所有状态公开,按被收藏数量降序排列的谱册
GET /search/volumes?status=1&sort=hot&order=desc

Name Type Description
label string Filter volumes based on their labels.
status TINYINT(4) Filter volumes based on their status. deleted:0,public:1,private:2,reviewed:3.Default: 1.
sort string The sort field. Can be hot, created. Default: results are sorted by hot.
order string The sort order if sort parameter is provided. One of asc or desc. Default: desc

你可能感兴趣的:(哔谱哔谱接口文档)