123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
- /**
- * @file
- * uuid_services_example.services.inc
- */
- /**
- * Implements hook_default_services_endpoint().
- */
- function uuid_services_example_default_services_endpoint() {
- $export = array();
- $endpoint = new stdClass();
- $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
- $endpoint->api_version = 3;
- $endpoint->name = 'uuid_services_example';
- $endpoint->server = 'rest_server';
- $endpoint->path = 'api';
- $endpoint->authentication = array(
- 'services' => 'services',
- );
- $endpoint->server_settings = array(
- 'formatters' => array(
- 'json' => TRUE,
- 'bencode' => FALSE,
- 'jsonp' => FALSE,
- 'php' => FALSE,
- 'xml' => FALSE,
- 'yaml' => FALSE,
- ),
- 'parsers' => array(
- 'application/json' => TRUE,
- 'application/x-www-form-urlencoded' => TRUE,
- 'multipart/form-data' => TRUE,
- 'application/vnd.php.serialized' => FALSE,
- 'application/x-yaml' => FALSE,
- 'application/xml' => FALSE,
- 'text/xml' => FALSE,
- ),
- );
- $endpoint->resources = array(
- 'comment' => array(
- 'operations' => array(
- 'update' => array(
- 'enabled' => '1',
- ),
- ),
- ),
- 'file' => array(
- 'operations' => array(
- 'update' => array(
- 'enabled' => '1',
- ),
- ),
- ),
- 'node' => array(
- 'operations' => array(
- 'update' => array(
- 'enabled' => '1',
- ),
- ),
- ),
- 'taxonomy_term' => array(
- 'operations' => array(
- 'update' => array(
- 'enabled' => '1',
- ),
- ),
- ),
- 'user' => array(
- 'operations' => array(
- 'update' => array(
- 'enabled' => '1',
- ),
- ),
- 'actions' => array(
- 'login' => array(
- 'enabled' => '1',
- 'settings' => array(
- 'services' => array(
- 'resource_api_version' => '1.0',
- ),
- ),
- ),
- 'logout' => array(
- 'enabled' => '1',
- 'settings' => array(
- 'services' => array(
- 'resource_api_version' => '1.0',
- ),
- ),
- ),
- ),
- ),
- );
- $endpoint->debug = 1;
- $export['uuid_services_example'] = $endpoint;
- return $export;
- }
|