《首页 用户接口:


用户列表

method:get
url: /api/v1/u/list

参数列表

参数名类型必需描述
pageintfalse页数
pageSizeintfalse每页条数

返回结果: Android Code | IOS Code

[
  {
    "userId": "string //用户id",
    "userName": "string //用户名",
    "friends": [
      {
        "userId": "string //用户id",
        "userName": "string //用户名"
      }
    ],
    "readBooks": [
      {
        "bookId": "long //图书id",
        "bookName": "string //图书名称"
      }
    ],
    "isFollow": "boolean //是否关注"
  }
]

用户信息

method:get
url: /api/v1/u/info

参数列表

参数名类型必需描述
userIdstringtrue用户id

返回结果: Android Code | IOS Code

{
  "userId": "string //用户id",
  "userName": "string //用户名",
  "friends": [
    {
      "userId": "string //用户id",
      "userName": "string //用户名"
    }
  ],
  "readBooks": [
    {
      "bookId": "long //图书id",
      "bookName": "string //图书名称"
    }
  ],
  "isFollow": "boolean //是否关注"
}

收藏图书

method:post
url: /api/v1/u/favorite

参数列表

参数名类型必需描述
bookIdstringtrue图书id

返回结果: Android Code | IOS Code

{
  "bookId": "long //图书id",
  "bookName": "string //图书名称",
  "storeCount": "int //馆藏数量",
  "pictures": "string[] //图片",
  "owner": {
    "userId": "string //用户id",
    "userName": "string //用户名",
    "friends": [
      {
        "userId": "string //用户id",
        "userName": "string //用户名"
      }
    ],
    "readBooks": [
      {
        "bookId": "long //图书id",
        "bookName": "string //图书名称"
      }
    ],
    "isFollow": "boolean //是否关注"
  }
}