swagger.yaml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. definitions:
  2. models.ChatRoomListReq:
  3. properties:
  4. category:
  5. type: string
  6. name:
  7. type: string
  8. page:
  9. type: integer
  10. pageSize:
  11. type: integer
  12. type: object
  13. models.JoinChatroomParam:
  14. properties:
  15. roomId:
  16. type: string
  17. userId:
  18. type: string
  19. type: object
  20. models.LeaveChatroomParam:
  21. properties:
  22. roomId:
  23. type: string
  24. userId:
  25. type: string
  26. type: object
  27. models.MessageParam:
  28. properties:
  29. message:
  30. type: string
  31. messageType:
  32. type: string
  33. roomId:
  34. type: string
  35. userId:
  36. type: string
  37. type: object
  38. info:
  39. contact: {}
  40. license: {}
  41. paths:
  42. /api/chatroom/classification:
  43. get:
  44. consumes:
  45. - application/json
  46. description: 房间分类列表
  47. produces:
  48. - application/json
  49. responses:
  50. "200":
  51. description: '{"code":200, "message":"success"}'
  52. schema:
  53. type: string
  54. summary: 房间分类列表
  55. tags:
  56. - 房间操作
  57. /api/chatroom/detail:
  58. get:
  59. consumes:
  60. - application/json
  61. description: 获取房间详情
  62. parameters:
  63. - description: 房间id
  64. in: query
  65. name: room_id
  66. required: true
  67. type: string
  68. produces:
  69. - application/json
  70. responses:
  71. "200":
  72. description: '{"code":200, "message":"success"}'
  73. schema:
  74. type: string
  75. summary: 获取房间详情
  76. tags:
  77. - 房间操作
  78. /api/chatroom/join:
  79. post:
  80. consumes:
  81. - application/json
  82. description: 加入房间
  83. parameters:
  84. - description: 加入房间请求body
  85. in: body
  86. name: body
  87. required: true
  88. schema:
  89. $ref: '#/definitions/models.JoinChatroomParam'
  90. type: object
  91. produces:
  92. - application/json
  93. responses:
  94. "200":
  95. description: '{"code":200, "message":"success"}'
  96. schema:
  97. type: string
  98. summary: 加入房间
  99. tags:
  100. - 房间管理
  101. /api/chatroom/leave:
  102. post:
  103. consumes:
  104. - application/json
  105. description: 离开房间
  106. parameters:
  107. - description: 离开房间请求body
  108. in: body
  109. name: body
  110. required: true
  111. schema:
  112. $ref: '#/definitions/models.LeaveChatroomParam'
  113. type: object
  114. produces:
  115. - application/json
  116. responses:
  117. "200":
  118. description: '{"code":200, "message":"success"}'
  119. schema:
  120. type: string
  121. summary: 离开房间
  122. tags:
  123. - 房间管理
  124. /api/chatroom/list:
  125. post:
  126. consumes:
  127. - application/json
  128. description: 房间列表
  129. parameters:
  130. - description: 房间请求列表body
  131. in: body
  132. name: body
  133. required: true
  134. schema:
  135. $ref: '#/definitions/models.ChatRoomListReq'
  136. type: object
  137. produces:
  138. - application/json
  139. responses:
  140. "200":
  141. description: '{"code":200, "message":"success"}'
  142. schema:
  143. type: string
  144. summary: 房间列表
  145. tags:
  146. - 房间操作
  147. /api/chatroom/view:
  148. get:
  149. consumes:
  150. - application/json
  151. description: 进入直播间
  152. parameters:
  153. - description: 房间id
  154. in: query
  155. name: room_id
  156. required: true
  157. type: string
  158. produces:
  159. - application/json
  160. responses:
  161. "200":
  162. description: '{"code":200, "message":"success"}'
  163. schema:
  164. type: string
  165. summary: 进入直播间
  166. tags:
  167. - 房间操作
  168. /api/graphic/list:
  169. get:
  170. consumes:
  171. - application/json
  172. description: 图文列表
  173. parameters:
  174. - description: 房间id
  175. in: query
  176. name: room_id
  177. required: true
  178. type: string
  179. produces:
  180. - application/json
  181. responses:
  182. "200":
  183. description: '{"code":200, "message":"success"}'
  184. schema:
  185. type: string
  186. summary: 图文列表
  187. tags:
  188. - 直播间图文
  189. /api/message/send:
  190. post:
  191. consumes:
  192. - application/json
  193. description: 发送消息
  194. parameters:
  195. - description: 发送请求body
  196. in: body
  197. name: body
  198. required: true
  199. schema:
  200. $ref: '#/definitions/models.MessageParam'
  201. type: object
  202. produces:
  203. - application/json
  204. responses:
  205. "200":
  206. description: '{"code":200, "message":"success"}'
  207. schema:
  208. type: string
  209. summary: 发送消息
  210. tags:
  211. - 消息管理
  212. /api/message/timeline:
  213. get:
  214. description: 获取历史消息记录
  215. parameters:
  216. - description: 用户id
  217. in: query
  218. name: userId
  219. type: string
  220. - description: 房间id
  221. in: query
  222. name: roomId
  223. required: true
  224. type: string
  225. - description: 当前页
  226. in: query
  227. name: pageIndex
  228. required: true
  229. type: integer
  230. - description: 每页数量
  231. in: query
  232. name: pageSize
  233. required: true
  234. type: integer
  235. produces:
  236. - application/json
  237. responses:
  238. "200":
  239. description: '{"code":200, "message":"success", "data":{}}'
  240. schema:
  241. type: string
  242. summary: 获取历史消息记录
  243. tags:
  244. - 消息管理
  245. /api/wx/share:
  246. get:
  247. consumes:
  248. - application/json
  249. description: 微信自定义分享
  250. produces:
  251. - application/json
  252. responses:
  253. "200":
  254. description: '{"code":200, "message":"success"}'
  255. schema:
  256. type: string
  257. summary: 分享
  258. tags:
  259. - 用户操作
  260. /wx/h5/login:
  261. get:
  262. consumes:
  263. - application/json
  264. description: 登录
  265. produces:
  266. - application/json
  267. responses:
  268. "200":
  269. description: '{"code":200, "message":"success"}'
  270. schema:
  271. type: string
  272. summary: 登录
  273. tags:
  274. - 用户操作
  275. swagger: "2.0"