| Qore DiscordDataProvider Module Reference 2.0

Loading...
Searching...
No Matches
DiscordDataProviderBase.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
26 namespace DiscordDataProvider {
28 class DiscordDataProviderBase : public DataProvider::AbstractDataProvider {
29
30 public:
32 const RetrySet = ...;
33
34
36 const MaxIoRetries = 5;
37
38 protected:
40 *DiscordRestConnection conn;
41
43 *DiscordRestClient rest;
44
45 public:
46
48 constructor();
49
50
52 constructor(DiscordRestClient rest, *Logger::LoggerInterface logger);
53
54
56 constructor(DiscordRestConnection conn, *Logger::LoggerInterface logger);
57
58
60 setLogger(*LoggerInterface logger);
61
62
64 static threadWait(date wait_period);
65
67 protected:
68 hash<auto> getGuild(string id);
69 public:
70
71
73 protected:
74 hash<auto> doRestCommand(string method, string path, auto body, reference<hash<auto>> info);
75 public:
76
77
79 protected:
80 bool retry(hash<ExceptionInfo> ex, reference<int> retries);
81 public:
82
83};
84};
DiscordDataProvider::DiscordDataProviderBase
The Discord data provider base class.
Definition DiscordDataProviderBase.qc.dox.h:28
DiscordDataProvider::DiscordDataProviderBase::retry
bool retry(hash< ExceptionInfo > ex, reference< int > retries)
Returns True if the error indicates that the operation should be retried.
DiscordDataProvider::DiscordDataProviderBase::constructor
constructor(DiscordRestConnection conn, *Logger::LoggerInterface logger)
Creates the object.
DiscordDataProvider::DiscordDataProviderBase::constructor
constructor()
Creates the object.
DiscordDataProvider::DiscordDataProviderBase::constructor
constructor(DiscordRestClient rest, *Logger::LoggerInterface logger)
Creates the object.
DiscordDataProvider::DiscordDataProviderBase::rest
*DiscordRestClient rest
The REST client object for API calls.
Definition DiscordDataProviderBase.qc.dox.h:43
DiscordDataProvider::DiscordDataProviderBase::conn
*DiscordRestConnection conn
The connection object used to create the REST client.
Definition DiscordDataProviderBase.qc.dox.h:40
DiscordDataProvider::DiscordDataProviderBase::setLogger
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
DiscordDataProvider::DiscordDataProviderBase::doRestCommand
hash< auto > doRestCommand(string method, string path, auto body, reference< hash< auto > > info)
Makes a REST call and returns the response; handles rate limit responses.
DiscordDataProvider::DiscordDataProviderBase::threadWait
static threadWait(date wait_period)
Wait for a given period of time.
DiscordDataProvider::DiscordDataProviderBase::MaxIoRetries
const MaxIoRetries
Max retries.
Definition DiscordDataProviderBase.qc.dox.h:36
DiscordDataProvider::DiscordDataProviderBase::RetrySet
const RetrySet
IO errors for REST retries.
Definition DiscordDataProviderBase.qc.dox.h:32
DiscordDataProvider::DiscordDataProviderBase::getGuild
hash< auto > getGuild(string id)
Retrieves info for the given guild; must be accessible to the calling user.
DiscordDataProvider
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26