无标题文章

# 一度蜜v3.0协议

---

# 交互协议

[TOC]

## 协议说明

### 请求参数

下表列出了v3.0版协议需要的内置请求参数,对于必选的参数在所有请求中都需要填写

| 名称        | 必选  | 类型    | 说明                                        |

|-------------|:-----:|:-------:|----------------------------------------------|

| _client    | yes  | int    | 客户端类型 7:android 8:ios                |

| _token      | yes  | string  | 服务器下发给终端的用户标识,如果有就需要传    |

| _cver      | yes  | string  | 客户端版本                                  |

| _channel    | no    | string  | 渠道ID                                  |

| _device    | no    | string  | 终端型号                                    |

| _screen    | no    | string  | 终端分辨率                                  |

| offset      | no    | int    | 分页请求的起始位置,默认值为0                |

| limit      | no    | int    | 分页请求的获取数据条数,默认值为20          |

### 响应

#### 公共返回数据

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{array of objects}

]

}

}

```

**参数说明**

| 名称        | 必选  | 类型    | 说明                                        |

|-------------|:-----:|:-------:|----------------------------------------------|

| code        | yes  | int    | The HTTP status code of the returned result  |

| status      | yes  | string  | A string description of the call status      |

| data        | yes  | object  | The results returned by the call            |

data 包括如下参数

| 名称        | 必选  | 类型              | 说明                                              |

|-------------|:-----:|:------------------:|----------------------------------------------------|

| offset      | no    | int                | The requested offset (skipped results) of the call |

| limit      | no    | int                | The requested result limit                        |

| total      | no    | int                | The total number of results available              |

| count      | no    | int                | The total number of results returned by this call  |

| results    | no    | Array[entity type] | The list of entities returned by the call          |

## 基础功能

### 上传图片

**URL**

```

POST /v3/upload/img

```

**请求参数**

* http body: 图片文件

* http Content-Type: 图片文件对应的 Content-Type, 如: image/png, image/jpeg

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"url": "/assets/1.png"

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| url          | yes  | string | 图片 url          |

## 客户端

### Android

#### 客户端升级

**URL**

```

GET /v3/client/android/upgrade

```

**请求参数**

| 名称        | 必选  | 类型 | 说明      |

|-------------|:-----:|:----:|------------|

> 服务器使用参数: _cver 判断是否有新本.

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"versionCode": 2,

"versionName": "2.0",

"releaseNotes": "1. update ui \n 2. update version",

"apkUrl": "http://ip:port/apk/a.apk",

"lowestUpgradeVersion": "2.0",

"createdOn": "201409041352"

}

}

```

**返回字段说明**

| 名称                | 必选 | 类型  | 说明        |

|----------------------|:----:|:------:|--------------|

| versionCode          | yes  | int    | 终端版本号  |

| versionName          | yes  | string | 终端版本名  |

| releaseNotes        | yes  | string | 发布说明    |

| apkUrl              | yes  | string | apk 文件 url |

| lowestUpgradeVersion | yes  | Int    | 最低兼容版本 |

| createdOn            | yes  | string | 版本创建时间 |

**其他状态**

| code |        status                    |

|------|-----------------------------------|

| 404  | 已是最新版本.                    |

#### 获取客户端配置信息

**URL**

```

GET /v3/client/android/config?_client=&_cver=&_token

```

**请求参数**

| 名称        | 必选  | 类型 | 说明      |

|-------------|:-----:|:----:|------------|

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"apkUrl": "http://ip:port/apk/a.apk",

"startMap": "/a.png",

"nav": {

"yidu": [

{

"type": 1,

"name": "推荐",

"tagId": "101",

"idx": 1

},

{

"type": 2,

"name": "晒图",

"tagId": "201",

"idx": 5

},

{

"type": 3,

"name": "排行",

"tagId": null,

"idx": 6,

"children": [

{

"type": 1,

"name": "热文周榜",

"tagId": "401",

"idx": 1

},

{

"type": 4,

"name": "蜜柚周榜",

"tagId": "402",

"idx": 2

}

]

}

],

"subscribe":[],

"smartDevice":[

{

"name": "精选",

"tagId": "101",

"brands":[

{

"name": "google"

}

],

"idx": 1

},

{

"name": "穿戴",

"tagId": "201",

"idx": 5

}

]

},

"settings":{

"downloadPromptSwitch": "0",

"choicenessAppSwitch": "0"

}

}

}

```

**返回字段说明**

| 名称            | 必选 | 类型  | 说明                                              |

|------------------|:----:|:------:|----------------------------------------------------|

| apkUrl          | yes  | String | 终端包的url                                          |

| startMap        | yes  | String | 启动图url                                          |

| nav.type        | yes  | int    | 菜单类型 1:文章,2:晒图,3:排行,4: 用户          |

| nav.name        | yes  | string | 菜单显示名称                                      |

| nav.tagId        | no  | long  | 此菜单点击时传给服务器的标签id,如果有子菜单则为空 |

| nav.brands.name  | no  | long  | 酷品标签的品牌名称                                |

| nav.idx          | yes  | int    | 菜单项的排列顺序 下标从“1”开始                    |

| settings        | no  | object | 终端设置 "key":"value"                            |

### IOS

#### 客户端升级

**URL**

```

GET /v3/client/ios/upgrade

```

**请求参数**

| 名称        | 必选  | 类型 | 说明      |

|-------------|:-----:|:----:|------------|

> 服务器使用参数: _cver 判断是否有新本.

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"appId": "876594",

"version": "v3.0",

"releaseNotes": "",

"lowestUpgradeVersion": "v3.0",

"createdOn": "20141107090808"

}

}

```

**返回字段说明**

| 名称                | 必选 | 类型  | 说明              |

|----------------------|:----:|:------:|-------------------|

| appId                | yes  | string | app store trackId |

| version              | yes  | string | 终端最新版本号    |

| releaseNotes        | yes  | string | 发布说明          |

| lowestUpgradeVersion | yes  | string | 最低兼容版本号    |

| createdOn            | yes  | string | 创建时间          |

**其他状态**

| code |        status                    |

|------|-----------------------------------|

| 404  | 已是最新版本.                    |

#### 获取客户端配置信息

**URL**

```

GET /v3/client/ios/config?_client=&_cver=&_token

```

**请求参数**

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"startMap": "/a.png",

"nav": {

"yidu": [

{

"type": 1,

"name": "推荐",

"tagId": "101",

"idx": 1

},

{

"type": 2,

"name": "晒图",

"tagId": "201",

"idx": 5

},

{

"type": 3,

"name": "排行",

"tagId": null,

"idx": 6,

"children": [

{

"type": 1,

"name": "热文周榜",

"tagId": "401",

"idx": 1

},

{

"type": 1,

"name": "蜜柚周榜",

"tagId": "402",

"idx": 2

}

]

}

],

"subscribe":[],

"smartDevice":[

{

"name": "精选",

"tagId": "101",

"brands":[

{

"name": "google"

}

],

"idx": 1

},

{

"name": "穿戴",

"tagId": "201",

"idx": 5

}

]

},

"settings":{

"downloadPromptSwitch": "0",

"choicenessAppSwitch": "0"

}

}

}

```

**返回字段说明**

| 名称            | 必选 | 类型  | 说明                                              |

|------------------|:----:|:------:|----------------------------------------------------|

| startMap        | yes  | String | 启动图url                                          |

| nav.type        | yes  | int    | 菜单类型 1:文章,2:晒图,3:排行,4: 用户          |

| nav.name        | yes  | string | 菜单显示名称                                      |

| nav.tagId        | no  | long  | 此菜单点击时传给服务器的标签id,如果有子菜单则为空 |

| nav.brands.name  | no  | long  | 酷品标签的品牌名称                                |

| nav.idx          | yes  | int    | 菜单项的排列顺序 下标从“1”开始                    |

| settings        | no  | object | 终端设置 "key":"value"                            |

## 用户

### 用户注册

**URL**

```

