Loading...
Searching...
No Matches
DiscordDataProviderBase.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DiscordDataProvider {
class DiscordDataProviderBase : public DataProvider::AbstractDataProvider {
public:
const RetrySet = ...;
const MaxIoRetries = 5;
protected:
*DiscordRestConnection conn;
*DiscordRestClient rest;
public:
constructor();
constructor(DiscordRestClient rest, *Logger::LoggerInterface logger);
constructor(DiscordRestConnection conn, *Logger::LoggerInterface logger);
setLogger(*LoggerInterface logger);
static threadWait(date wait_period);
protected:
hash<auto> getGuild(string id);
public:
protected:
hash<auto> doRestCommand(string method, string path, auto body, reference<hash<auto>> info);
public:
protected:
bool retry(hash<ExceptionInfo> ex, reference<int> retries);
public:
};
};
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