You are here

function countries_api_service_service in Country codes API 5

Same name and namespace in other branches
  1. 6 contrib/countries_api_service/countries_api_service.module \countries_api_service_service()

Implementation of hook_service()

File

contrib/countries_api_service/countries_api_service.module, line 37
The module which exposes services related to countries_api TODO: Continue adding methods as services

Code

function countries_api_service_service() {
  return array(
    array(
      '#method' => 'countries_api.countries_api_get_country',
      '#callback' => 'countries_api_service_get_country',
      '#key' => FALSE,
      '#args' => array(
        array(
          '#name' => 'code',
          '#type' => 'string',
          '#description' => t('An iso3 country code.'),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Returns an array of country fields.'),
    ),
    array(
      '#method' => 'countries_api.countries_api_service_iso2_get_country',
      '#callback' => 'countries_api_service_iso2_get_country',
      '#key' => FALSE,
      '#args' => array(
        array(
          '#name' => 'code',
          '#type' => 'string',
          '#description' => t('An iso2 country code.'),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Returns an array of country fields.'),
    ),
    array(
      '#method' => 'countries_api.countries_api_service_iso3_get_country',
      '#callback' => 'countries_api_service_iso3_get_country',
      '#key' => FALSE,
      '#args' => array(
        array(
          '#name' => 'code',
          '#type' => 'string',
          '#description' => t('An iso3 country code.'),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Returns an array of country fields.'),
    ),
  );
}