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