public class

GoogleAuthApiRequest

extends Object
implements SafeParcelable
java.lang.Object
   ↳ com.google.android.gms.auth.api.GoogleAuthApiRequest

Class Overview

A request to be performed against Apiary.

Summary

Constants
String DEFAULT_SCOPE_PREFIX
int HTTP_METHOD_DELETE
int HTTP_METHOD_GET
int HTTP_METHOD_HEAD
int HTTP_METHOD_OPTIONS
int HTTP_METHOD_PATCH
int HTTP_METHOD_POST
int HTTP_METHOD_PUT
int HTTP_METHOD_TRACE
int VERSION_CODE
[Expand]
Inherited Constants
From interface android.os.Parcelable
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
Fields
public static final GoogleAuthApiRequestCreator CREATOR
Public Constructors
GoogleAuthApiRequest(String name, String version, String apiId)
Creates a request directed against a Google API.
GoogleAuthApiRequest(String name, String version, String path, int httpMethod)
Creates a request directed against a Google API.
Public Methods
void addParameter(String key, String value)
void addScope(String scope)
int describeContents()
String getAccountName()
String getApiId()
String getFullScope()
String getHeader(String key)
Bundle getHeaders()
Map<String, String> getHeadersAsMap()
byte[] getHttpBody()
JSONObject getHttpBodyAsJson()
int getHttpMethod()
String getName()
Bundle getParameters()
Map<String, List<String>> getParametersAsMap()
String getPath()
String getScope()
long getTimeout()
String getVersion()
void putHeader(String key, String value)
void setAccountName(String accountName)
void setHttpBody(String string)
void setTimeout(long timeout)
String toString()
void writeToParcel(Parcel parcel, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String DEFAULT_SCOPE_PREFIX

Constant Value: "oauth2:"

public static final int HTTP_METHOD_DELETE

Constant Value: 3 (0x00000003)

public static final int HTTP_METHOD_GET

Constant Value: 0 (0x00000000)

public static final int HTTP_METHOD_HEAD

Constant Value: 4 (0x00000004)

public static final int HTTP_METHOD_OPTIONS

Constant Value: 5 (0x00000005)

public static final int HTTP_METHOD_PATCH

Constant Value: 7 (0x00000007)

public static final int HTTP_METHOD_POST

Constant Value: 1 (0x00000001)

public static final int HTTP_METHOD_PUT

Constant Value: 2 (0x00000002)

public static final int HTTP_METHOD_TRACE

Constant Value: 6 (0x00000006)

public static final int VERSION_CODE

Constant Value: 1 (0x00000001)

Fields

public static final GoogleAuthApiRequestCreator CREATOR

Public Constructors

public GoogleAuthApiRequest (String name, String version, String apiId)

Creates a request directed against a Google API. All Google APIs are uniquely defined by a name and id. These may be consulted at https://www.googleapis.com/discovery/v1/apis. Additionally, all methods defines by an API have their own specific id. These may be consulted at the url specified at the "discoveryRestUrl" value specified on the API discoverer.

Parameters
name The name of the API to consult.
version The version code of the api.
apiId The id of the API method to invoke.

public GoogleAuthApiRequest (String name, String version, String path, int httpMethod)

Creates a request directed against a Google API. All Google APIs are uniquely defined by a name and id. These may be consulted at https://www.googleapis.com/discovery/v1/apis. The specific method to invoke will be determined by the path and httpMethod entered.

Parameters
name The name of the API to consult.
version The version code of the api.
path The path of the API to consult.
httpMethod The HTTP method to use when performing the request.

Public Methods

public void addParameter (String key, String value)

public void addScope (String scope)

public int describeContents ()

public String getAccountName ()

public String getApiId ()

public String getFullScope ()

public String getHeader (String key)

public Bundle getHeaders ()

public Map<String, String> getHeadersAsMap ()

public byte[] getHttpBody ()

public JSONObject getHttpBodyAsJson ()

Throws
JSONException

public int getHttpMethod ()

public String getName ()

public Bundle getParameters ()

public Map<String, List<String>> getParametersAsMap ()

public String getPath ()

public String getScope ()

public long getTimeout ()

public String getVersion ()

public void putHeader (String key, String value)

public void setAccountName (String accountName)

public void setHttpBody (String string)

public void setTimeout (long timeout)

public String toString ()

public void writeToParcel (Parcel parcel, int flags)