POST /v3/users/register?_client=&_cver=

```

**请求参数**

* http content_type: application/json

```

#!json

{

"name": "用户名",

"nickName": "昵称",

"password": "密码",

"cat": 1

"imei": "终端imei",

"imsi": "终端imsi",

"local": "北京|海淀"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明                          |

|--------------|:----:|:------:|--------------------------------|

| name        | no  | string | 用户名                        |

| nickName    | no  | string | 昵称                          |

| password    | yes  | string | 密码                          |

| cat          | yes  | int    | 注册类型 0:默认 1:用户名密码 |

| imei        | no  | string | 终端imei号                    |

| imsi        | no  | string | 终端imsi号                    |

| local        | no  | string | 地域信息  省\|市              |

| _token      | no  | string | 用于绑定的默认用户的token      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"token": "5451b423c0a9334c9c249567",

"id": "5451b423c0a9334c9c249567"

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明                      |

|--------------|:----:|:------:|----------------------------|

| token        | yes  | string | 服务器下发给终端的用户标识 |

| id          | yes  | string | 用户ID                    |

### 用户登录

**URL**

```

POST /v3/users/login?_client=&_cver=

```

**请求参数**

* http content_type: application/json

```

#!json

{

"name": "用户名",

"password": "密码",

"cat": 1

"imei": "终端imei",

"imsi": "终端imsi"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| name        | yes  | string | 用户名    |

| password    | no  | string | 密码    |

| cat          | yes  | int    | 注册类型 1:用户名密码 2:微信 3:qq 4:新浪微博 |

| imei        | no  | string | 终端imei号 |

| imsi        | no  | string | 终端imsi号 |

| _token        | no  | string | 用于绑定的默认用户的token |

>ps: 如果是第三方登录(cat 为2,3,4)则name为从第三方获取的account

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"token": "5451b423c0a9334c9c249567",

"id": "5451b423c0a9334c9c249567"

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| token        | yes  | string | 服务器下发给终端的用户标识  |

| id          | yes  | string | 用户ID  |

### 修改用户信息

**URL**

```

POST /v3/users/me?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"nickName": "昵称",

"signature": "签名",

"birth": "20140504",

"gender": 1,

"email": "xxx.xxx@xxx",

"phone": "135xxxxxxx",

"avatar": "/assets/1.png"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| nickName    | no  | string | 用户昵称    |

| signature    | no  | string | 用户签名    |

| birth        | no  | string | 生日 格式:20110504 |

| gender      | no  | int    | 性别 0:未知 1:男 2: 女 |

| email        | no  | string | 邮箱 |

| phone        | no  | string | 手机号 |

| avatar      | no  | string | 用户头像 |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {}

}

```

### 修改用户密码

**URL**

```

POST /v3/users/me/pwd?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"originalPwd": "原密码",

"newPwd": "新密码"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| originalPwd  | no  | string | 原密码    |

| newPwd      | no  | string | 新密码    |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {}

}

```

### 获取用户信息

**URL**

```

GET /v3/users/:id?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id      | yes  | string | 用户ID        |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

”name": "账号名",

"nickName": "赤脚老怪",

"signature": "众神死亡的草原上,野花一片,远在远方的风比远方更远.....",

"birth": "19820117",

"gender": 1,

"phone": "13511111111",

"email": "xxx@winsland.cn",

"avatar": "/assets/1.png",

"type": 3,

"hasSub": true,

"level": {

"score": 150,

"currentLevelScore": 100,

"nextLevelScore": 200,

"current": 2

},

"fans": {

"count": 20

},

"subs": {

"count": 20

},

"imgs": {

"count": 15

},

"msgs": {

"count": 5

},

"forumThreads": {

"count": 10

},

"campaigns": {

"count": 20

},

"collections": {

"count": 20

},

"articles": {

"count": 20

}

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| name            | yes  | string | 账号名          |

| nickName        | yes  | string | 用户昵称          |

| signature      | yes  | string | 用户签名          |

| birth          | no  | string | 生日              |

| gender          | no  | int    | 性别 0:未知 1:男 2:女              |

| phone          | no  | string | 手机号码          |

| email          | no  | string | 邮箱              |

| avatar        | no  | string | 头像url            |

| type        | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

| hasSub        | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| level.score          | yes  | int | 当前积分        |

| level.current      | yes  | int | 当前级别      |

| level.nextLevelScore  | yes  | int | 下一级所需积分        |

| level.currentLevelScore  | yes  | int | 当前级别起始积分        |

| fans.count        | yes  | int | 粉丝数        |

| subs.count        | yes  | int | 订阅数,包括标签和用户        |

| imgs.count        | yes  | int | 图集数        |

| msgs.count        | yes  | int | 消息数        |

| forumThreads.count | yes  | int | 发表的话题数        |

| campaigns.count    | yes  | int | 参加的活动数        |

| collections.count    | yes  | int | 收藏数,包括文章,话题,酷品        |

| articles.count    | yes  | int | 发表的文章数        |

### 获取用户消息

**URL**

```

GET /v3/users/me/messages?_client=&_cver=&_token=

```

**请求参数**

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"sender": {

"id": "5451b379d933d9c43142d224",

"nickName": "赤脚老怪",

"avatar": "/assets/1.png",

"type": 3

},

"article": "5451b379d933d9c43142d224",

"forumThread": "5451b379d933d9c43142d224",

"smartDevice": "5451b379d933d9c43142d224",

"sharedImg": "5451b379d933d9c43142d224",

"campaign": "5451b379d933d9c43142d224",

"type": 1,

"content": "消息内容",

"createdOn": "消息产生时间"

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| sender.id        | no  | string | 消息产生者的用户id            |

| sender.nickName      | no  | string | 消息产生者的昵称            |

| sender.avatar      | no  | string | 消息产生者的用户头像url            |

| sender.type      | no  | int    | 消息产生者的用户类型            |

| article          | no  | string | 消息相关的文章ID            |

| forumThread          | no  | string | 消息相关的话题ID            |

| smartDevice          | no  | string | 消息相关的酷品ID            |

| sharedImg          | no  | string | 消息相关的晒图ID            |

| campaign          | no  | string | 消息相关的活动ID            |

| type              | yes | int    | 消息类型  1: 系统通知  2:用户消息          |

| content          | yes | string | 消息内容          |

| createdOn        | yes | String | 消息产生时间          |

### 清除用户消息

**URL**

```

DELETE /v3/users/me/messages?_client=&_cver=&_token=&msg=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| msg          | no  | string | 用户消息ID 此参数不传表示清空全部消息      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 用户反馈

**URL**

```

POST /v3/users/me/feedback?_client=&_cver=&_token=

```

* http content_type: application/json

**请求参数**

```

#!json

{

"content": "xxxxxxx"

}

```

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| content      | yes  | string | 用户反馈的内容            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 用户收藏

**URL**

```

POST /v3/users/me/:cat/collections?id=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 收藏资源的ID            |

| cat          | yes  | string    | 收藏资源类型 articles:文章 devices:酷品 forum_threads:话题            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 用户取消收藏

**URL**

```

DELETE /v3/users/me/:cat/collections?id=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 收藏资源的ID            |

| cat          | yes  | string    | 收藏资源类型 articles:文章 devices:酷品 forum_threads:话题            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 获取用户收藏列表

**URL**

```

GET /v3/users/:id/:cat/collections?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID            |

| cat          | yes  | string    | 收藏资源类型 articles:文章 devices:酷品 forum_threads:话题            |

**返回结果**

