Qore GoogleRestClient Module Reference 1.0
Loading...
Searching...
No Matches
GoogleRestClient.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* GoogleRestClient.qm Copyright (C) 2020 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitatiofn
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25// minimum qore version
26
27// require type definitions everywhere
28
29// enable all warnings
30
31// don't use "$" for vars, members, and methods, assume local variable scope
32
33// do not ignore argument errors
34
35
36
83
95
96public:
98 const DefaultUrl = "https://www.googleapis.com";
99
101 const DefaultAuthArgs = ...;
102
103
105 const DefaultAuthUrl = "https://accounts.google.com/o/oauth2/v2/auth";
106
108 const DefaultGrantType = "authorization_code";
109
111 const DefaultTokenUrl = "https://oauth2.googleapis.com/token";
112
114 const DefaultData = "json";
115
117 const DefaultOptions = ...;
118
119
121 const ApiProfiles = ...;
122
123
125 const DefaultGooglePingMethod= "GET";
126
128 const DefaultGooglePingHeaders = ...;
129
130
132
149 constructor(hash<auto> opts, *softbool do_not_connect) ;
150
151
153
155 bool isAuthTokenError(int status_code, hash<auto> headers, *bool body_deserialized, *string body_content_type, auto body);
156
157
159 static hash<auto> getOptions(hash<auto> opts);
160};
161
163
173
174public:
176 const ConnectionScheme = ...;
177
178
180
190 constructor(string name, string description, string url = GoogleRestClient::DefaultUrl, hash<auto> attributes = {}, hash<auto> options = {})
191 ;
192
193
195
212 constructor(hash<auto> config, *hash<auto> attr) ;
213
214
216 string getType();
217
218
220 static hash<auto> getOptions(hash<auto> opts);
221
223protected:
225public:
226
227
229
234protected:
235 GoogleRestClient getImpl(bool connect = True, *hash<auto> rtopts);
236public:
237
238
240protected:
241 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
242public:
243
244};
245
247
253
254public:
256 const DefaultConnectionUrl = "gcal://www.googleapis.com";
257
259 const ConnectionScheme = ...;
260
261
263
273 constructor(string name, string description, string url = GoogleRestClient::DefaultUrl, hash<auto> attributes = {}, hash<auto> options = {})
274 ;
275
276
278
295 constructor(hash<auto> config, *hash<auto> attr) ;
296
297
299 string getType();
300
301
303
305 *string getAppName();
306
307
309
313 DataProvider::AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
314
315
317
321
322
324protected:
325 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
326public:
327
328};
329
331
337
338public:
340 const DefaultUrl = "https://gmail.googleapis.com";
341
343 const DefaultConnectionUrl = "gmail://gmail.googleapis.com";
344
346 const ConnectionScheme = ...;
347
348
351
352
353protected:
355 static hash<string, *hash<string, hash<DataProviderOptionInfo>>> subtype_info;
356
358 static Mutex subtype_lck();
359
360public:
361
363
373 constructor(string name, string description, string url = DefaultUrl, hash<auto> attributes = {}, hash<auto> options = {}) ;
374
375
377
394 constructor(hash<auto> config, *hash<auto> attr) ;
395
396
398 string getType();
399
400
402
404 *string getAppName();
405
406
408
412 DataProvider::AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
413
414
416
420
421
423
432protected:
433 AbstractDataProvider getDataProviderImpl(string subtype, *hash<auto> constructor_options);
434public:
435
436
438
440protected:
441 *hash<string, *hash<string, hash<DataProviderOptionInfo>>> getDataProviderSubtypesImpl();
442public:
443
444
446protected:
448public:
449
450
452protected:
454public:
455
456
458protected:
459 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
460public:
461
462};
463};
Class for GMail connections; returns GoogleRestClient objects.
Definition GoogleRestClient.qm.dox.h:336
loadSubtypeInfo()
Loads subtype info from external modules.
static hash< string, *hash< string, hash< DataProviderOptionInfo > > > subtype_info
Data provider subtype info.
Definition GoogleRestClient.qm.dox.h:355
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
returns a data provider object for this connection
const DefaultUrl
Default Gmail HTTP URL.
Definition GoogleRestClient.qm.dox.h:340
constructor(string name, string description, string url=DefaultUrl, hash< auto > attributes={}, hash< auto > options={})
creates the GoogleRestConnection object
setUpdateOptionsCode(*code update_options)
Can be called to set or clear a closure or call reference to be called when options are automatically...
const DefaultConnectionUrl
Default GMail REST API URL.
Definition GoogleRestClient.qm.dox.h:343
checkSubtypeInfo()
Verifies that subtype info has been loaded from external modules.
const ConnectionScheme
Connection entry info.
Definition GoogleRestClient.qm.dox.h:346
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
string getType()
returns "gmail"
static Mutex subtype_lck()
Data provider subtype lock.
*string getAppName()
Returns the data provider application name this connection serves, if any.
constructor(hash< auto > config, *hash< auto > attr)
creates the GoogleRestConnection object
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > getDataProviderSubtypesImpl()
Returns a hash of supported data provider subtypes.
const DataProviderSubtypeMap
Data provider subtypes supported.
Definition GoogleRestClient.qm.dox.h:350
AbstractDataProvider getDataProviderImpl(string subtype, *hash< auto > constructor_options)
returns a data provider object for the connection and subtype passed as an argument
Class for Google REST connections; returns GoogleRestClient objects.
Definition GoogleRestClient.qm.dox.h:252
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const DefaultConnectionUrl
Default Google REST API URL.
Definition GoogleRestClient.qm.dox.h:256
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
returns a data provider object for this connection
setUpdateOptionsCode(*code update_options)
Can be called to set or clear a closure or call reference to be called when options are automatically...
*string getAppName()
Returns the data provider application name this connection serves, if any.
constructor(hash< auto > config, *hash< auto > attr)
creates the GoogleRestConnection object
constructor(string name, string description, string url=GoogleRestClient::DefaultUrl, hash< auto > attributes={}, hash< auto > options={})
creates the GoogleRestConnection object
const ConnectionScheme
Connection entry info.
Definition GoogleRestClient.qm.dox.h:259
static hash< auto > getOptions(hash< auto > opts)
returns options for GoogleRestClient::constructor()
bool isAuthTokenError(int status_code, hash< auto > headers, *bool body_deserialized, *string body_content_type, auto body)
Returns True if the response was related to an authorization token error.
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
Class for Google REST connections; returns GoogleRestClient objects.
Definition GoogleRestClient.qm.dox.h:172
const ConnectionScheme
Connection entry info.
Definition GoogleRestClient.qm.dox.h:176
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.
static hash< auto > getOptions(hash< auto > opts)
returns options for GoogleRestConnection::constructor()
constructor(hash< auto > config, *hash< auto > attr)
creates the GoogleRestConnection object
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