You are here

function countries_api_service_get_country in Country codes API 5

Service for accessing countries_api_get_country()

Parameters

$code : An string containging the iso3 country value

Return value

string Returns an array containing the country fields

1 string reference to 'countries_api_service_get_country'
countries_api_service_service in contrib/countries_api_service/countries_api_service.module
Implementation of hook_service()

File

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

Code

function countries_api_service_get_country($code) {
  $countries = countries_api_service_get_country($code);
  if (!$countries) {
    return services_error(t('No countries where found with the given argument.'));
  }
  return $countries;
}