Qore SewioRestClient Module Reference  1.0
 All Classes Namespaces Functions Variables Groups Pages
SewioRestClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
2 // @file SewioRestClient.qm Qore user module for calling Sewio.net REST services
3 
4 /* SewioRestClient.qm Copyright (C) 2017 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 // this module requires Qore 0.8.13 or better
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 
79 namespace SewioRestClient {
82 
86 
87 public:
88  public :
90  const DefaultSendEncoding = "gzip";
91 
93  const RequiredOptions = (
94  // the <a href="http://www.sewio.net">Sewio.net</a>'s RTLS Studio api key
95  "apikey",
96  );
97 
98 public:
99 
100  private:internal {
101  string apikey;
102  }
103 
105 
133  constructor(hash opts, *softbool do_not_connect) ;
134 
135 
137  static hash getOptions(hash opts);
138  };
139 
141 
155 
156 public:
157  public :
159  const Options = RestConnection::Options + (
160  "apikey": True,
161  );
162 
163  const OptionList = Options.keys();
164 
165 public:
166 
168 
177  constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh) ;
178 
179 
181 
187 private:
188  SewioRestClient getImpl(bool connect = True, *hash rtopts);
189 public:
190 
191 
193 
206  hash getOptions();
207 
208 
211 
212 
214  string getType();
215 
216 
218  static SewioRestConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
219  };
220 };
static hash getOptions(hash opts)
returns options for the RestClient::constructor()
static SewioRestConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
*hash getDefaultOptions()
returns default options
const Options
SewioRestConnection object connection options.
Definition: SewioRestClient.qm.dox.h:159
const True
string getType()
returns &quot;sewiorest&quot;
const DefaultSendEncoding
default send encoding
Definition: SewioRestClient.qm.dox.h:90
this class provides the REST client API for communication with Sewio.net&#39;s RTLS Studio servers ...
Definition: SewioRestClient.qm.dox.h:85
class for Sewio.net&#39;s RTLS Studio REST connections; returns SewioRestClient::SewioRestClient objects ...
Definition: SewioRestClient.qm.dox.h:154
SewioRestClient getImpl(bool connect=True, *hash rtopts)
returns a SewioRestClient::SewioRestClient object
const RequiredOptions
required options
Definition: SewioRestClient.qm.dox.h:93
hash hash(object obj)
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the SewioRestConnection object