You are here

function geocoder_services_resources in Geocoder 7

Implements hook_services_resources().

File

./geocoder.services.inc, line 11
geocoder.services.inc

Code

function geocoder_services_resources() {
  return array(
    'geocoder' => array(
      'retrieve' => array(
        'help' => 'Geocode data',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder',
          'name' => 'geocoder.services',
        ),
        'callback' => 'geocoder_services_geocode',
        'access callback' => 'geocoder_services_access',
        'access arguments append' => TRUE,
        'args' => array(
          array(
            'name' => 'handler',
            'type' => 'string',
            'description' => 'The geocoder handler to use - google, gpx, kml etc.',
            '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 (GPX, WKT, etc.)',
            'source' => array(
              'param' => 'output',
            ),
            'optional' => TRUE,
          ),
        ),
      ),
      'index' => array(
        'help' => 'List Geocoder Capabilities',
        'file' => array(
          'type' => 'inc',
          'module' => 'geocoder',
          'name' => 'geocoder.services',
        ),
        'callback' => 'geocoder_services_capabilities',
        // Always returns TRUE.
        'access callback' => 'geocoder_services_capabilities_ac',
      ),
    ),
  );
}