* cat = articles            见[文章列表响应数据](#获取文章列表)

* cat = devices            见[酷品列表响应数据](#获取酷品列表)

* cat = forum_threads      见[话题列表响应数据](#获取版面下话题列表)

### 用户分享

**URL**

```

POST /v3/users/me/:cat/share?id=&channel=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 收藏资源的ID            |

| cat          | yes  | string    | 收藏资源类型 articles:文章 devices:酷品 imgs:晒图 campaigns:活动            |

| channel      | yes  | int      | 分享渠道  1:微信朋友圈 2:微信好友 3:qq空间 4:新浪微博 5:对面好友            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 获取用户参加的活动列表

**URL**

```

GET /v3/users/:id/campaigns?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"name": "活动标题",

"coverfigure": "/assets/1.png",

"status": 1,

"reg": {

"status": 1,

"count": 2900

},

"url": "http://ip:port/detail"

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 活动ID            |

| name        | yes  | string | 活动标题            |

| coverfigure  | yes  | string | 活动封面图url            |

| status      | yes  | int    | 活动状态 1:未开始 2:进行中 3:已结束    |

| reg.status  | yes  | int  | 报名状态 0: 不能报名 1: 可以报名    |

| reg.count      | yes  | int    | 报名人数    |

| url      | yes  | String    | 活动详情页url    |

### 获取用户列表

**URL**

```

GET /v3/users?q=&tag=&user=&_client=&_cver=&_token=&sort=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag          | no  | string | 标签ID      |

| user        | no  | string | 用户ID,用来查询此用户粉丝列表      |

| q            | no  | string | 搜索关键字  |

| sort        | no  | string | 排序参数  默认排序为 可订阅用户>创建时间倒叙。 time|-time:按照用户创建时间排序    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"signature": "签名",

"avatar": "/assets/1.png",

"type": 1,

"score": 2000,

"hasSub": true,

"fans": {

"count": 1500

}

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID        |

| nickName        | yes  | string | 用户昵称            |

| signature        | yes  | string | 签名            |

| avatar      | yes  | string | 用户头像url            |

| type        | yes  | int    | 用户类型            |

| score        | yes  | int    | 积分            |

| hasSub        | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| fans.count  | yes  | int    | 粉丝数            |

### 获取某个用户的订阅用户列表

**URL**

```

GET /v3/users/:id/subscribes/users?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID        |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"signature": "签名",

"avatar": "/assets/1.png",

"type": 1,

"hasSub": true,

"score": 2000,

"hasSub": true,

"fans": {

"count": 1500

}

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID        |

| nickName    | yes  | string | 用户昵称            |

| avatar      | yes  | string | 用户头像url            |

| type        | yes  | int    | 用户类型            |

| hasSub        | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| score        | yes  | int    | 积分            |

| hasSub        | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| fans.count  | yes  | int    | 粉丝数            |

### 获取某个用户的订阅的文章标签列表

**URL**

```

GET /v3/users/:id/subscribes/tags?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型    | 说明        |

|--------------|:----:|:-------:|--------------|

| id          | yes  | string | 用户ID        |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"name": "标签名称",

"icon": "/assets/1.png",

"beSub": true,

"hasSub": true,

"newestArticle": {

"id": "文章ID",

"title": "文章标题"

}

}

]

}

}

```

**返回参数说明**

| 名称                | 必选 | 类型    | 说明                                |

|----------------------|:----:|:-------:|-------------------------------------|

| id                  | yes  | string  | 标签ID                              |

| name                | yes  | string  | 标签名称                            |

| icon                | yes  | string  | 标签图标url                        |

| beSub                | yes  | boolean | 是否可订阅 true:可以 false:不可以 |

| hasSub              | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| newestAriticle.id    | yes  | string  | 标签下最新发表的文章ID              |

| newestAriticle.title | yes  | string  | 标签下最新发表的文章标题            |

### 订阅标签\|作者

**URL**

```

POST /v3/users/me/subscribes?tags=&users&_client=&_cver=&_token=

```

**请求参数**

**参数说明**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tags        | no  | string | 标签ID 多个ID以"\|"分割    |

| users      | no  | string | 用户ID 多个ID以"\|"分割    |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 取消订阅标签\|作者

**URL**

```

DELETE /v3/users/me/subscribes?tags=&users=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tags      | no  | string | 标签ID 多个ID以"\|"分割    |

| users      | no  | string | 用户ID 多个ID以"\|"分割    |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {}

}

```

### 获取用户订阅的文章列表

**URL**

```

GET  /v3/users/:id/subscribes?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | no  | string | 用户ID    |

**返回结果**

见[文章列表响应数据](#获取文章列表)

## 文章

### 获取文章列表

**URL**

```

GET /v3/articles?q=&tag=&user=&_client=&_cver=&_token=&status=&platform_status=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| tag          | no  | string | 标签Id              |

| user        | no  | string | 作者ID              |

| q            | no  | string | 搜索关键字          |

| status      | no  | int    | 文章状态 0: 下线 1: 上线  不传表示全部    |

| platform_status      | no  | int    | 文章平台状态 0: 草稿 1: 提交  不传表示全部    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"coverfigure": "/assets/1.png",

"android": {

"videoCnt": 1

},

"ios": {

"videoCnt": 1

},

"attitudes": {

"score": 130

},

"isCollected": false

}

]

}

}

```

**返回字段说明**

| 名称            | 必选 | 类型    | 说明                                |

|------------------|:----:|:-------:|-------------------------------------|

| id              | yes  | string  | 文章ID                              |

| title            | yes  | string  | 文章标题                            |

| user            | yes  | object  | 作者信息                            |

| coverfigure      | yes  | string  | 文章封面图url                      |

| web.videoCnt    | yes  | int    | web 下视频数量                      |

| android.videoCnt | yes  | int    | andorid 下视频数量                  |

| ios.videoCnt    | yes  | int    | ios 下视频数量                      |

| attitudes.score  | yes  | int    | 人气数(态度分)                    |

| isCollected      | yes  | boolean | 收藏标识 false:未收藏 true:已收藏 |

**user包括**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID            |

| nickName        | yes  | string | 用户昵称            |

| avatar      | yes  | String | 头像url            |

| type        | yes  | int    | 用户类型            |

### 获取文章标签

**URL**

```

GET /v3/articles/tags?q=&be_sub=true&ids=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型    | 说明        |

|--------------|:----:|:-------:|--------------|

| be_sub      | no  | boolean | 是否可订阅  |

| q            | no  | string  | 搜索关键字  |

| ids          | no  | string  | 标签id 多个id以“\|”分隔  |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"name": "标签名称",

"icon": "/assets/1.png",

"beSub": true,

"hasSub": true,

"newestArticle": {

"id": "文章ID",

"title": "文章标题"

},

"subs": {

"count": 10

}

}

]

}

}

```

**返回参数说明**

| 名称                | 必选 | 类型    | 说明                                |

|----------------------|:----:|:-------:|-------------------------------------|

| id                  | yes  | string  | 标签ID                              |

| name                | yes  | string  | 标签名称                            |

| icon                | yes  | string  | 标签图标url                        |

| beSub                | yes  | boolean | 是否可订阅 true:可以 false:不可以 |

| hasSub              | yes  | boolean | 是否已订阅 true:已订阅 false:未订阅            |

| newestAriticle.id    | yes  | string  | 标签下最新发表的文章ID              |

| newestAriticle.title | yes  | string  | 标签下最新发表的文章标题            |

| subs.count          | yes  | string  | 标签的订阅数            |

### 添加文章标签

**URL**

```

POST /v3/articles/tags?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"name": "",

"beSub": false,

"icon": "/assets/1.png"

}

```

**请求参数说明**

| 名称                | 必选 | 类型    | 说明                                |

|----------------------|:----:|:-------:|-------------------------------------|

| name                | yes  | string  | 标签名称                            |

| icon                | yes  | string  | 标签图标url                        |

| beSub                | yes  | string  | 标签是否可以被订阅                  |

### 获取文章分享信息

**URL**

```

GET /v3/articles/:articleId/shared?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| articleId    | yes  | string | 文章Id            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"coverfigure": "/assets/1.png",

