pin_guide_ms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
一叶之秋 826f5c4641 init 3 years ago
DOCUMENTS init 3 years ago
config init 3 years ago
lock init 3 years ago
logs init 3 years ago
src init 3 years ago
tests init 3 years ago
README.md init 3 years ago

README.md

#List

setPlaceholderGuide

新增引导语接口

getPlaceholderGuide

分页获取引导语接口

findPlaceholderGuide

ID查询引导语接口

delPlaceholderGuide

删除引导语接口

updatePlaceholderGuide

修改引导语接口

接口

新增引导语接口

Method

POST

URL

/v1/setPlaceholderGuide

参数

name position required type limit description
content body true string * 引导语内容
source body true string * 平台
startTime body true string * 开始时间
endTime body true string * 结束时间
src body true string * 请求来源

请求示例

curl -X POST \
  http://192.168.100.50:8000/v1/setPlaceholderGuide \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: pin-guide-ms.juejin.im' \
  -d 'content=test&source=test&startTime=2018-06-05 08:27:06&endTime=2018-06-05 08:27:06&src=test'

返回示例

{
    "s": 1,
    "m": "ok",
    "d": {}
}

分页获取引导语接口

Method

POST

URL

/v1/getPlaceholderGuide

参数

name position required type limit description
pageNum body true string * 页码
pageSize body true string * 每页条数
src body true string * 请求来源

请求示例

curl -X POST \
  http://192.168.100.50:8000/v1/getPlaceholderGuide \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: pin-guide-ms.juejin.im' \
  -d 'pageNum=1&pageSize=10&src=test'

返回示例

{
  "s": 1,
  "m": "ok",
  "d": {
    "data": [
      {
        "id": "5b20d2bfe13823065f556177",
        "content": "1",
        "source": "web",
        "startTime": "2018-11-11 11:00:00",
        "endTime": "2018-11-11 11:00:00"
      },
      {
        "id": "5b20d7ece1382306605765e9",
        "content": "2",
        "source": "web",
        "startTime": "2018-11-11 11:00:00",
        "endTime": "2018-11-11 11:00:00"
      },
      {
        "id": "5b20d7efe138230661543fe7",
        "content": "3",
        "source": "web",
        "startTime": "2018-11-11 11:00:00",
        "endTime": "2018-11-11 11:00:00"
      },
    ],
    "pageNum": 1,
    "pageSize": 100,
    "total": 8
  }
}

ID查询引导语接口

Method

POST

URL

/v1/findPlaceholderGuide

参数

name position required type limit description
id body true string * 条目 ID
src body true string * 请求来源

请求示例

curl -X POST \
  http://192.168.100.50:8000/v1/findPlaceholderGuide \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: pin-guide-ms.juejin.im' \
  -d 'id=1111111111&src=test'

返回示例

{
  "s": 1,
  "m": "ok",
  "d": {
    "data": {
      "id": "5b20dae6e1382306624a0676",
      "content": "5",
      "source": "web",
      "startTime": "2018-11-11 11:00:00",
      "endTime": "2018-11-11 11:00:00"
    }
  }
}

删除引导语接口

Method

POST

URL

/v1/delPlaceholderGuide

参数

name position required type limit description
id body true string * 条目 ID
src body true string * 请求来源

请求示例

curl -X POST \
  http://192.168.100.50:8000/v1/delPlaceholderGuide \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: pin-guide-ms.juejin.im' \
  -d 'src=test&id=5b1793f7a9574'

返回示例

{
    "s": 1,
    "m": "ok",
    "d": []
}

修改引导语接口

Method

POST

URL

/v1/updatePlaceholderGuide

参数

name position required type limit description
id body true string * 条目 ID
src body true string * 请求来源
content body false string * 引导语内容
source body false string * 平台
startTime body false string * 开始时间
endTime body false string * 结束时间

备注

startTime 与 endTime
参数同步传递
不能只传其中一个
两个参数需同时传递

请求示例

curl -X POST \
  http://192.168.100.50:8000/v1/updatePlaceholderGuide \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: pin-guide-ms.juejin.im' \
  -d 'content=test&source=test&startTime=2018-06-05 08:27:06&endTime=2018-06-05 08:27:06&src=test&id=111111'

返回示例

{
    "s": 1,
    "m": "ok",
    "d": []
}