apis.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. 'user' : {
  41. 'query' : '/group/user/query',
  42. 'gag' : {
  43. 'add' : '/group/user/gag/add',
  44. 'rollback' : '/group/user/gag/rollback',
  45. 'list' : '/group/user/gag/list'
  46. }
  47. }
  48. } );
  49. define( 'chatroom', {
  50. 'create' : '/chatroom/create',
  51. 'destroy' : '/chatroom/destroy',
  52. 'query' : '/chatroom/query',
  53. 'join' : '/chatroom/join',
  54. 'user' : {
  55. 'query' : '/chatroom/user/query',
  56. 'gagAdd' : '/chatroom/user/gag/add',
  57. 'gagRollback' : '/chatroom/user/gag/rollback',
  58. 'gagList' : '/chatroom/user/gag/list',
  59. 'blockAdd' : '/chatroom/user/block/add',
  60. 'blockRollback' : '/chatroom/user/block/rollback',
  61. 'blockList' : '/chatroom/user/block/list'
  62. },
  63. 'message' : {
  64. 'stop' : '/chatroom/message/stopDistribution',
  65. 'resume' : '/chatroom/message/resumeDistribution'
  66. }
  67. } );
  68. define( 'wordfilter', {
  69. 'add' : '/wordfilter/add',
  70. 'delete' : '/wordfilter/delete',
  71. 'list' : '/wordfilter/list'
  72. } );
  73. define( 'sms', {
  74. 'send' : '/send',
  75. 'sendCode' : '/sendCode',
  76. 'verifyCode' : '/verifyCode',
  77. 'getImgCode' : '/getImgCode'
  78. } );