"android": {

"content": {

"head": {

"img": "/assets/1.png",

"p": "描述"

}

},

"apps": {

"android":[

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"desc": "描述",

"size": 86400,

"icon": "/assets/1.png",

"apkUrl": "http://ip:port/apk/a.apk",

"securityLevel": 1

}

]

}

},

"ios": {

"content": {

"head": {

"img": "/assets/1.png",

"p": "描述"

}

},

"apps": {

"ios":[

{

"id": "5451b379d933d9c43142d224",

"appId": "654897098",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"price": 6

}

]

}

},

"comments": {

"count": 10

}

}

}

```

**返回参数说明**

| 名称                | 必选 | 类型    | 说明                                |

|----------------------|:----:|:-------:|-------------------------------------|

| id                  | yes  | string  | 文章ID                              |

| title                | yes  | string  | 文章标题                            |

| coverfigure          | yes  | string  | 封面图                        |

| android.content.head.img  | yes  | string | android平台背景图 |

| android.content.head.p    | yes  | string | android平台描述 |

| android.apps.android    | no  | array[Object] | android平台应用信息 |

| ios.content.head.img  | yes  | string | ios平台背景图 |

| ios.content.head.p    | yes  | string | ios平台描述 |

| ios.apps.ios    | no  | array[object] | ios平台应用信息 |

| comments.count      | yes  | int    | 评论数              |

### 获取文章详情

**URL**

```

GET /v3/articles/:articleId?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| articleId    | yes  | string | 文章Id            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224",

"isCollected": true,

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"icon": "/assets/1.png",

"userType": 1

},

"header": {

"img": "/assets/1.png",

"h1": "文章标题",

"p": "正文"

},

"sections": [

{

"img": "/assets/1.png",

"p": "图片对应的文字"

},

{

"img": "/assets/1.png",

"p": "图片对应的文字"

}

],

"attitudes": {

"score": 130,

"items": [

{

"id": "5451b379d933d9c43142d224",

"name": "态度标题",

"clickCnt": 5

}

]

},

"tags":[

{

"id": "5451b379d933d9c43142d224",

"name": "标签名称"

}

],

"comments":[

{

"id": "5451b379d933d9c43142d224",

"userId": "5451b379d933d9c43142d224",

"userName": "用户昵称",

"icon": "/assets/1.png",

"content": "评论内容",

"favCnt": 30

}

],

"androidApps": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"desc": "描述",

"size": 86400,

"icon": "/assets/1.png",

"apkUrl": "http://ip:port/apk/a.apk",

"securityLevel": 1

}

],

"iosApps": [

{

"id": "5451b379d933d9c43142d224",

"appId": "654897098",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"price": 6,

"iosUrl": "https://itunes.apple.com/cn/app/tian-tian-ai-xiao-chu/id654897098?mt=8&uo=4&bundleid=com.tencent.peng"

}

],

"smartDevices":[

{

"id": "5451b379d933d9c43142d224",

"name": "酷品名称",

"price": 299,

"purchaseUrl": "第三方购买地址"

}

],

"recommends":[

{

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"attitudes": {

"score": 130

},

"nickName": "作者昵称",

"coverfigure": "/assets/1.png",

"isCollected": false,

"isExistVideo": false

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 文章ID            |

| isCollected  | yes  | boolean | 收藏表示 true:已收藏 false:未收藏        |

| user        | yes  | object | 作者相关信息            |

| header      | yes  | object | 文章正文信息            |

| sections    | yes  | Array[object] | 文章中的图文信息            |

| attitudes    | yes  | object | 文章态度信息            |

| tags        | no  | Array[object] | 文章标签信息            |

| comments    | no  | Array[object] | 文章评论信息            |

| androidApps  | no  | Array[object] | 文章相关android应用信息            |

| iosApps      | no  | Array[object] | 文章相关ios应用信息            |

| smartDevices | no  | Array[object] | 文章相关酷品信息            |

| recommends  | no  | Array[object] | 相关推荐文章信息            |

**user包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 作者ID            |

| nickName        | yes  | string | 作者昵称        |

| icon        | yes  | string | 作者头像url            |

| userType    | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

**header包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| h1          | yes  | string | 文章标题            |

| img          | yes  | string | 文章封面图url        |

| p            | yes  | string | 文章正文            |

**sections包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| img          | yes  | string | 文章插图url        |

| p            | yes  | string | 文章插图对应的文字            |

**attitudes包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| score        | yes  | int    | 文章态度总分        |

| items        | yes  | Array[object] | 各个态度对象            |

**items包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 态度ID        |

| name        | yes  | string | 态度名称            |

| clickCnt    | yes  | int    | 态度点击次数            |

**tags包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 标签ID        |

| name        | yes  | string | 标签名称            |

**comments包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 评论ID        |

| userId      | yes  | string | 评论者Id            |

| userName    | yes  | string | 评论者昵称            |

| icon        | yes  | string | 评论者头像url            |

| content      | yes  | string | 评论内容            |

| favCnt      | yes  | int    | 点赞数量            |

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| desc        | yes  | string | 应用描述            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url            |

| apkurl      | yes  | string | 应用下载url            |

| securityLevel| yes  | int    | 应用安全级别 1:安全 2:较安全 3:未检测 |

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url            |

| iosurl      | yes  | string | 应用下载url            |

| price        | yes  | double | 价格            |

| appid        | yes  | string | appstore中的id |

**smartDevices包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 酷品ID        |

| name        | yes  | string | 酷品名称            |

| puchaseUrl  | no  | string | 第三方购买地址            |

| price        | yes  | double | 价格            |

**recommends包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 文章ID            |

| title        | yes  | string | 文章标题            |

| attitudes.score | yes  | int | 人气数(态度分)            |

| nickName        | yes  | string | 作者昵称            |

| coverfigure  | yes  | string | 文章封面图url            |

| isCollected  | yes  | boolean | 收藏标识 false:未收藏 true:已收藏|

| isExistVideo | yes  | boolean | 是否包含视频 false:不包含 true:已包含|

### 添加文章态度

**URL**

```

POST /v3/articles/:articleId/attitude?att=&_client=&_cver=&_token

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| articledId  | yes  | string | 文章ID      |

| att          | yes  | string | 文章所属态度的ID,根据文章的态度分类有所不同      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 添加文章评论

**URL**

```

POST /v3/articles/:articleId/comments?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"type": 1,

"content" : "评论内容",

"img": "/assets/1.png",

"replyTo": "5332131242343534653”

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| articledId  | yes  | string | 文章ID      |

| type        | yes  | int    | 类型 1:评论 2:找茬      |

| content      | yes  | string | 评论内容      |

| img          | no  | string | 找茬的截图地址 |

| replyTo      | no  | string | 回复的评论ID |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 添加文章评论的态度

**URL**

```

POST /v3/articles/comments/:commentId/attitude?att=&_client=&_cver=&_token

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| commentId    | yes  | string    | 评论ID      |

| att          | yes  | int    | 态度 1:支持(赞) -1: 反对(踩)      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

}

}

```

**其他返回**

```

#!json

{

"code": 429,

"status": "已经添加过态度",

"data": {

}

}

```

### 获取文章评论列表

**URL**

```

GET /v3/articles/:articleId/comments?_client=&_cver=&_token&type=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| articleId    | yes  | String | 文章ID      |

| type        | yes  | int    | 类型 1:;评论 2: 找茬      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"content": {

"user: "user2",

"img": "assets/1.png",

"p": "hello world",

"quote": {

"user": "user1",

"p": "",

"quote": {}

}

},

"status": 2,

"attitudes": {

"count": {

"like": 8

}

},

"createdOn": "20141101130405"

}

]

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 评论Id      |

| user        | yes  | object | 评论的作者信息      |

| content      | yes  | object | 评论内容      |

| status      | yes  | int    | 状态 1:已创建 2: 已审核 0:已删除      |

| createdOn    | yes  | string | 评论时间 格式:20141101130405      |

**user包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 作者ID            |

| nickName        | yes  | string | 作者昵称        |

| avatar        | yes  | string | 作者头像url            |

| type    | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

**content包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| user      | yes  | string | 评论作者            |

| img        | yes  | string | 找茬时的截图url      |

| p          | yes  | string | 评论正文        |

| quote        | yes  | object | 评论引用        |

### 获取文章轮播列表

**URL**

```

GET /v3/articles/carousel?tag=&_client=&_cver=&_token&type=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag          | yes  | String | 标签ID,获取哪个标签下的轮播列表      |

**返回结果**

```

#!json

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"name": "标题",

"type": 2,

"coverfigure": "/assets/1.png",

"url": "http://ip:port/detail",

"idx": 1

},

{

"type": 1,

"article": {

"id": "",

"title": "文章标题",

"coverfigure": "/assets/1.png"

},

"name": "自定义标题",

"coverfigure": "/assets/1.png",

"idx": 2

}

]

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| name        | yes  | string | 标题      |

| coverfigure  | yes  | string | 自定义封面图地址      |

| type        | yes  | int    | 类型 1: 文章 2:广告      |

| article.coverfigure          | yes  | string | 广告封面图      |

| url          | yes  | string | 广告详情页url      |

| idx          | yes  | int    | 轮播index      |

| article.id  | yes  | string | 文章ID      |

| article.title| yes  | string | 文章标题      |

### 发布文章

#### 兼容2.x版本

**URL**

```

POST /v2/articles?_client=&_cver=&_token

```

**请求参数**

* http content-type : multipart/form-data

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| title        | yes  | string | 文章标题      |

| content      | yes  | string | 文章正文      |

| p1          | no  | file  | 文章截图1      |

| p2          | no  | file  | 文章截图2      |

| p3          | no  | file  | 文章截图3      |

| p4          | no  | file  | 文章截图4      |

| p5          | no  | file  | 文章截图5      |

| coverfigure  | no  | file  | 封面图      |

| androidAppIds | no  | string | 相关Android应用ID 多个ID以"\|"分割  |

| iosAppIds | no  | string | 相关IOS应用ID 多个ID以"\|"分割  |

| smartDeviceIds | no  | string | 相关酷品ID 多个ID以"\|"分割  |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224"

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 文章ID      |

#### 3.x版本

```

POST /v3/articles?_client=&_cver=&_token

```

**请求参数**

* http content-type : application/json

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224"

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 文章ID      |

### 修改文章

**URL**

```

POST /v3/articles/:articleId?_client=&_cver=&_token

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| articleId  | yes  | string | 文章ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 删除文章

**URL**

```

DELETE /v3/articles/:articleId?_client=&_cver=&_token

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| articleId  | yes  | string | 文章ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

## 晒图

### 根据标签获取晒图列表

**URL**

```

GET /v3/imgs?q=&tag=&user=&_client=&_cver=&_token=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag          | no  | string | 标签ID    |

| user        | no  | string | 用户ID    |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"coverfigure": "/assets/1.png",

"content": "正文",

"hasSub": true,

"comments": {

"count": 150

},

"apps": {

"android": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"apkUrl": "http://ip:port/apk/a.apk"

}

],

"ios": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"appId": "654736"

}

]

},

