endpoints.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // 组信
  27. GM: '/gm',
  28. GMUnread: '/gm/unread',
  29. GMUnreadCount: '/gm/unread/count',
  30. GMStats: '/gm/statistic',
  31. //系统消息
  32. SM: '/sm'
  33. },
  34. Users: {
  35. Base: '/api/v1/users',
  36. Login: '/login',
  37. Logout: '/logout',
  38. User: '/:user_id',
  39. UserStatus: '/:user_id/status'
  40. },
  41. Groups: {
  42. Base: '/api/v1/groups',
  43. MembersAvatar: '/member/avatars'
  44. },
  45. Management: {
  46. Base: '/api/v1/management',
  47. Health: '/health',
  48. DbStatus: '/db'
  49. },
  50. Push: {
  51. Base: '/api/v1/push',
  52. Getui: '/getui'
  53. }
  54. };
  55. var pages = {
  56. Home: {
  57. Index: '/'
  58. }
  59. };
  60. module.exports.PAGES = pages;
  61. module.exports.APIv1 = APIv1;