main.php 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. # 注册api
  3. # api仅有三种类型:get、update、delete
  4. return array
  5. (
  6. 'vote.save' => array
  7. (
  8. 'name' => '用户点赞',
  9. 'request' => array
  10. (
  11. 'id' => '数据来源id',
  12. 'table' => '数据来源类型',
  13. ),
  14. 'response' => array
  15. (
  16. 'state' => '状态',
  17. ),
  18. 'order' => 100,
  19. 'type' => 2,
  20. # 安全加密
  21. 'secure' => true,
  22. ),
  23. 'review.save' => array
  24. (
  25. 'name' => '用户评论',
  26. 'request' => array
  27. (
  28. 'post' => '主题id',
  29. 'content' => '内容',
  30. ),
  31. 'response' => array
  32. (
  33. 'state' => '状态',
  34. ),
  35. 'order' => 99,
  36. 'type' => 2,
  37. # 安全加密
  38. 'secure' => true,
  39. ),
  40. 'posts.save' => array
  41. (
  42. 'name' => '发布主题',
  43. 'request' => array
  44. (
  45. 'post' => '主题id',
  46. 'cate' => '主题分类',
  47. 'name' => '主题名称',
  48. 'content' => '主题内容',
  49. ),
  50. 'response' => array
  51. (
  52. 'state' => '状态',
  53. ),
  54. 'order' => 98,
  55. 'type' => 2,
  56. # 安全加密
  57. 'secure' => true,
  58. ),
  59. );