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.

255 lines
5.2 KiB

3 years ago
3 years ago
3 years ago
  1. #List
  2. #### *setPlaceholderGuide*
  3. ##### **新增引导语接口**
  4. #### *getPlaceholderGuide*
  5. ##### **分页获取引导语接口**
  6. #### *findPlaceholderGuide*
  7. ##### **ID查询引导语接口**
  8. #### *delPlaceholderGuide*
  9. ##### **删除引导语接口**
  10. #### *updatePlaceholderGuide*
  11. ##### **修改引导语接口**
  12. # 接口
  13. ### 新增引导语接口
  14. #### Method
  15. `POST`
  16. #### URL
  17. `/v1/setPlaceholderGuide`
  18. #### 参数
  19. name | position | required | type | limit | description
  20. -------------|----------|----------|--------|-----------|-------------
  21. content | body | true | string | * | 引导语内容
  22. source | body | true | string | * | 平台
  23. startTime | body | true | string | * | 开始时间
  24. endTime | body | true | string | * | 结束时间
  25. src | body | true | string | * | 请求来源
  26. #### 请求示例
  27. ```
  28. curl -X POST \
  29. http://192.168.100.50:8000/v1/setPlaceholderGuide \
  30. -H 'Content-Type: application/x-www-form-urlencoded' \
  31. -H 'Host: pin-guide-ms.juejin.im' \
  32. -d 'content=test&source=test&startTime=2018-06-05 08:27:06&endTime=2018-06-05 08:27:06&src=test'
  33. ```
  34. #### 返回示例
  35. ```
  36. {
  37. "s": 1,
  38. "m": "ok",
  39. "d": {}
  40. }
  41. ```
  42. ### 分页获取引导语接口
  43. #### Method
  44. `POST`
  45. #### URL
  46. `/v1/getPlaceholderGuide`
  47. #### 参数
  48. name | position | required | type | limit | description
  49. -------------|----------|----------|--------|---------|-------------
  50. pageNum | body | true | string | * | 页码
  51. pageSize | body | true | string | * | 每页条数
  52. src | body | true | string | * | 请求来源
  53. #### 请求示例
  54. ```
  55. curl -X POST \
  56. http://192.168.100.50:8000/v1/getPlaceholderGuide \
  57. -H 'Content-Type: application/x-www-form-urlencoded' \
  58. -H 'Host: pin-guide-ms.juejin.im' \
  59. -d 'pageNum=1&pageSize=10&src=test'
  60. ```
  61. #### 返回示例
  62. ```
  63. {
  64. "s": 1,
  65. "m": "ok",
  66. "d": {
  67. "data": [
  68. {
  69. "id": "5b20d2bfe13823065f556177",
  70. "content": "1",
  71. "source": "web",
  72. "startTime": "2018-11-11 11:00:00",
  73. "endTime": "2018-11-11 11:00:00"
  74. },
  75. {
  76. "id": "5b20d7ece1382306605765e9",
  77. "content": "2",
  78. "source": "web",
  79. "startTime": "2018-11-11 11:00:00",
  80. "endTime": "2018-11-11 11:00:00"
  81. },
  82. {
  83. "id": "5b20d7efe138230661543fe7",
  84. "content": "3",
  85. "source": "web",
  86. "startTime": "2018-11-11 11:00:00",
  87. "endTime": "2018-11-11 11:00:00"
  88. },
  89. ],
  90. "pageNum": 1,
  91. "pageSize": 100,
  92. "total": 8
  93. }
  94. }
  95. ```
  96. ### ID查询引导语接口
  97. #### Method
  98. `POST`
  99. #### URL
  100. `/v1/findPlaceholderGuide`
  101. #### 参数
  102. name | position | required | type | limit | description
  103. -------------|----------|----------|--------|---------|-------------
  104. id | body | true | string | * | 条目 ID
  105. src | body | true | string | * | 请求来源
  106. #### 请求示例
  107. ```
  108. curl -X POST \
  109. http://192.168.100.50:8000/v1/findPlaceholderGuide \
  110. -H 'Content-Type: application/x-www-form-urlencoded' \
  111. -H 'Host: pin-guide-ms.juejin.im' \
  112. -d 'id=1111111111&src=test'
  113. ```
  114. #### 返回示例
  115. ```
  116. {
  117. "s": 1,
  118. "m": "ok",
  119. "d": {
  120. "data": {
  121. "id": "5b20dae6e1382306624a0676",
  122. "content": "5",
  123. "source": "web",
  124. "startTime": "2018-11-11 11:00:00",
  125. "endTime": "2018-11-11 11:00:00"
  126. }
  127. }
  128. }
  129. ```
  130. ### 删除引导语接口
  131. #### Method
  132. `POST`
  133. #### URL
  134. `/v1/delPlaceholderGuide`
  135. #### 参数
  136. name | position | required | type | limit | description
  137. -------------|----------|----------|--------|---------|-------------
  138. id | body | true | string | * | 条目 ID
  139. src | body | true | string | * | 请求来源
  140. #### 请求示例
  141. ```
  142. curl -X POST \
  143. http://192.168.100.50:8000/v1/delPlaceholderGuide \
  144. -H 'Content-Type: application/x-www-form-urlencoded' \
  145. -H 'Host: pin-guide-ms.juejin.im' \
  146. -d 'src=test&id=5b1793f7a9574'
  147. ```
  148. #### 返回示例
  149. ```
  150. {
  151. "s": 1,
  152. "m": "ok",
  153. "d": []
  154. }
  155. ```
  156. ### 修改引导语接口
  157. #### Method
  158. `POST`
  159. #### URL
  160. `/v1/updatePlaceholderGuide`
  161. #### 参数
  162. name | position | required | type | limit | description
  163. -------------|----------|----------|--------|---------|-------------
  164. id | body | true | string | * | 条目 ID
  165. src | body | true | string | * | 请求来源
  166. content | body | false | string | * | 引导语内容
  167. source | body | false | string | * | 平台
  168. startTime | body | false | string | * | 开始时间
  169. endTime | body | false | string | * | 结束时间
  170. #### **备注**
  171. startTime 与 endTime
  172. 参数同步传递
  173. 不能只传其中一个
  174. 两个参数需同时传递
  175. #### 请求示例
  176. ```
  177. curl -X POST \
  178. http://192.168.100.50:8000/v1/updatePlaceholderGuide \
  179. -H 'Content-Type: application/x-www-form-urlencoded' \
  180. -H 'Host: pin-guide-ms.juejin.im' \
  181. -d 'content=test&source=test&startTime=2018-06-05 08:27:06&endTime=2018-06-05 08:27:06&src=test&id=111111'
  182. ```
  183. #### 返回示例
  184. ```
  185. {
  186. "s": 1,
  187. "m": "ok",
  188. "d": []
  189. }
  190. ```