Qore SewioRestClient Module Reference 1.4
Loading...
Searching...
No Matches
SewioRestClient.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* SewioRestClient.qm Copyright (C) 2017 - 2023 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 limitation
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}
37
105
109
110public:
112 const DefaultSendEncoding = "gzip";
113
115 const RequiredOptions = ...;
116
117
118private:
119 string apikey;
120
121public:
122
124
157 constructor(hash<auto> opts, *softbool do_not_connect) ;
158
159
161 static hash getOptions(hash opts);
162};
163
165
184class SewioRestConnection : public RestClient::RestConnection {
185
186public:
188 const ConnectionScheme = <ConnectionSchemeInfo>{
189 "cls": Class::forName("SewioRestConnection"),
190 "options": RestConnection::ConnectionScheme.options + {
191 "data": <ConnectionOptionInfo>{
192 "type": "string",
193 "desc": "data serialization options are limited to `json` with this object",
194 "allowed_values": (
195 <AllowedValueInfo>{
196 "value": "json",
197 "desc": "use JSON serialization",
198 },
199 ),
200 "default_value": "json",
201 },
202 "send_encoding": <ConnectionOptionInfo>{
203 "type": "string",
204 "desc": "this sets the send encoding",
205 "allowed_values": (
206 <AllowedValueInfo>{
207 "value": "gzip",
208 "desc": "use GNU zip encoding ([RFC 1952](https://tools.ietf.org/html/rfc1952))",
209 }, <AllowedValueInfo>{
210 "value": "bzip2",
211 "desc": "use bzip2 encoding",
212 }, <AllowedValueInfo>{
213 "value": "deflate",
214 "desc": "use the deflate algorithm ([RFC 1951](https://tools.ietf.org/html/rfc1951))",
215 }, <AllowedValueInfo>{
216 "value": "identity",
217 "desc": "use no content encoding",
218 },
219 ),
221 },
222 "apikey": <ConnectionOptionInfo>{
223 "type": "string",
224 "desc": "the Sewio RTLS Studio API key",
225 },
226 },
227 "required_options": foldl $1 + "," + $2, SewioRestClient::RequiredOptions,
228 };
229
231
241 constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
242 ;
243
244
246 string getType();
247
248
250
255protected:
256 SewioRestClient getImpl(bool connect = True, *hash<auto>rtopts);
257public:
258
259
261protected:
262 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
263public:
264
265};
266};
const ConnectionScheme
const DefaultSendEncoding
default send encoding
Definition: SewioRestClient.qm.dox.h:112
const RequiredOptions
required options
Definition: SewioRestClient.qm.dox.h:115
static hash getOptions(hash opts)
returns options for the RestClient::constructor()
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options (which include the mandatory apikey option for Sewio....
class for Sewio.net's RTLS Studio REST connections; returns SewioRestClient::SewioRestClient objects
Definition: SewioRestClient.qm.dox.h:184
SewioRestClient getImpl(bool connect=True, *hash< auto >rtopts)
returns a SewioRestClient::SewioRestClient object
string getType()
returns "sewiorest"
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the SewioRestConnection object
const ConnectionScheme
Connection entry info.
Definition: SewioRestClient.qm.dox.h:188
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
the SewioRestClient namespace contains all the objects in the SewioRestClient module
Definition: SewioRestClient.qm.dox.h:103