You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * Copyright (c) 2012, Tom Needham <tom@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or later.
  5. * See the COPYING-README file.
  6. */
  7. // Config
  8. OC_API::register(
  9. 'get',
  10. '/config',
  11. array('OC_OCS_Config', 'apiConfig'),
  12. 'core',
  13. OC_API::GUEST_AUTH
  14. );
  15. // Person
  16. OC_API::register(
  17. 'post',
  18. '/person/check',
  19. array('OC_OCS_Person', 'check'),
  20. 'core',
  21. OC_API::GUEST_AUTH
  22. );
  23. // Privatedata
  24. OC_API::register(
  25. 'get',
  26. '/privatedata/getattribute',
  27. array('OC_OCS_Privatedata', 'get'),
  28. 'core',
  29. OC_API::USER_AUTH,
  30. array('app' => '', 'key' => '')
  31. );
  32. OC_API::register(
  33. 'get',
  34. '/privatedata/getattribute/{app}',
  35. array('OC_OCS_Privatedata', 'get'),
  36. 'core',
  37. OC_API::USER_AUTH,
  38. array('key' => '')
  39. );
  40. OC_API::register(
  41. 'get',
  42. '/privatedata/getattribute/{app}/{key}',
  43. array('OC_OCS_Privatedata', 'get'),
  44. 'core',
  45. OC_API::USER_AUTH
  46. );
  47. OC_API::register(
  48. 'post',
  49. '/privatedata/setattribute/{app}/{key}',
  50. array('OC_OCS_Privatedata', 'set'),
  51. 'core',
  52. OC_API::USER_AUTH
  53. );
  54. OC_API::register(
  55. 'post',
  56. '/privatedata/deleteattribute/{app}/{key}',
  57. array('OC_OCS_Privatedata', 'delete'),
  58. 'core',
  59. OC_API::USER_AUTH
  60. );
  61. // cloud
  62. OC_API::register(
  63. 'get',
  64. '/cloud/capabilities',
  65. array('OC_OCS_Cloud', 'getCapabilities'),
  66. 'core',
  67. OC_API::USER_AUTH
  68. );
  69. OC_API::register(
  70. 'get',
  71. '/cloud/users/{userid}',
  72. array('OC_OCS_Cloud', 'getUser'),
  73. 'core',
  74. OC_API::USER_AUTH
  75. );
  76. OC_API::register(
  77. 'get',
  78. '/cloud/user',
  79. array('OC_OCS_Cloud', 'getCurrentUser'),
  80. 'core',
  81. OC_API::USER_AUTH
  82. );