messageCenter.api 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. syntax = "v1"
  2. info(
  3. title: "type title here"
  4. desc: "type desc here"
  5. author: "type author here"
  6. email: "type email here"
  7. version: "type version here"
  8. )
  9. type request {
  10. // TODO: add members here and delete this comment
  11. }
  12. type response {
  13. // TODO: add members here and delete this comment
  14. }
  15. type countReq {
  16. ReadType int64 `json:"readType"` // 已读类型
  17. MsgType int64 `json:"msgType"` // 消息类型
  18. SendId string `json:"sendId"` // 发送方id
  19. ReceiveId string `json:"receiveId"` // 接收方id
  20. }
  21. type countRes {
  22. }
  23. type getReq {
  24. }
  25. type getRes {
  26. ReadType int64 `json:"readType"` // 已读类型
  27. MsgType int64 `json:"msgType"` // 消息类型
  28. SendId string `json:"sendId"` // 发送方id
  29. ReceiveId string `json:"receiveId"` // 接收方id
  30. }
  31. service messageCenter {
  32. //
  33. @handler count
  34. get /api/message/count (countReq) returns (countRes)
  35. //
  36. @handler lastMessage
  37. get /api/message/last (getReq) returns (getRes)
  38. }