apis.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module.exports = {};
  2. function define( key, value ) {
  3. module.exports[key] = value;
  4. }
  5. define( 'user', {
  6. 'getToken' : '/user/getToken',
  7. 'refresh' : '/user/refresh',
  8. 'checkOnline' : '/user/checkOnline',
  9. 'block' : '/user/block',
  10. 'unblock' : '/user/unblock',
  11. 'queryBlocked' : '/user/block/query',
  12. 'addToBlackList' : '/user/blacklist/add',
  13. 'removeFromBlacklist' : '/user/blacklist/remove',
  14. 'queryBlacklist' : '/user/blacklist/query'
  15. } );
  16. define( 'message', {
  17. 'private' : {
  18. 'publish' : '/message/publish',
  19. 'publish_template' : '/message/private/publish_template'
  20. },
  21. 'system' : {
  22. 'publish' : '/message/system/publish'
  23. },
  24. 'group' : {
  25. 'publish' : '/message/group/publish'
  26. },
  27. 'chatroom' : {
  28. 'publish' : '/message/chatroom/publish'
  29. },
  30. 'publish' : '/message/publish',
  31. 'broadcast' : '/message/broadcast',
  32. 'history' : '/message/history'
  33. } );
  34. define( 'group', {
  35. 'sync' : '/group/sync',
  36. 'create' : '/group/create',
  37. 'quit' : '/group/quit',
  38. 'dismiss' : '/group/dismiss',
  39. 'refresh' : '/group/refresh'
  40. } );
  41. define( 'chatroom', {
  42. 'create' : '/chatroom/create',
  43. 'destroy' : '/chatroom/destroy',
  44. 'query' : '/chatroom/query',
  45. 'user' : {
  46. 'query' : '/chatroom/user/query'
  47. }
  48. } );