| Namespace | http://www.mulesoft.org/schema/mule/google-contacts |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/google-contacts/current/mule-google-contacts.xsd (View Schema) |
| Schema Version | 1.0 |
| Minimum Mule Version | 3.3 |
Cloud connector for the Google Contacts API v3 using OAuth2 for initialization. Uses OAuth2 for authentication
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a group to a given contact
| |||||||||||
This tag encloses a series of nested processors that perform operations on contacts entities
| |||||||||||
The function of this sub processor is to add updated operations into the current batch for the given entries
This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic
validation inside the connector's XSD enforcing that.
| |||||||||||
This tag encloses a series of nested processors that perform operations on group entities.
| |||||||||||
The function of this sub processor is to add insert operations into the current batch for the given entries
This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic
validation inside the connector's XSD enforcing that.
| |||||||||||
The function of this sub processor is to add updated operations into the current batch for the given entries
This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic
validation inside the connector's XSD enforcing that.
| |||||||||||
Inserts a new group
| |||||||||||
Deletes a given contact
| |||||||||||
Deletes a contact signaled by its id
| |||||||||||
Deletes the photo associated to a given contact
| |||||||||||
Deletes the photo of a contact signaled by its id
| |||||||||||
Deletes the given group
| |||||||||||
Deletes a group signaled by its id
| |||||||||||
Downloads the photo of a given contact
| |||||||||||
Downloads the photo of a contact signaled by its id contact and returns it as an input stream
| |||||||||||
Retrieves a contact by id
| |||||||||||
Retrieves all the contacts matching the given criterias.
| |||||||||||
Retrieves a group by id
| |||||||||||
Retrieves a group with the given name
| |||||||||||
Returns all the groups the authenticated user has access to
| |||||||||||
Inserts a new contact
| |||||||||||
Updates a contact entry
| |||||||||||
Updates the photo of a contact signaled by its id taken a java.io.InputStream as an input
| |||||||||||
Updates the state of a group
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:google-contacts="http://www.mulesoft.org/schema/mule/google-contacts"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/google-contacts
http://www.mulesoft.org/schema/mule/google-contacts/current/mule-google-contacts.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Java Type | MIME Type | Encoding | Optional. Give a name to this configuration so it can be later referenced. | ||||
| Mule-GoogleContactsConnector/1.0 | Optional. Application name registered on Google API console | ||||||||||
| The OAuth2 consumer key | |||||||||||
| The OAuth2 consumer secret | |||||||||||
| Optional. This policy represents which id we want to use to represent each google account. | |||||||||||
| https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.google.com/m8/feeds | Optional. The OAuth2 scopes you want to request | ||||||||||
| https://accounts.google.com/o/oauth2/auth | Optional. The URL defined by the Service Provider where the resource owner will be redirected to grant authorization to the connector | ||||||||||
| https://accounts.google.com/o/oauth2/token | Optional. The URL defined by the Service Provider to obtain an access token | ||||||||||
This connector uses OAuth as an authorization and authentication mechanism with automatic saving and restoring of access tokens. Every message processor in this connector has an extra attribute entitled accessTokenId which is an identification of the user authorizing the conenctor. In order to obtain an access token identification you need to first call the authroize message processor.
Authorizing the connector is a simple process of calling:
<google-contacts:authorize/>
The call to authorize message processor must be made from a message coming from an HTTP inbound endpoint as the authorize process will reply with a redirect to the service provider. The following is an example of how to use it in a flow with an HTTP inbound endpoint:
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint host="localhost" port="8080" path="oauth-authorize"/>
<google-contacts:authorize/>
</flow>
If you hit that endpoint via a web-browser it will initiate the OAuth dance, redirecting the user to the service provider page and creating a callback endpoint so the service provider can redirect back once the user has been authenticated and properly authorized the connector. Once the callback gets called then the connector will automatically issue an access token identifier that you need to save as either a cookie or a database record for any subsequent calls.
The authorize message processor also supports the following attributes:
| Authorize Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Default Value | Description | |||||||||
| Optional. Indicates if your application needs to access a Google API when the user is not present at the browser. Use offline to get a refresh token and use that when the user is not at the browser. Default is online | |||||||||||
| Optional. Indicates if google should remember that an app has been authorized or if each should ask authorization every time. Use force to request authorization every time or auto to only do it the first time. Default is auto | |||||||||||
| https://accounts.google.com/o/oauth2/auth | Optional. The URL defined by the Service Provider where the resource owner will be redirected to grant authorization to the connector | ||||||||||
| https://accounts.google.com/o/oauth2/token | Optional. The URL defined by the Service Provider to obtain an access token | ||||||||||
The authorize message processor is an intercepting one. If the connector is not authorized yet, it will redirect to the service provider so the user can authorize the connector. This is the reason as to why the authorize needs to be behind and http:inbound-endpoint. The service provider upon successful authentication and authorization then will call back the connector. The connector will extract information from that call, set its internal state to authorized, and then continue execution. Continuing execution means executing everything that was after the authorize whose execution got interrupted because the connector was not authorized.
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint host="localhost" port="8080" path="oauth-authorize"/>
<google-contacts:authorize/>
<http:response-builder status="200">
<set-payload value="You have successfully authorized the connector"/>
</http:response-builder>
</flow>
In the previous example we added the http:response-build (notice that this element is available only in Mule 3.3.0 and later). If the connector is not authorized, the execution of the response builder will be delayed up to the point of the callback execution.
On the other hand if the connector has been authorized and you call authorize again then the flow execution will not stop, it will rather continue and the http:response-builder will get executed right away rather than after the callback.
The following is an example of the authorize message processor, after which it will print the access token identifier to the log:
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint host="localhost" port="8080" path="oauth-authorize"/>
<google-contacts:authorize/>
<log level="INFO" message="The connector has been properly authorized. The access token identifier is #[flowVars['OAuthAccessTokenId']]"/>
</flow>
The OAuthAccessTokenId flow variable is a special variable available to all the message processors executing after the authorize call. The following snippet shows how you can save it as a HTTP protocol cookie:
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint host="localhost" port="8080" path="oauth-authorize"/>
<google-contacts:authorize/>
<http:response-builder status="200">
<http:set-cookie name="accessTokenId" value="#[flowVars['OAuthAccessTokenId']]"/>
<set-payload value="You have successfully authorized the connector. You access token id is #[flowVars['OAuthAccessTokenId']]"/>
</http:response-builder>
</flow>
The access token identifier is unique per user and therefore the connector can be authorized for many users. If the user authorizes the connector twice it will have the same access token identifier both times.
If for any reason, an errors ocurrs while processing the callback, the exception strategy of the flow containing the authorize will be executed. So, if the callback sent the wrong information you can handle that situation by setting up an exception strategy as follows:
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint host="localhost" port="8080" path="oauth-authorize"/>
<google-contacts:authorize/>
<http:response-builder status="200">
<set-payload value="You have successfully authorized the connector"/>
</http:response-builder>
<catch-exception-strategy>
<http:response-builder status="404">
<set-payload value="An error has occurred authorizing the connector"/>
</http:response-builder>
</catch-exception-strategy>
</flow>
Once this connector has been authorized further calls to the authorize message processor will be no-ops. If you wish to reset the state of the connector back to a non-authorized state you can call:
<google-contacts:unauthorize/>
Keep in mind that after the connector is unauthorized all future calls that attempt to access protected resources will fail until the connector is re-authorized.
As mentioned earlier once authorize gets called and before we redirect the user to the service provider we create a callback endpoint. The callback endpoint will get called automatically by the service provider once the user is authenticated and he grants authorization to the connector to access his private information.
The callback can be customized in the config element of the this connector as follows:
<google-contacts:config>
<google-contacts:oauth-callback-config domain="${fullDomain}" localPort="${http.port}" remotePort="80"/>
</google-contacts:config>
The oauth-callback-config element can be used to customize the endpoint that gets created for the callback. It features the following attributes:
| OAuth Callback Config Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Description | ||||||||||
| Optional. Reference to a user-defined HTTP connector. | |||||||||||
| Optional. The domain portion of the callback URL. This is usually something like xxx.cloudhub.io if you are deploying to CloudHub for example. | |||||||||||
| Optional. The local port number that the endpoint will listen on. Normally 80, in the case of CloudHub you can use the environment variable ${http.port}. | |||||||||||
| Optional. This is the port number that we will tell the service provider we are listening on. It is usually the same as localPort but it is separated in case your deployment features port forwarding or a proxy. | |||||||||||
| Optional. Path under which the callback should be exposed. If not specified a random path will be generated. | |||||||||||
The example shown above is what the configuration would look like if your app would be deployed to CloudHub.
This connector has the capability of automatically saving and restoring access tokens. The connector will store in either the default user object store or a user-defined one the acquired access tokens, refresh tokens, and any other pertinent information using the access token identifier as the key.
The object store can be configured as follows
<google-contacts:config>
<google-contacts:oauth-store-config objectStore-ref="my-object-store"/>
</google-contacts:config>
There is only a single attribute entitled objectStore-ref in the oauth-store-config element that allows the user to specify the name of the object store that he wishes to use to save and restore access tokens.
Adds a group to a given contact
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactEntry representing the contact to be updated | ContactEntry | */* | ||||||||
| The id of the group | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactEntry | an instance of com.google.gdata.data.contacts.ContactEntry representing the contact's updated state |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
This tag encloses a series of nested processors that perform operations on contacts entities
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| Optional. An id to identify the batch | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Name | Default Value | Description | Java Type |
|---|---|---|---|
| A list with instances of org.mule.api.NestedProcessor representing the operations to be performed in the batch | List<NestedProcessor> |
| Return Type | Description |
|---|---|
| List<BatchResult> | a list with instances of org.mule.modules.google.api.domain.BatchResult |
| Payload Class | Description |
|---|---|
| Exception | if an error is encountered |
The function of this sub processor is to add updated operations into the current batch for the given entries This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic validation inside the connector's XSD enforcing that. However, if you don't use it that way, then it's most likely to throw a java.lang.IllegalStateException
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The current mule message | MuleMessage | */* | |||||||||
| Id to identify this particular operation inside the batch | String | */* | UTF-8 | ||||||||
| #[payload:] | Optional. A collection with instances of com.google.gdata.data.BaseEntry to be batch updated | Collection<BaseEntry<?>> | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IllegalStateException | if not nested in batch-contact or batch-group |
This tag encloses a series of nested processors that perform operations on group entities. According to the API's specification the maximum number of operations allowed in one batch is 100. Thus, this processor will automatically group the operations in batches of 100. According to the API's specification the maximum number of operations allowed in one batch is 100. Thus, this processor will automatically group the operations in batches of 100.
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| Optional. An id to identify the batch | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Name | Default Value | Description | Java Type |
|---|---|---|---|
| A list with instances of org.mule.api.NestedProcessor representing the operations to be performed in the batch | List<NestedProcessor> |
| Return Type | Description |
|---|---|
| List<BatchResult> | a list with instances of org.mule.modules.google.api.domain.BatchResult |
| Payload Class | Description |
|---|---|
| Exception | if an error is encountered |
The function of this sub processor is to add insert operations into the current batch for the given entries This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic validation inside the connector's XSD enforcing that. However, if you don't use it that way, then it's most likely to throw a java.lang.IllegalStateException
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The current mule message | MuleMessage | */* | |||||||||
| Id to identify this particular operation inside the batch | String | */* | UTF-8 | ||||||||
| #[payload:] | Optional. A collection with instances of com.google.gdata.data.BaseEntry to be batch inserted | Collection<BaseEntry<?>> | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IllegalStateException | if not nested in batch-contact or batch-group |
The function of this sub processor is to add updated operations into the current batch for the given entries This processor is intended to be used nested inside batch-contacts or batch-groups, although there's no syntactic validation inside the connector's XSD enforcing that. However, if you don't use it that way, then it's most likely to throw a java.lang.IllegalStateException
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The current mule message | MuleMessage | */* | |||||||||
| Id to identify this particular operation inside the batch | String | */* | UTF-8 | ||||||||
| #[payload:] | Optional. A collection with instances of com.google.gdata.data.BaseEntry to be batch updated | Collection<BaseEntry<?>> | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IllegalStateException | if not nested in batch-contact or batch-group |
Inserts a new group
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactGroupEntry representing the group to be inserted | ContactGroupEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactGroupEntry | an instance of com.google.gdata.data.contacts.ContactGroupEntry representing the newly created group |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes a given contact
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. The contact to be deleted | ContactEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes a contact signaled by its id
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the contact to be deleted | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes the photo associated to a given contact
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactEntry representing the contact whose photo we want deleted | ContactEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes the photo of a contact signaled by its id
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the contact whose photo we want to delete | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes the given group
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactGroupEntry representing the group to be deleted | ContactGroupEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Deletes a group signaled by its id
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the group to be deleted | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Downloads the photo of a given contact
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. The contact whose photo we want | ContactEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| InputStream | an instance of java.io.InputStream |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Downloads the photo of a contact signaled by its id contact and returns it as an input stream
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the contact whose photo we want | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| InputStream | an instance of java.io.InputStream |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Retrieves a contact by id
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the contact | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactEntry | an instance of com.google.gdata.data.contacts.ContactEntry |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Retrieves all the contacts matching the given criterias. If a criteria is not provided then it's not used in the filtering. Thus, providing no criteria equals getting all contacts
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| Optional. Sets the minimum updated timestamp used for the query. Only entries with an updated timestamp equal to or later than the specified timestamp will be returned. | String | */* | UTF-8 | ||||||||
| Optional. Sets the maximum updated timestamp used for the query. Only entries with an updated timestamp earlier than the specified timestamp will be returned. | String | */* | UTF-8 | ||||||||
| yyyy-MM-dd\'T\'HH:mm:ss\'Z\' | Optional. The pattern to be used for parsing updatedMin and updatedMax | String | */* | UTF-8 | |||||||
| Optional. Sets the full text query string that will be used for the query. | String | */* | UTF-8 | ||||||||
| 1000 | Optional. Sets the maximum number of results to return for the query. Note: a GData server may choose to provide fewer results, but will never provide more than the requested maximum. | int | */* | ||||||||
| 1 | Optional. Sets the start index for query results. This is a 1-based index. | int | */* | ||||||||
| NONE | Optional. Valid values are NONE, ASCENDING and DESCENDING | ContactQuery.SortOrder | */* | ||||||||
| false | Optional. Wether to show deleted entries or not | Boolean | */* | ||||||||
| NONE | Optional. The field to be used when sorting. Valid values are NONE, LAST_MODIFIED and EDITED | ContactQuery.OrderBy | */* | ||||||||
| Optional. Only show contacts from a given group | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| List<ContactEntry> | a list with instances of com.google.gdata.data.contacts.ContactEntry |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Retrieves a group by id
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the group to be returned | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactGroupEntry | an instance of com.google.gdata.data.contacts.ContactGroupEntry |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Retrieves a group with the given name
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The name of the group you want | String | */* | UTF-8 | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactGroupEntry | an instance of com.google.gdata.data.contacts.ContactGroupEntry or null if the group doesn't exist |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Returns all the groups the authenticated user has access to
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| Optional. Sets the minimum updated timestamp used for the query. Only entries with an updated timestamp equal to or later than the specified timestamp will be returned. | String | */* | UTF-8 | ||||||||
| Optional. Sets the maximum updated timestamp used for the query. Only entries with an updated timestamp earlier than the specified timestamp will be returned. | String | */* | UTF-8 | ||||||||
| yyyy-MM-dd\'T\'HH:mm:ss\'Z\' | Optional. The date pattern used to parse updatedMin and updatedMax | String | */* | UTF-8 | |||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| List<ContactGroupEntry> | a list with instances of com.google.gdata.data.contacts.ContactGroupEntry |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Inserts a new contact
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactEntry representing the contact to be inserted | ContactEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactEntry | an instance of com.google.gdata.data.contacts.ContactEntry representing the newly inserted contact |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Updates a contact entry
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactEntry representing the contact to be updated | ContactEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactEntry | an instance of com.google.gdata.data.contacts.ContactEntry representing the contact's updated state |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Updates the photo of a contact signaled by its id taken a java.io.InputStream as an input
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The id of the contact whose photo we want to update | String | */* | UTF-8 | ||||||||
| #[payload:] | Optional. A java.io.InputStream with the photo's binary content | InputStream | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |
Updates the state of a group
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| #[payload:] | Optional. An instance of com.google.gdata.data.contacts.ContactGroupEntry with the group's new state | ContactGroupEntry | */* | ||||||||
| OAuth Parameters The following values are always required when using OAuth as the authentication mechanism. | |||||||||||
| Access token identifier used to retrieve an access token from the store | |||||||||||
| Return Type | Description |
|---|---|
| ContactGroupEntry | an instance of com.google.gdata.data.contacts.ContactGroupEntry reflecting the group's updated state |
| Payload Class | Description |
|---|---|
| IOException | if there's a communication error with google's servers |
| ServiceException | if the operation raises an error on google's end |