SewioRestClient.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// @file SewioRestClient.qm Qore user module for calling Sewio.net REST services
/* SewioRestClient.qm Copyright (C) 2017 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// this module requires Qore 0.8.13 or better
// require type definitions everywhere
// enable all warnings
// don't use "$" for vars, members, and methods, assume local variable scope
// do not ignore argument errors
namespace SewioRestClient {
class SewioRestClient : public RestClient::RestClient {
public:
public :
const DefaultSendEncoding = "gzip";
const RequiredOptions = (
// the <a href="http://www.sewio.net">Sewio.net</a>'s RTLS Studio api key
"apikey",
);
public:
private:internal {
string apikey;
}
constructor(hash opts, *softbool do_not_connect) ;
static hash getOptions(hash opts);
};
class SewioRestConnection : public RestClient::RestConnection {
public:
public :
const Options = RestConnection::Options + (
"apikey": True,
);
const OptionList = Options.keys();
public:
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh) ;
private:
SewioRestClient getImpl(bool connect = True, *hash rtopts);
public:
hash getOptions();
*hash getDefaultOptions();
string getType();
static SewioRestConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
};
};
RestClient::RestClient
ConnectionProvider::AbstractConnection::monitor
bool monitor
SewioRestClient::SewioRestConnection::make
static SewioRestConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
SewioRestClient::SewioRestConnection::getDefaultOptions
*hash getDefaultOptions()
returns default options
ConnectionProvider::AbstractConnection::opts
*hash opts
SewioRestClient::SewioRestConnection::Options
const Options
SewioRestConnection object connection options.
Definition: SewioRestClient.qm.dox.h:159
True
const True
SewioRestClient::SewioRestConnection::getType
string getType()
returns "sewiorest"
ConnectionProvider::AbstractConnection::name
string name
ConnectionProvider::AbstractConnection::urlh
hash urlh
SewioRestClient
the SewioRestClient namespace contains all the objects in the SewioRestClient module ...
Definition: SewioRestClient.qm.dox.h:80
SewioRestClient::SewioRestConnection
class for Sewio.net&#39;s RTLS Studio REST connections; returns SewioRestClient::SewioRestClient objects ...
Definition: SewioRestClient.qm.dox.h:154
ConnectionProvider::AbstractConnection::desc
string desc
SewioRestClient::SewioRestConnection::getImpl
SewioRestClient getImpl(bool connect=True, *hash rtopts)
returns a SewioRestClient::SewioRestClient object
RestClient::RestConnection
ConnectionProvider::AbstractConnection::url
string url
hash
hash hash(object obj)
SewioRestClient::SewioRestConnection::constructor
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the SewioRestConnection object
SewioRestClient::SewioRestConnection::getOptions
hash getOptions()
gets options