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
104
108
109public:
111 const DefaultSendEncoding = "gzip";
112
114 const RequiredOptions = ...;
115
116
117private:
118 string apikey;
119
120public:
121
123
156 constructor(hash<auto> opts, *softbool do_not_connect) ;
157
158
160 static hash getOptions(hash opts);
161};
162
164
171
172public:
174 const ConnectionScheme = <ConnectionSchemeInfo>{
175 "cls": Class::forName("SewioRestConnection"),
176 "options": RestConnection::ConnectionScheme.options + {
177 "data": <ConnectionOptionInfo>{
178 "type": "string",
179 "desc": "data serialization options are limited to `json` with this object",
180 "allowed_values": (
181 <AllowedValueInfo>{
182 "value": "json",
183 "desc": "use JSON serialization",
184 },
185 ),
186 "default_value": "json",
187 },
188 "send_encoding": <ConnectionOptionInfo>{
189 "type": "string",
190 "desc": "this sets the send encoding",
191 "allowed_values": (
192 <AllowedValueInfo>{
193 "value": "gzip",
194 "desc": "use GNU zip encoding ([RFC 1952](https://tools.ietf.org/html/rfc1952))",
195 }, <AllowedValueInfo>{
196 "value": "bzip2",
197 "desc": "use bzip2 encoding",
198 }, <AllowedValueInfo>{
199 "value": "deflate",
200 "desc": "use the deflate algorithm ([RFC 1951](https://tools.ietf.org/html/rfc1951))",
201 }, <AllowedValueInfo>{
202 "value": "identity",
203 "desc": "use no content encoding",
204 },
205 ),
207 },
208 "apikey": <ConnectionOptionInfo>{
209 "type": "string",
210 "desc": "the Sewio RTLS Studio API key",
211 },
212 },
213 "required_options": foldl $1 + "," + $2, SewioRestClient::RequiredOptions,
214 };
215
217
227 constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
228 ;
229
230
232 string getType();
233
234
236
241protected:
242 SewioRestClient getImpl(bool connect = True, *hash<auto>rtopts);
243public:
244
245
247protected:
248 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
249public:
250
251};
252};
const DefaultSendEncoding
default send encoding
Definition: SewioRestClient.qm.dox.h:111
const RequiredOptions
required options
Definition: SewioRestClient.qm.dox.h:114
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:170
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:174
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:102