endpoints.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * REST API,以端点的形式提供。
  3. *
  4. * 若想访问包含页面的内容,请在相应的API后面添加.html。
  5. */
  6. var APIv1 = {
  7. Application: {
  8. Base: '/api/v1/application',
  9. BadgeNo: '/badge_no'
  10. },
  11. Chats: {
  12. Base: "/api/v1/chats",
  13. List: "/list",
  14. ListWithPatient: "/list/patient",
  15. ListWithDoctor: "/list/doctor",
  16. Recent: '/recent',
  17. SearchAboutPatient: '/search/patient',
  18. SearchAboutDoctor: '/search/doctor',
  19. // 所有未读消息数
  20. UnreadMsgCount: '/unread_count',
  21. // 私信
  22. PM: '/pm',
  23. PMUnread: '/pm/unread',
  24. PMUnreadCount: '/pm/unread/count',
  25. PMStats: '/pm/statistic',
  26. PMFinished: '/pm/finished', // 当前会话是否已经结束
  27. // 组信
  28. GM: '/gm',
  29. GMUnread: '/gm/unread',
  30. GMUnreadCount: '/gm/unread/count',
  31. GMStats: '/gm/statistic',
  32. //系统消息
  33. SM: '/sm'
  34. },
  35. Users: {
  36. Base: '/api/v1/users',
  37. Login: '/login',
  38. Logout: '/logout',
  39. User: '/:user_id',
  40. UserStatus: '/:user_id/status'
  41. },
  42. Groups: {
  43. Base: '/api/v1/groups',
  44. MembersAvatar: '/member/avatars'
  45. },
  46. Management: {
  47. Base: '/api/v1/management',
  48. Health: '/health',
  49. DbStatus: '/db'
  50. },
  51. Push: {
  52. Base: '/api/v1/push',
  53. Getui: '/getui'
  54. }
  55. };
  56. var pages = {
  57. Home: {
  58. Index: '/'
  59. }
  60. };
  61. module.exports.PAGES = pages;
  62. module.exports.APIv1 = APIv1;