uuid_services_example.services.inc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * @file
  4. * uuid_services_example.services.inc
  5. */
  6. /**
  7. * Implements hook_default_services_endpoint().
  8. */
  9. function uuid_services_example_default_services_endpoint() {
  10. $export = array();
  11. $endpoint = new stdClass;
  12. $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
  13. $endpoint->api_version = 3;
  14. $endpoint->name = 'uuid_services_example';
  15. $endpoint->server = 'rest_server';
  16. $endpoint->path = 'api';
  17. $endpoint->authentication = array(
  18. 'services' => 'services',
  19. );
  20. $endpoint->server_settings = array(
  21. 'formatters' => array(
  22. 'json' => TRUE,
  23. 'bencode' => FALSE,
  24. 'jsonp' => FALSE,
  25. 'php' => FALSE,
  26. 'rss' => FALSE,
  27. 'xml' => FALSE,
  28. 'yaml' => FALSE,
  29. ),
  30. 'parsers' => array(
  31. 'application/json' => TRUE,
  32. 'application/x-www-form-urlencoded' => TRUE,
  33. 'multipart/form-data' => TRUE,
  34. 'application/vnd.php.serialized' => FALSE,
  35. 'application/x-yaml' => FALSE,
  36. ),
  37. );
  38. $endpoint->resources = array(
  39. 'comment' => array(
  40. 'operations' => array(
  41. 'update' => array(
  42. 'enabled' => 1,
  43. ),
  44. ),
  45. ),
  46. 'file' => array(
  47. 'operations' => array(
  48. 'update' => array(
  49. 'enabled' => 1,
  50. ),
  51. ),
  52. ),
  53. 'node' => array(
  54. 'operations' => array(
  55. 'update' => array(
  56. 'enabled' => 1,
  57. ),
  58. ),
  59. ),
  60. 'taxonomy_term' => array(
  61. 'operations' => array(
  62. 'update' => array(
  63. 'enabled' => 1,
  64. ),
  65. ),
  66. ),
  67. 'user' => array(
  68. 'operations' => array(
  69. 'update' => array(
  70. 'enabled' => 1,
  71. ),
  72. ),
  73. 'actions' => array(
  74. 'login' => array(
  75. 'enabled' => 1,
  76. ),
  77. 'logout' => array(
  78. 'enabled' => 1,
  79. ),
  80. ),
  81. ),
  82. );
  83. $endpoint->debug = 1;
  84. $export['uuid_services_example'] = $endpoint;
  85. return $export;
  86. }