Skip to content

Commit

Permalink
更新接口文档,补充结构数据。
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed May 23, 2017
1 parent d1fabb9 commit 3984a12
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions docs/api/v2/user/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,43 @@ GET /users/1?following={user}&follower={user}

其中 `following``follower` 是可选参数,验证用户我是否关注以及是否关注我的用户 id ,默认为当前登陆用户。

##### Headers

```
Status: 200 OK
```

##### Body

```json5
{
"id": 1,
"phone": "187xxxxxxxx",
"email": null,
"created_at": "2017-05-22 06:34:19",
"updated_at":"2017-05-22 06:35:01",
"deleted_at":null,
"following":false, // 获取用户是否关注了指定用户
"follower":false, // 指定用户是否关注获取用户
"datas": [
{
"id":1,
"profile":"sex",
"profile_name":"性别",
"type":"radio",
"default_options":"1:男|2:女|3:其他",
"pivot":{
"user_id":1,
"user_profile_setting_id":1,
"user_profile_setting_data":"1",
"created_at":"2017-05-22 06:34:19",
"updated_at":"2017-05-22 06:34:19"
}
}
]
}
```

### 批量获取指定用户

```
Expand All @@ -69,6 +106,45 @@ GET /users?user=1,2

> user 可以是一个值,或者多个值,多个值的时候用英文半角 `,` 分割。
##### Headers

```
Status: 200 OK
```

##### Body

```json5
[
{
"id": 1,
"phone": "187xxxxxxxx",
"email": null,
"created_at": "2017-05-22 06:34:19",
"updated_at":"2017-05-22 06:35:01",
"deleted_at":null,
"following":false, // 获取用户是否关注了认证用户
"follower":false, // 认证用户是否关注了获取用户
"datas": [
{
"id":1,
"profile":"sex",
"profile_name":"性别",
"type":"radio",
"default_options":"1:男|2:女|3:其他",
"pivot":{
"user_id":1,
"user_profile_setting_id":1,
"user_profile_setting_data":"1",
"created_at":"2017-05-22 06:34:19",
"updated_at":"2017-05-22 06:34:19"
}
}
]
}
]
```

----------

## 数据根信息
Expand Down

0 comments on commit 3984a12

Please sign in to comment.