- 新建 Tag
- 修改 Tag
- 根据 id 查看 Tag
- 分页查看 Tags
- 根据名字查看 Tag
- 根据标准 id 查看 Tags
- 根据 id 删除 Tag
- 给一个 Tag 做分类
- 增加一次引用次数
- 根据引用次数查看 Tags
- 新建 Category
- 修改 Category
- 根据id 查看 Category
- 分页查看 Categories
- 根据名字查看 Category
{
response: {
code: 0,
message: "OK",
cost: 7,
timestamp: 1466435833000
},
data: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
如上所示,整个响应即为一个 JSON
,其中包含两个 JSON
:
response
包含code
响应码message
cost
timestamp
code
响应码message
cost
timestamp
data
请求返回的主体,根据不同的接口,有不同的实现
POST /tag/create
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fname | string | 标签名字 | 是 |
Fstatus | 0(未审核),1(普通),2(精品) | 标签的状态 | 否 |
Ftype | int (-99 ~ 99) | 保留 | 否 |
Fstore_type | 0(默认)1(爬虫)2(编辑)... | 保存的类型 | 否 |
Fstandard_id | int | 该标签对应的标准(同义)标签 | 否 |
Fcited_time | int | 引用次数 | 否 |
Fimage | url | 图片链接 | 否 |
Fdescription | string | 标签简介 | 否 |
Fsource | string | 标签来源 | 否 |
Fcreated_by | string | 标签创建者 | 否 |
Fupdated_by | string | 标签修改者 | 否 |
POST /tag/create
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
POST /tag/alter
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
Fname | string | 标签名字 | 否 |
Fstatus | 0(未审核),1(普通),2(精品) | 标签的状态 | 否 |
Ftype | int (-99 ~ 99) | 保留 | 否 |
Fstore_type | 0(默认)1(爬虫)2(编辑)... | 保存的类型 | 否 |
Fstandard_id | int | 该标签对应的标准(同义)标签 | 否 |
Fcited_time | int | 引用次数 | 否 |
Fimage | url | 图片链接 | 否 |
Fdescription | string | 标签简介 | 否 |
Fsource | string | 标签来源 | 否 |
Fcreated_by | string | 标签创建者 | 否 |
Fupdated_by | string | 标签修改者 | 否 |
POST /tag/alter
Fid=51&Fname=wefwefwefcxvxcvxcvfd
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
GET /tag/id/{Fid}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
GET /tag/id/51
{
response: {
code: 0,
message: "OK",
cost: 8,
timestamp: 1466434625000
},
data: {
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
}
GET /tag/page/{limit}/{page}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
page | int | 页码数 | 否(默认1) |
limit | int | 每页tags数 | 否(默认20) |
GET /tag/page/1
{
response: {
code: 0,
message: "OK",
cost: 5,
timestamp: 1466434845000
},
data: [
{
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
]
}
GET /tag/rank/{limit}/{page}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
page | int | 页码数 | 否(默认1) |
limit | int | 每页tags数 | 否(默认20) |
GET /tag/rank/1
{
response: {
code: 0,
message: "OK",
cost: 5,
timestamp: 1466434845000
},
data: [
{
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
]
}
GET /tag/standard/{Fstandard_id}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fstandard_id | int | 标准id | 是 |
GET /tag/standard/50
{
response: {
code: 0,
message: "OK",
cost: 5,
timestamp: 1466434845000
},
data: [
{
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
]
}
GET /tag/delete/{Fid}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
GET /tag/delete/51
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
GET /tag/name/{Fname}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fname | text | 标签名字 | 是 |
GET /tag/name/赫尔额
{
response: {
code: 0,
message: "OK",
cost: 8,
timestamp: 1466434625000
},
data: {
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
}
GET /tag/category/{Fname}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fname | text | 分类名 | 是 |
GET /tag/category/威锋网
{
response: {
code: 0,
message: "OK",
cost: 5,
timestamp: 1466434845000
},
data: [
{
Fid: "50",
Fname: "赫尔额",
Fstatus: "0",
Ftype: "0",
Fstore_type: "0",
Fstandard_id: "0",
Fcited_time: "0",
Fimage: "http://www.baidu.com/index.php",
Fdescription: null,
Fsource: "http://www.baidu.com/index.php",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:34",
Fupdated_by: null,
Fupdated_at: "2016-06-18 23:41:56",
categories: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
]
}
GET /tag/cite/{Fid}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
GET /tag/cite/51
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
POST /category/create
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fname | string | 分类名字 | 是 |
Fcreated_by | string | 创建者 | 否 |
Fupdated_by | string | 修改者 | 否 |
POST /category/create
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
POST /category/alter
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
Fname | string | 标签名字 | 否 |
Fcreated_by | string | 标签创建者 | 否 |
Fupdated_by | string | 标签修改者 | 否 |
POST /category/alter
Fid=51&Fname=wefwefwefcxvxcvxcvfd
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
GET /category/id/{Fid}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
GET /category/id/51
{
response: {
code: 0,
message: "OK",
cost: 9,
timestamp: 1466435802000
},
data: {
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
}
GET /category/page/{limit}/{page}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
page | int | 页码数 | 否(默认1) |
limit | int | 每页tags数 | 否(默认20) |
GET /category/page/1
{
response: {
code: 0,
message: "OK",
cost: 7,
timestamp: 1466435833000
},
data: [
{
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
]
}
GET /category/delete/{Fid}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fid | int | 标签id | 是 |
GET /category/delete/51
200 OK
{
"response": {
"code": 0
"message": "OK"
"cost": 12
"timestamp": 1465983198000
}
"data": null
}
GET /category/name/{Fname}
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
Fname | text | 分类名字 | 是 |
GET /category/name/威锋网
{
response: {
code: 0,
message: "OK",
cost: 9,
timestamp: 1466435802000
},
data: {
Fid: "50",
Fname: "威锋网",
Fcreated_by: null,
Fcreated_at: "2016-06-18 22:39:45",
Fupdated_by: null,
Fupdated_at: "2016-06-18 22:39:45"
}
}