first import
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* uuid_services_example.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function uuid_services_example_ctools_plugin_api() {
|
||||
list($module, $api) = func_get_args();
|
||||
if ($module == "services" && $api == "services") {
|
||||
return array("version" => "3");
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
core = "7.x"
|
||||
dependencies[] = "rest_server"
|
||||
dependencies[] = "services"
|
||||
dependencies[] = "uuid"
|
||||
dependencies[] = "uuid_services"
|
||||
description = "Example feature of a UUID service. Works well with the Deploy Example feature as a client."
|
||||
features[ctools][] = "services:services:3"
|
||||
features[services_endpoint][] = "uuid_services_example"
|
||||
name = "UUID Services Example"
|
||||
package = "Features"
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-02-03
|
||||
version = "7.x-1.0-alpha3+52-dev"
|
||||
core = "7.x"
|
||||
project = "uuid"
|
||||
datestamp = "1359858369"
|
||||
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Code for the UUID Services Example feature.
|
||||
*/
|
||||
|
||||
include_once('uuid_services_example.features.inc');
|
@@ -0,0 +1,89 @@
|
||||
<?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,
|
||||
'rss' => 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,
|
||||
),
|
||||
);
|
||||
$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,
|
||||
),
|
||||
'logout' => array(
|
||||
'enabled' => 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
$endpoint->debug = 1;
|
||||
$export['uuid_services_example'] = $endpoint;
|
||||
|
||||
return $export;
|
||||
}
|
Reference in New Issue
Block a user