You are here

function services_resource_api_version_info in Services 7.3

Same name and namespace in other branches
  1. 6.3 services.module \services_resource_api_version_info()

Returns information about resource API version information. The resource API is the way modules expose resources to services, not the API that is exposed to the consumers of your services.

Return value

array API version information. 'default_version' is the version that's assumed if the module doesn't declare an API version. 'versions' is an array containing the known API versions. 'current_version' is the current version number.

2 calls to services_resource_api_version_info()
_services_build_resources in includes/services.resource_build.inc
Builds the resource definition array for a endpoint.
_services_resource_upgrade in includes/services.resource_build.inc
Upgrades old resource definition to the newer format.

File

./services.module, line 538
Provides a generic but powerful API for web services.

Code

function services_resource_api_version_info() {
  $info = array(
    'default_version' => 3001,
    'versions' => array(
      3002,
    ),
  );
  $info['current_version'] = max($info['versions']);
  return $info;
}