"smartDevices":[

{

"id": "5451b379d933d9c43142d224",

"name": "酷品名称"

}

]

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 文章ID            |

| user        | yes  | object | 用户信息            |

| coverfigure  | yes  | string | 晒图图片的url        |

| text        | yes  | string | 晒图正文            |

| hasSub | yes  | boolean    | 终端用户是否订阅过此晒图作者 true:已订阅 false:未订阅  |

| comments.count | yes  | int    | 评论数            |

| apps.android  | no  | Array[object] | 文章相关android应用信息            |

| apps.ios      | no  | Array[object] | 文章相关ios应用信息            |

| smartDevices | no  | Array[object] | 文章相关酷品信息            |

**user包括**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID            |

| nickName        | yes  | string | 用户昵称            |

| avatar      | yes  | String | 头像url            |

| type        | yes  | object | 用户类型            |

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| apkurl      | yes  | string | 应用下载url            |

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| appId        | yes  | string | app store ID            |

**smartDevices包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 酷品ID        |

| name        | yes  | string | 酷品名称            |

### 获取晒图详情

**URL**

```

GET /v3/imgs/:id?user=&_client=&_cver=&_token=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | no  | string | 晒图ID    |

### 添加晒图评论

**URL**

```

POST /v3/imgs/:imgId/comments?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"content" : "评论内容",

"replyTo": "5332131242343534653”

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| content      | yes  | string | 评论内容      |

| imgId        | yes  | string | 晒图ID      |

| replyTo        | no  | string | 回复的评论ID |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 添加晒图评论的态度

**URL**

```

POST /v3/imgs/comments/:commentId/attitude?att=&_client=&_cver=&_token

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| att          | yes  | int    | 态度 1:赞 -1: 踩      |

| commentId    | yes  | int    | 评论ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

**其他返回**

```

#!json

{

"code": 429,

"status": "已经添加过态度",

}

```

### 获取晒图评论列表

**URL**

```

GET /v3/imgs/:imgId/comments?_client=&_cver=&_token

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| imgId        | yes  | String | 晒图ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"attitudes": {

"count": {

"like": 30

}

},

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"createdOn": "20141101130405",

"status": 2,

"content": {

"user": "CJLG",

"p": "haha",

"quote": {

"user": "user1",

"p": "ni hao"

}

}

}

]

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| Id          | yes  | string | 评论Id      |

| attitudes.count.like | yes  | int    | 点赞数量      |

| user        | yes  | object | 评论的作者信息      |

| createdOn    | yes  | string | 评论时间 格式:20141101130405      |

| status      | yes  | int    | 状态 0:已创建 1: 已审核 2:已删除      |

| content      | yes  | Array[object]    | 评论内容      |

**user包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 作者ID            |

| nickName        | yes  | string | 作者昵称        |

| avatar        | yes  | string | 作者头像url            |

| type    | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

**content包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| user      | yes  | string | 评论作者            |

| p          | yes  | string | 评论正文        |

| quote        | yes  | object | 评论引用        |

### 发布晒图

**URL**

```

POST /v3/imgs?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"content": "晒图正文",

"coverfigure": "/assets/1.png",

"apps": {

"android": [

"1234",

"2345",

"3456"

],

"ios": []

},

"smartDevices": [

"1234",

"2345",

"3456"

]

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| content      | no  | string | 文章正文      |

| coverfigure          | yes  | string | 图片url      |

| apps.android  | no  | array | android app id  |

| apps.ios      | no  | array | ios app id  |

| smartDevices      | no  | string | 相关酷品ID 多个ID以"\|"分割  |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224"

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 晒图ID      |

### 删除晒图

**URL**

```

DELETE /v3/imgs/:imgId?_client=&_cver=&_token

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| imgId  | yes  | string | 晒图ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

## 酷品

### 获取酷品列表

**URL**

```

GET /v3/devices?q=&tag=&user=&_client=&_cver=&_token=&sort=&filter=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag        | no  | string | 标签ID    |

| user        | no  | string | 用户ID    |

| sort      | no  | string | 排序参数 格式: ("time"\|"-time"\|"price"\|"-price"\|"pop"\|"-pop")      |

| sale      | no  | int | 发售状态  1: 未开始 2: 预售中 3: 正式发售 |

| brand      | no  | string | 品牌        |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"name": "产品名称",

"icon": "/assets/1.png",

"coverfigure": "/assets/1.png",

"sales":{

"price": 399.99

},

"isCollected": false,

"apps": {

"android": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"apkUrl": "http://ip:port/apk/a.apk"

}

],

"ios": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"appId": "654736"

}

]

}

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 酷品ID            |

| name        | yes  | string | 产品名称          |

| icon        | yes  | string | 图标url            |

| screenshot  | yes  | string | 封面图url          |

| sales.price        | no  | double | 价格              |

| isCollected  | yes  | boolean | 收藏标识 false:未收藏 true:已收藏            |

| apps.android  | no  | Array[object] | 酷品相关android应用信息            |

| apps.ios      | no  | Array[object] | 酷品相关ios应用信息            |

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| apkurl      | yes  | string | 应用下载url            |

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| appId        | yes  | string | app store ID            |

### 获取酷品轮播列表

**URL**

```

