You are here

function regions_api_service_load in Country codes API 6

Returns an array of countries

1 string reference to 'regions_api_service_load'
regions_api_service_service in contrib/regions_api_service/regions_api_service.module
Implementation of hook_service().

File

contrib/regions_api_service/regions_api_service.module, line 59
The module which exposes services related to regions_api

Code

function regions_api_service_load($iso2) {
  $regions = regions_api_iso2_get_options_array($iso2);
  if (!$regions) {
    return services_error(t('No regions where found with the given argument.'));
  }
  return $regions;
}