Go框架demo
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.

79 lines
878 B

3 years ago
  1. # 接口
  2. ```bash
  3. IP: 192.168.100.50
  4. PORT: 8000
  5. HOST: baidu-link-submit-ms.juejin.im
  6. ```
  7. ## 资源创建通知
  8. ### 请求
  9. `POST /v1/events/created`
  10. ### 参数
  11. ```bash
  12. # 格式
  13. Content-Type: application/json; charset=utf-8
  14. {
  15. type,
  16. id
  17. }
  18. ```
  19. ```bash
  20. # 说明
  21. type := 'link' | 'column'
  22. # type -> 资源类型,必需
  23. # link -> 链接
  24. # column -> 专栏
  25. id := <string>
  26. # id -> 资源 ID,必需
  27. ```
  28. ### 响应
  29. ```bash
  30. {
  31. "s": 1,
  32. "m": "success",
  33. "d": []
  34. }
  35. ```
  36. ### 示例
  37. ```bash
  38. # 专栏文章创建后
  39. POST http://192.168.100.50:8000/v1/events/created HTTP/1.1
  40. Host: baidu-link-submit-ms.juejin.im
  41. Content-Type: application/json
  42. {
  43. "type": "column",
  44. "id": "5ac9dc9af265da23884d5543"
  45. }
  46. ```
  47. ## 资源更新通知
  48. ### 请求
  49. `POST /v1/events/updated`
  50. 其余同上。
  51. ## 资源删除通知
  52. ### 请求
  53. `POST /v1/events/deleted`
  54. 其余同上。