GET /v3/devices/carousel?tag=&_client=&_cver=&_token&type=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag        | yes  | String | 标签ID,获取哪个标签下的轮播列表      |

**返回结果**

```

#!json

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"name": "标题",

"type": 2,

"coverfigure": "/assets/1.png",

"url": "http://ip:port/detail",

"idx": 1

},

{

"type": 1,

"smartDevice": {

"id": "",

"name": "酷品名称",

"coverfigure": "/assets/1.png"

},

"name": "自定义标题",

"coverfigure": "/assets/1.png",

"idx": 2

}

]

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| name        | yes  | string | 标题      |

| coverfigure  | yes  | string | 自定义封面图地址      |

| type        | yes  | int    | 类型 1: 酷品 2:广告      |

| smartDevice.coverfigure          | yes  | string | 广告封面图      |

| url          | yes  | string | 广告详情页url      |

| idx          | yes  | int    | 轮播index      |

| smartDevice.id  | yes  | string | 酷品ID      |

| smartDevice.name | yes  | string | 酷品标题      |

### 获取酷品分享信息

**URL**

```

GET /v3/devices/:deviceId/shared?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| deviceId    | yes  | string | 酷品Id            |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224",

"name": "酷品名称",

"icon": "/assets/1.png",

"coverfigure": "/assets/1.png",

"sales": {

"price": 6,

"address": [

"name": "地址",

"url": "http://host/device"

]

}

"apps": {

"ios":[

{

"id": "5451b379d933d9c43142d224",

"appId": "654897098",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"price": 6

}

],

"android": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"desc": "描述",

"size": 86400,

"icon": "/assets/1.png",

"apkUrl": "http://ip:port/apk/a.apk",

"securityLevel": 1

}

]

},

"comments": {

"count": 10

}

}

}

```

**返回参数说明**

| 名称                | 必选 | 类型    | 说明                                |

|----------------------|:----:|:-------:|-------------------------------------|

| id                  | yes  | string  | 酷品ID                              |

| name                | yes  | string  | 酷品名称                            |

| icon                | yes  | string  | 酷品图标                        |

| coverfigure          | yes  | string  | 封面图                        |

| sales.price          | yes  | double  | 价格                        |

| sales.address.name  | yes  | string  | 购买地址名称                        |

| sales.address.url    | yes  | string  | 购买地址url                        |

| apps.android        | no  | array[Object] | android平台应用信息 |

| apps.ios            | no  | array[object] | ios平台应用信息 |

| comments.count      | yes  | int    | 评论数              |

### 获取酷品详情

**URL**

```

GET /v3/devices/:deviceId?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| deviceId    | yes  | string | 酷品Id            |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224",

"collectsCnt": 150,

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"icon": "/assets/1.png",

"userType": 1

},

"sales": {

"status": 1,

"price": 199,

"address": "http://jd.com/"

},

"header": {

"img": [

"/assets/1.png",

"/assets/2.png",

"/assets/3.png"

],

"h1": "酷品标题"

},

"sections": [

{

"img": "/assets/1.png",

"p": "图片对应的文字"

},

{

"img": "/assets/1.png",

"p": "图片对应的文字"

}

],

"campaigns": [

{

"id": "5451b379d933d9c43142d224",

"title": "活动标题",

"status": 1,

"regCnt": 130,

"coverfigure": "/assets/1.png"

}

],

"articles": {

"5451b379d933d9c43142d224": [

{

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"nickName": "作者昵称",

"coverfigure": "/assets/1.png",

"attitudes": {

"score": 130

}

}

],

"5451b379d933d9c43142d225": [

{

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"nickName": "作者昵称",

"coverfigure": "/assets/1.png",

"attitudes": {

"score": 130

}

}

],

"recommends": [

{

"id": "5451b379d933d9c43142d224",

"title": "文章标题",

"nickName": "作者昵称",

"coverfigure": "/assets/1.png",

"attitudes": {

"score": 130

}

}

]

},

"sharedImgs": [

{

"id": "5451b379d933d9c43142d224",

"coverfigure": "/assets/1.png",

"nickName": "作者昵称"

}

],

"forumThreads": [

{

"id": "5451b379d933d9c43142d224",

"title": "话题内容",

"nickName": "作者昵称",

"top": true,

"essence": false,

"replyCnt": 150

}

],

"androidApps": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"apkUrl": "http://ip:port/apk/a.apk",

"securityLevel": 1

}

],

