View source
<?php
function bat_api_default_services_endpoint() {
$export = array();
$endpoint = new stdClass();
$endpoint->disabled = FALSE;
$endpoint->api_version = 3;
$endpoint->name = 'bat_api';
$endpoint->server = 'rest_server';
$endpoint->path = 'bat/v2';
$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/vnd.php.serialized' => TRUE,
'application/x-www-form-urlencoded' => TRUE,
'application/x-yaml' => TRUE,
'application/xml' => TRUE,
'multipart/form-data' => TRUE,
'text/xml' => TRUE,
),
);
$endpoint->resources = array(
'events' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
'update' => array(
'enabled' => '1',
),
),
),
'events-calendar' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
),
),
'matching-units-calendar' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
),
),
'types' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
'update' => array(
'enabled' => '1',
),
),
'actions' => array(
'add' => array(
'enabled' => '1',
),
),
),
'units' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
'update' => array(
'enabled' => '1',
),
),
'actions' => array(
'add' => array(
'enabled' => '1',
),
),
),
'units-calendar' => array(
'operations' => array(
'index' => array(
'enabled' => '1',
),
),
),
'user' => array(
'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',
),
),
),
'token' => array(
'enabled' => '1',
),
),
),
);
$endpoint->debug = 0;
$export['bat_api'] = $endpoint;
return $export;
}