endpoints.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. // 未读消息数
  15. UnreadMsgCount: '/unread_count',
  16. // 私信
  17. PM: '/pm',
  18. PMUnreadCount: '/pm/unread_count',
  19. PMStats: '/pm/statistic',
  20. // 组信
  21. GM: '/gm',
  22. GMUnreadCount: '/gm/unread_count',
  23. GMStats: '/gm/statistic',
  24. //系统消息
  25. SM: '/sm'
  26. },
  27. Users: {
  28. Base: '/api/v1/users',
  29. Login: '/login',
  30. Logout: '/logout',
  31. User: '/:user_id',
  32. UserStatus: '/:user_id/status'
  33. },
  34. Management: {
  35. Base: '/api/v1/management',
  36. Health: '/health',
  37. DbStatus: '/db'
  38. }
  39. };
  40. var pages = {
  41. Home: {
  42. Index: '/'
  43. }
  44. };
  45. module.exports.PAGES = pages;
  46. module.exports.APIv1 = APIv1;