"iosApps": [

{

"id": "5451b379d933d9c43142d224",

"appId": "654897098",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"price": 6,

"iosUrl": "https://itunes.apple.com/cn/app/tian-tian-ai-xiao-chu/id654897098?mt=8&uo=4&bundleid=com.tencent.peng"

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 文章ID            |

| collectsCnt  | yes  | int    | 收藏数量        |

| user        | yes  | object | 用户相关信息            |

| sales        | yes  | object | 购买相关信息            |

| header      | yes  | object | 酷品正文信息            |

| sections    | yes  | Array[object] | 酷品产品介绍的图文信息            |

| campaigns    | no  | Array[object] | 酷品相关活动信息            |

| articles    | no  | object  | 酷品相关文章信息            |

| sharedImgs  | no  | Array[object] | 酷品相关晒图信息            |

| forumThreads | no  | Array[object] | 酷品相关话题信息            |

| androidApps  | no  | Array[object] | 文章相关android应用信息            |

| iosApps      | no  | Array[object] | 文章相关ios应用信息            |

**user包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 作者ID            |

| nickName        | yes  | string | 作者昵称        |

| icon        | yes  | string | 作者头像url            |

| userType    | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

**sales包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| status      | yes  | int    | 销售状态 1:未开始 2:预售中 3:已发售            |

| price        | yes  | double | 价格        |

| address      | yes  | string | 购买地址            |

**header包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| h1          | yes  | string | 酷品名称            |

| img          | yes  | Array[string] | 酷品截图        |

**sections包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| img          | yes  | string | 酷品产品介绍中插图url        |

| p            | yes  | string | 插图对应的文字            |

**campaigns包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 活动ID        |

| nickName        | yes  | string | 发布者名称            |

| title        | yes  | string | 活动标题            |

| status      | yes  | int    | 状态 1: 未开始、2: 进行中、3: 已结束            |

| regCnt      | yes  | int    | 报名人数            |

| coverfigure  | yes  | String | 活动封面图url            |

**articles包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| 技巧标签ID  | yes  | Array[Article] | 技巧文章列表        |

| 评测标签ID  | yes  | Array[Article] | 评测文章列表            |

| recommends  | yes  | Array[Article] | 推荐文章列表            |

**Article包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 文章ID            |

| title        | yes  | string | 文章标题            |

| attitudes.score | yes  | int | 人气数(态度分)            |

| nickName        | yes  | string | 作者昵称            |

| coverfigure  | yes  | string | 文章封面图url            |

**sharedImgs包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 晒图ID            |

| nickName        | yes  | string | 作者昵称            |

| coverfigure  | yes  | string | 图片url            |

**forumThreads包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 话题ID            |

| nickName        | yes  | string | 作者昵称            |

| title        | yes  | string | 话题内容            |

| top          | yes  | boolean | 置顶 true: 置顶 false:未置顶            |

| essence      | yes  | boolean | 加精 true:精华 false:未加精            |

| replyCnt    | yes  | int    | 回复数            |

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url            |

| apkurl      | yes  | string | 应用下载url            |

| securityLevel| yes  | int    | 应用安全级别 1:安全 2:较安全 3:未检测 |

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url    |

| iosurl      | yes  | string | 应用下载url    |

| price        | yes  | double | 价格            |

| appid        | yes  | string | appstore中的id |

### 酷品购买

**URL**

```

POST /v3/devices/:id/purchase?_client=&_cver=&_token=

```

* http content_type: application/json

```

#!json

{

"origin": 1,

"objId": "5451b379d933d9c43142d224"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 酷品ID |

| origin      | yes  | int    | 1: 文章 2: 晒图 3:酷品 4:话题 5:搜索      |

| objId        | no  | string | 根据origin 传入相关内容的ID      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 新增开发者

**URL**

```

POST /v3/devices/developers?_client=&_cver=&_token=

```

* http content_type: application/json

```

#!json

{

"user": "5451b379d933d9c43142d224",

"name": "xxx公司",

"address": "北京市朝阳区酒仙桥东路",

"contact": {

"name": "张三",

"position": "市场部经理",

"phone": "010-87654321",

"email": "xxx@xxx.com"

},

"product":{

"nr": 2,

"name": "智能手环,智能背包",

"progress":[

1,

2

],

"need":[

1,

2

]

},

"description": "产品介绍"

}

```

* 参数说明

| 名称            | 必选 | 类型  | 说明        |

|------------------|:----:|:------:|--------------|

| user            | yes  | string | 关联的用户ID |

| name            | yes  | String | 公司(团队)名称      |

| address          | no  | string | 地址      |

| contact.name    | yes  | string | 联系人姓名      |

| contact.position | yes  | string | 联系人职务      |

| contact.phone    | yes  | string | 联系电话      |

| contact.email    | yes  | string | 邮箱地址      |

| product.nr      | no  | int | 产品数量      |

| product.name    | no  | String | 产品名称      |

| product.progress | no  | Array[Int] | 产品进度  1:有创意想法 2:有产品原型 3:有工程样机 4:已规模化生产    |

| product.need    | no  | Array[Int] | 需要的支持  1:营销支持 2:技术支持 3:资金支持 4:其他支持    |

| description      | no  | string | 产品简介      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224"

}

}

```

### 编辑开发者

**URL**

```

POST /v3/devices/developers/:id?_client=&_cver=&_token=

```

* http content_type: application/json

```

#!json

{

"user": "5451b379d933d9c43142d224",

"name": "xxx公司",

"address": "北京市朝阳区酒仙桥东路",

"contact": {

"name": "张三",

"position": "市场部经理",

"phone": "010-87654321",

"email": "xxx@xxx.com"

},

"product":{

"nr": 2,

"name": "智能手环,智能背包",

"progress":[

1,

2

],

"need":[

1,

2

]

},

"description": "产品介绍"

}

```

* 参数说明

| 名称            | 必选 | 类型  | 说明        |

|------------------|:----:|:------:|--------------|

| id              | yes  | string | 开发者ID |

| user            | yes  | string | 关联的用户ID |

| name            | yes  | String | 公司(团队)名称      |

| address          | no  | string | 地址      |

| contact.name    | yes  | string | 联系人姓名      |

| contact.position | yes  | string | 联系人职务      |

| contact.phone    | yes  | string | 联系电话      |

| contact.email    | yes  | string | 邮箱地址      |

| product.nr      | no  | int | 产品数量      |

| product.name    | no  | String | 产品名称      |

| product.progress | no  | Array[Int] | 产品进度  1:有创意想法 2:有产品原型 3:有工程样机 4:已规模化生产    |

| product.need    | no  | Array[Int] | 需要的支持  1:营销支持 2:技术支持 3:资金支持 4:其他支持    |

| description      | no  | string | 产品简介      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 获取开发者(通过关联的userid)

**URL**

```

GET /v3/devices/developers/user/:id?user=&_client=&_cver=&_token=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 用户ID  查询此用户关联的开发者    |

**返回结果**

```

#!json

{

"id": "5451b379d933d9c43142d224",

"user": "5451b379d933d9c43142d224",

"name": "xxx公司",

"address": "北京市朝阳区酒仙桥东路",

"contact": {

"name": "张三",

"position": "市场部经理",

"phone": "010-87654321",

"email": "xxx@xxx.com"

},

"product":{

"nr": 2,

"name": "智能手环,智能背包",

"progress":[

1,

2

]

"need":[

1,

2

]

},

"description": "产品介绍"

}

```

* 参数说明

| 名称            | 必选 | 类型  | 说明        |

|------------------|:----:|:------:|--------------|

| id              | yes  | string | 开发者ID |

| user            | yes  | string | 关联的用户ID |

| name            | yes  | String | 公司(团队)名称      |

| address          | no  | string | 地址      |

| contact.name    | yes  | string | 联系人姓名      |

| contact.position | yes  | string | 联系人职务      |

| contact.phone    | yes  | string | 联系电话      |

| contact.email    | yes  | string | 邮箱地址      |

| product.nr      | no  | int | 产品数量      |

| product.name    | no  | String | 产品名称      |

| product.progress | no  | Array[Int] | 产品进度  1:有创意想法 2:有产品原型 3:有工程样机 4:已规模化生产    |

| need            | no  | Array[Int] | 需要的支持  1:营销支持 2:技术支持 3:资金支持 4:其他支持    |

| description      | no  | string | 产品简介      |

## 话题

### 获取版面下话题列表

> 排序: 置顶>精华>普通(时间倒序)

**URL**

```

GET /v3/forums/:forumId?q=&user=&_client=&_cver=&_token=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| forumId      | yes  | string | 版面ID,此版本只有一个版,ID固定给终端    |

| user        | no  | string | 用户ID  查询此用户发表的话题    |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"content": {

"user": "String",

"img": "String",

"p": "String",

"quote": {}

},

"top": true,

"essence": false,

"reply": {

"count": 150

},

"apps": {

"android": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"apkUrl": "http://ip:port/apk/a.apk"

}

],

"ios": [

{

"id": "5451b379d933d9c43142d224",

"name": "应用名称",

"appId": "654736"

}

]

},

"smartDevices":[

{

"id": "5451b379d933d9c43142d224",

"name": "酷品名称"

}

]

}

]

}

}

```

**返回字段说明**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 话题ID            |

| user        | yes  | object | 用户信息            |

| title        | yes  | string | 话题标题            |

| content      | yes  | object | 话题正文内容            |

| top          | yes  | boolean | 置顶标识 true:置顶 false:非置顶            |

| essence      | yes  | boolean | 精华标识 true:精华 false:非精华            |

| reply.count    | yes  | int | 回复数量            |

**content包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| user      | yes  | string | 评论作者            |

| img        | yes  | string | 找茬时的截图url      |

| p          | yes  | string | 评论正文        |

| quote        | yes  | object | 评论引用        |

**user包括**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 用户ID            |

| nickName        | yes  | string | 用户昵称            |

| avatar      | yes  | String | 头像url            |

| type        | yes  | int    | 用户类型            |

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| apkurl      | yes  | string | 应用下载url            |

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID        |

| name        | yes  | string | 应用名称            |

| appId        | yes  | string | app store ID            |

**smartDevices包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 酷品ID        |

| name        | yes  | string | 酷品名称            |

### 获取话题详情

**URL**

```

GET /v3/forums/threads/:threadId?_client=&_cver=&_token=&type=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| threadId    | yes  | string | 话题ID    |

### 获取话题回帖列表

**URL**

