com.google.api.client.googleapis.json
Class DiscoveryDocument

java.lang.Object
  extended by com.google.api.client.googleapis.json.DiscoveryDocument

public final class DiscoveryDocument
extends Object

Manages a Google API discovery document based on the JSON format.

Since:
1.0
Author:
Yaniv Inbar

Nested Class Summary
static class DiscoveryDocument.ServiceDefinition
          Defines a specific version of an API.
static class DiscoveryDocument.ServiceMethod
          Defines a method of a service resource.
static class DiscoveryDocument.ServiceParameter
          Defines a parameter to a service method.
static class DiscoveryDocument.ServiceResource
          Defines a resource in a service definition.
 
Field Summary
 DiscoveryDocument.ServiceDefinition serviceDefinition
          API service definition parsed from discovery document.
 HttpTransport transport
          Google transport required by buildRequest(java.lang.String, java.lang.Object).
 
Method Summary
 HttpRequest buildRequest(String fullyQualifiedMethodName, Object parameters)
          Creates an HTTP request based on the given method name and parameters.
static DiscoveryDocument execute(String api)
          Deprecated. (scheduled to be removed in version 1.1) Use load(String)
static DiscoveryDocument load(String apiName)
          Executes a request for the JSON-formatted discovery document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceDefinition

public final DiscoveryDocument.ServiceDefinition serviceDefinition
API service definition parsed from discovery document.


transport

public HttpTransport transport
Google transport required by buildRequest(java.lang.String, java.lang.Object).

Method Detail

execute

@Deprecated
public static DiscoveryDocument execute(String api)
                                 throws IOException
Deprecated. (scheduled to be removed in version 1.1) Use load(String)

Executes a request for the JSON-formatted discovery document.

Parameters:
api - API name
Returns:
discovery document
Throws:
IOException - I/O exception executing request

load

public static DiscoveryDocument load(String apiName)
                              throws IOException
Executes a request for the JSON-formatted discovery document.

Parameters:
apiName - API name
Returns:
discovery document
Throws:
IOException - I/O exception executing request

buildRequest

public HttpRequest buildRequest(String fullyQualifiedMethodName,
                                Object parameters)
                         throws IOException
Creates an HTTP request based on the given method name and parameters.

Parameters:
fullyQualifiedMethodName - name of method as defined in Discovery document of format "resourceName.methodName"
parameters - user defined key / value data mapping
Returns:
HTTP request
Throws:
IOException - I/O exception reading


Copyright © 2010 Google. All Rights Reserved.