98 const DefaultUrl =
"https://www.googleapis.com";
101 const DefaultAuthArgs = {
"access_type":
"offline"};
104 const DefaultAuthUrl =
"https://accounts.google.com/o/oauth2/v2/auth";
107 const DefaultGrantType =
"authorization_code";
110 const DefaultTokenUrl =
"https://oauth2.googleapis.com/token";
113 const DefaultData =
"json";
116 const DefaultOptions = {
119 "oauth2_auth_args": DefaultAuthArgs,
120 "oauth2_auth_url": DefaultAuthUrl,
121 "oauth2_grant_type": DefaultGrantType,
122 "oauth2_token_url": DefaultTokenUrl,
127 const ApiProfiles = {
131 "https://www.googleapis.com/auth/calendar",
133 "ping_method": DefaultGooglePingMethod,
134 "ping_path":
"/calendar/v3/users/me/calendarList?maxResults=1",
135 "ping_headers": DefaultGooglePingHeaders,
140 const DefaultGooglePingMethod=
"GET";
143 const DefaultGooglePingHeaders = {
144 "Accept": MimeTypeJson,
187 "cls": Class::forName(
"GoogleRestConnection"),
188 "options": RestConnection::ConnectionScheme.options + {
189 "api_profile": <ConnectionOptionInfo>{
191 "desc":
"the API profile according to the Google API in use; this option will set the REST "
192 "options if they are not already set (`oauth2_scopes`, `ping_body`, `ping_headers`, and "
193 "`ping_method`); valid "
195 "- `none`: no options configured (default)\n"
196 "- `calendar`: set options for the Google calendar API",
197 "default_value":
"none",
200 "desc":
"No options are set",
204 "desc":
"Set REST client options for the Google calendar API",
209 "data": RestConnection::ConnectionScheme.options.
"data"
210 + <ConnectionOptionInfo>{
213 "oauth2_auth_args": RestConnection::ConnectionScheme.options.oauth2_auth_args
214 + <ConnectionOptionInfo>{
217 "oauth2_auth_url": RestConnection::ConnectionScheme.options.oauth2_auth_url
218 + <ConnectionOptionInfo>{
221 "oauth2_grant_type": RestConnection::ConnectionScheme.options.oauth2_grant_type
222 + <ConnectionOptionInfo>{
225 "oauth2_token_url": RestConnection::ConnectionScheme.options.oauth2_token_url
226 + <ConnectionOptionInfo>{
230 "required_options":
"token|oauth2_auth_url,oauth2_grant_type,oauth2_token_url,"
231 "oauth2_client_id,oauth2_client_secret",
const DefaultGrantType
Default OAuth2 grant type.
Definition: GoogleRestClient.qm.dox.h:107
const DefaultTokenUrl
Default token request URL.
Definition: GoogleRestClient.qm.dox.h:110
static hash< auto > getOptions(hash< auto > opts)
returns options for GoogleRestClient::constructor()
const DefaultAuthUrl
Default authorization request URL.
Definition: GoogleRestClient.qm.dox.h:104
const DefaultUrl
Default Google REST API URL.
Definition: GoogleRestClient.qm.dox.h:98
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options
const DefaultAuthArgs
Default addition auth request arguments.
Definition: GoogleRestClient.qm.dox.h:101
const DefaultData
Default "data" option value.
Definition: GoogleRestClient.qm.dox.h:113
Class for Google REST connections; returns GoogleRestClient objects.
Definition: GoogleRestClient.qm.dox.h:182
const ConnectionScheme
Connection entry info.
Definition: GoogleRestClient.qm.dox.h:186
setChildCapabilities()
Sets child data provider capabilities.
constructor(string name, string description, string url=GoogleRestClient::DefaultUrl, hash< auto > attributes={}, hash< auto > options={})
creates the GoogleRestConnection object
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
DataProvider::AbstractDataProvider getDataProvider()
returns a data provider object for this connection
static hash< auto > getOptions(hash< auto > opts)
returns options for GoogleRestConnection::constructor()
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
string getType()
returns "grest"
GoogleRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a GoogleRestClient object
the GoogleRestClient namespace contains all the objects in the GoogleRestClient module
Definition: GoogleRestClient.qm.dox.h:81