```

GET /v3/forums/threads/:threadId/messages?_client=&_cver=&_token=&type=

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| threadId    | yes  | string | 话题ID    |

| type        | no  | int | 话题ID 1: 主贴 2:回帖  |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"type": 1,

"attitudes": {

"count": {

"like": 130

}

},

"user": {

"id": "5451b379d933d9c43142d224",

"nickName": "用户昵称",

"avatar": "/assets/1.png",

"type": 1

},

"content": {

"user": "user2",

"img": "assets/1.png",

"p": "hello world",

"quote": {

"user": "user1",

"p": "",

"quote": {}

}

},

"status": 1,

"createdOn": "20141101130405"

}

]

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 跟帖Id      |

| type        | yes  | int    | 类型:1:主贴 2:跟帖      |

| attitudes.count.like      | yes  | int    | 点赞数      |

| user        | yes  | object | 跟帖的作者信息      |

| createdOn    | yes  | string | 跟帖时间 格式:20141101130405      |

| status      | yes  | int    | 状态 1:已发表 2: 已审核 3:下线      |

| content      | yes  | Array[object]    | 跟帖内容      |

**user包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | 作者ID            |

| nickName        | yes  | string | 作者昵称        |

| avatar        | yes  | string | 作者头像url            |

| type    | yes  | int | 用户类型 1:默认用户 2:普通用户 3:认证用户|

**content包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| user        | yes  | string | 评论作者            |

| p            | yes  | string | 评论正文        |

| img          | yes  | string | 图片url      |

| quote        | yes  | object | 评论引用        |

### 创建话题

**URL**

```

POST /v3/forums/:forumId/threads?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"title": "话题标题",

"content": "话题正文",

"img": "/assets/1.png",

"apps": {

"android": [

"1234",

"2345",

"3456"

]

"ios": [

"1234",

"2345",

"3456"

]

},

"smartDevices": [

"1234",

"2345",

"3456"

]

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| forumId        | yes  | string | 版面ID    |

| title        | no  | string | 话题的标题      |

| content      | no  | string | 话题的正文      |

| img          | yes  | string | 图片url      |

| apps.android | no  | array | 相关android应用  |

| apps.ios    | no  | array | 相关android应用  |

| smartDeviceIds  | no  | array | 相关酷品ID  |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"id": "5451b379d933d9c43142d224"

}

}

```

* 返回参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 话题ID      |

### 创建回帖

**URL**

```

POST /v3/forums/threads/:id/messages?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"content": "回帖内容",

"replyTo": "5451b379d933d9c43142d224"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id        | yes  | string | threadsId    |

| content      | no  | string | 回帖内容      |

| replyTo      | no  | string | 回帖的ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

### 添加话题跟帖的态度

**URL**

```

POST /v3/forums/messages/:messageId/attitude?att=&_client=&_cver=&_token

```

**请求参数**

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| att          | yes  | int    | 态度 1:赞 -1: 踩      |

| messageId    | yes  | string | 跟帖ID      |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok"

}

```

**其他返回**

```

#!json

{

"code": 429,

"status": "已经添加过态度",

"data": {

}

}

```

## 活动

### 获取活动列表

**URL**

```

GET /v3/campaigns?q=&tag=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| tag          | yes  | string | 标签Id    |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code": 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"name": "活动名称",

"coverfigure": "/assets/1.png",

"status": 1,

"reg": {

"status": 1,

"count": 2900,

},

"url": "http://ip:port/detail",

"whetherReg": true

}

]

}

}

```

**返回参数说明**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 活动Id    |

| name        | yes  | string | 活动名称    |

| coverfigure | yes  | string | 活动封面图    |

| status      | yes  | int    | 活动状态 1:未开始 2:进行中 3:已结束    |

| reg.status  | yes  | int  | 报名状态 0: 不能报名 1: 可以报名    |

| reg.count      | yes  | int    | 报名人数    |

| whetherReg    | no  |  boolean  | 用户是否已报名 true: 已报名 false:未报名    |

| url      | yes  | String    | 活动详情页url    |

### 获取活动详情

**URL**

```

GET /v3/campaigns/:id?_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | 活动Id    |

### 活动报名

**URL**

```

POST /v3/campaigns/:campaignId/registration?_client=&_cver=&_token

```

**请求参数**

* http content_type: application/json

```

#!json

{

"phone": "135xxxxxxx"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| campaignId  | yes  | string | 活动ID      |

| phone        | yes  | string | 手机号码      |

**返回结果**

```

#!json

{

"code": 200,

"status": "亲,报名申请已提交,请耐心等待审核结果~"

}

```

## 应用

### 获取Android应用列表

**URL**

```

GET /v3/apps/android?q=&tag=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| tag          | no  | string | 标签Id            |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"packageName": "com.tencent.qq",

"name": "应用名称",

"cat": "分类",

"desc": "描述",

"size": 86400,

"icon": "/assets/1.png",

"apkUrl": "http://ip:port/apk/a.apk",

"securityLevel": 1

}

]

}

}

```

**androidApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | android APP ID      |

| packageName  | yes  | string | 应用包名            |

| name        | yes  | string | 应用名称            |

| cat          | yes  | string | 分类名称            |

| desc        | yes  | string | 应用描述            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url            |

| apkurl      | yes  | string | 应用下载url            |

| securityLevel| yes  | int    | 应用安全级别 1:安全 2:较安全 3:未检测 |

### 点击android应用事件

**URL**

```

POST /v3/apps/android/:id?_client=&_cver=&_token=

```

* http content_type: application/json

```

#!json

{

"cat": 1

"origin": 1,

"objId": "5451b379d933d9c43142d224"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | android应用ID |

| cat          | yes  | int    | 1:打开 2:下载 |

| origin      | yes  | int    | 1: 文章 2: 晒图 3:酷品 4:话题 5:搜索      |

| objId        | no  | string | 根据origin 传入相关内容的ID      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

### 获取IOS应用列表

**URL**

```

GET /v3/apps/ios?q=&tag=&_client=&_cver=&_token=

```

**请求参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| tag          | no  | string | 标签Id            |

| q            | no  | string | 搜索关键字    |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok",

"data": {

"offset": 0,

"limit": 20,

"total": 100,

"count": 20,

"results": [

{

"id": "5451b379d933d9c43142d224",

"appId": "654897098",

"name": "应用名称",

"size": 86400,

"icon": "/assets/1.png",

"price": 6,

"cat":[

{

"name": "分类名称"

}

]

}

]

}

}

```

**iosApps包括以下参数**

| 名称        | 必选 | 类型  | 说明              |

|--------------|:----:|:------:|--------------------|

| id          | yes  | string | ios APP ID        |

| name        | yes  | string | 应用名称            |

| size        | yes  | long  | 应用大小            |

| icon        | yes  | string | 应用图标url            |

| price        | yes  | double | 价格            |

| appId        | yes  | string | appstore中的id |

| cat.name    | yes  | string | 分类名称 |

### 点击ios应用事件

**URL**

```

POST /v3/apps/ios/:id?_client=&_cver=&_token=

```

* http content_type: application/json

```

#!json

{

"cat": 1

"origin": 1,

"objId": "5451b379d933d9c43142d224"

}

```

* 参数说明

| 名称        | 必选 | 类型  | 说明        |

|--------------|:----:|:------:|--------------|

| id          | yes  | string | ios应用ID |

| cat          | yes  | int    | 1:打开 2:下载 |

| origin      | yes  | int    | 1: 文章 2: 晒图 3:酷品 4:话题 5:搜索      |

| objId        | no  | string | 根据origin 传入相关内容的ID      |

**返回结果**

```

#!json

{

"code" : 200,

"status": "Ok"

}

```

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,233评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,013评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,030评论 0 241
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,827评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,221评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,542评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,814评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,513评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,225评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,497评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,998评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,342评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,986评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,812评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,560评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,461评论 2 266

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,099评论 18 139
  • 转至元数据结尾创建: 董潇伟,最新修改于: 十二月 23, 2016 转至元数据起始第一章:isa和Class一....
    40c0490e5268阅读 1,635评论 0 9
  • 【2017年最新】☞ iOS面试题及答案 设计模式是什么? 你知道哪些设计模式,并简要叙述? 设计模式是一种编码经...
    紫色冰雨阅读 563评论 0 1
  • 9af0e05c6c75阅读 322评论 0 0
  • 《肖申克的救赎》,一部看过之后久久不能平复心情的电影。即使人生到达低谷也不该放弃的只有希望,只要心中有信念,...
    芳华灼灼阅读 295评论 0 2