You are here

function geocoder_services_services_resources in Geocoder 7.2

Implements hook_services_resources().

File

modules/geocoder_services/geocoder_services.module, line 35
Geocoder Services module.

Code

function geocoder_services_services_resources() {
  return array(
    'geocoder_geocode' => array(
      'retrieve' => array(
        'help' => 'Geocode data',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder_services',
          'name' => 'geocoder_services.services',
        ),
        'callback' => 'geocoder_services_geocoder_geocode_callback',
        'access callback' => 'geocoder_services_services_access',
        'access arguments append' => TRUE,
        'args' => array(
          array(
            'name' => 'plugin',
            'type' => 'string',
            'description' => 'The geocoder plugin to use',
            'source' => array(
              'path' => '0',
            ),
            'optional' => FALSE,
          ),
          array(
            'name' => 'data',
            'type' => 'string',
            'description' => 'Value to geocode',
            'source' => array(
              'param' => 'data',
            ),
            'optional' => FALSE,
          ),
          array(
            'name' => 'output',
            'type' => 'string',
            'description' => 'Output format',
            'source' => array(
              'param' => 'output',
            ),
            'optional' => TRUE,
            'default value' => 'geojson',
          ),
        ),
      ),
      'index' => array(
        'help' => 'List Geocoder Capabilities',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder_services',
          'name' => 'geocoder_services.services',
        ),
        'callback' => 'geocoder_services_services_capabilities',
        'access callback' => 'geocoder_services_services_capabilities_ac',
      ),
    ),
    'geocoder_reverse' => array(
      'retrieve' => array(
        'help' => 'Reverse geocode data',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder_services',
          'name' => 'geocoder_services.services',
        ),
        'callback' => 'geocoder_services_geocoder_reverse_callback',
        'access callback' => 'geocoder_services_services_access',
        'access arguments append' => TRUE,
        'args' => array(
          array(
            'name' => 'plugin',
            'type' => 'string',
            'description' => 'The geocoder plugin to use',
            'source' => array(
              'path' => '0',
            ),
            'optional' => FALSE,
          ),
          array(
            'name' => 'data',
            'type' => 'string',
            'description' => 'Value to reverse geocode',
            'source' => array(
              'param' => 'data',
            ),
            'optional' => FALSE,
          ),
          array(
            'name' => 'output',
            'type' => 'string',
            'description' => 'Output format',
            'source' => array(
              'param' => 'output',
            ),
            'optional' => TRUE,
            'default value' => 'geojson',
          ),
        ),
      ),
      'index' => array(
        'help' => 'List Geocoder Capabilities',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder_services',
          'name' => 'geocoder_services.services',
        ),
        'callback' => 'geocoder_services_services_capabilities',
        'access callback' => 'geocoder_services_services_capabilities_ac',
      ),
    ),
  );
}