routes.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Bjoern Schiessle <bjoern@schiessle.org>
  6. * @author Björn Schießle <bjoern@schiessle.org>
  7. * @author Christopher Schäpers <kondou@ts.unde.re>
  8. * @author Joas Schilling <coding@schilljs.com>
  9. * @author Morris Jobke <hey@morrisjobke.de>
  10. * @author Robin McCorkell <robin@mccorkell.me.uk>
  11. * @author Thomas Müller <thomas.mueller@tmit.eu>
  12. * @author Tom Needham <tom@owncloud.com>
  13. *
  14. * @license AGPL-3.0
  15. *
  16. * This code is free software: you can redistribute it and/or modify
  17. * it under the terms of the GNU Affero General Public License, version 3,
  18. * as published by the Free Software Foundation.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU Affero General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU Affero General Public License, version 3,
  26. * along with this program. If not, see <http://www.gnu.org/licenses/>
  27. *
  28. */
  29. use OCP\API;
  30. // Person
  31. API::register(
  32. 'post',
  33. '/person/check',
  34. array('OC_OCS_Person', 'check'),
  35. 'core',
  36. API::GUEST_AUTH
  37. );
  38. // Privatedata
  39. API::register(
  40. 'get',
  41. '/privatedata/getattribute',
  42. array('OC_OCS_Privatedata', 'get'),
  43. 'core',
  44. API::USER_AUTH,
  45. array('app' => '', 'key' => '')
  46. );
  47. API::register(
  48. 'get',
  49. '/privatedata/getattribute/{app}',
  50. array('OC_OCS_Privatedata', 'get'),
  51. 'core',
  52. API::USER_AUTH,
  53. array('key' => '')
  54. );
  55. API::register(
  56. 'get',
  57. '/privatedata/getattribute/{app}/{key}',
  58. array('OC_OCS_Privatedata', 'get'),
  59. 'core',
  60. API::USER_AUTH
  61. );
  62. API::register(
  63. 'post',
  64. '/privatedata/setattribute/{app}/{key}',
  65. array('OC_OCS_Privatedata', 'set'),
  66. 'core',
  67. API::USER_AUTH
  68. );
  69. API::register(
  70. 'post',
  71. '/privatedata/deleteattribute/{app}/{key}',
  72. array('OC_OCS_Privatedata', 'delete'),
  73. 'core',
  74. API::USER_AUTH
  75. );