| Qore DiscordDataProvider Module Reference 2.0

Loading...
Searching...
No Matches
DiscordGuildDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
24
26 namespace DiscordDataProvider {
28 class DiscordGuildDataProvider : public DiscordDataProviderBase {
29
30 public:
32 static hash<DataProviderInfo> ProviderInfo = <DataProviderInfo>{
33 "name": "guild",
34 "desc": "Discord guild data provider; parent provider for APIs related to guilds",
35 "type": "DiscordGuildDataProvider",
36 "constructor_options": DiscordDataProvider::ConstructorOptions + {
37 "id": <DataProviderOptionInfo>{
38 "display_name": "Server ID",
39 "short_desc": "The ID of the server or guild",
40 "type": AbstractDataProviderTypeMap."string",
41 "desc": "The ID of the server or guild",
42 },
43 },
44 "supports_children": True,
45 "children_can_support_apis": True,
46 };
47
49 static hash<DataProviderSummaryInfo> ProviderSummaryInfo = cast<hash<DataProviderSummaryInfo>>(ProviderInfo{
50 AbstractDataProvider::DataProviderSummaryInfoKeys
51 });
52
53 protected:
55 hash<auto> guild;
56
58 *hash<auto> cal;
59
60 const DefaultChildMap = ...;
61
62
63 static hash<string, Reflection::Class> childMap = DefaultChildMap;
64
65 public:
66
68 constructor(*hash<auto> options);
69
70
72 constructor(DiscordRestClient::DiscordRestClient rest, hash<auto> guild) ;
73
74
76 string getName();
77
78
80 *string getDesc();
81
82
84 *list<hash<DataProvider::DataProviderSummaryInfo>> getChildProviderSummaryInfo();
85
86
88 static registerChild(string pathname, Reflection::Class cls);
89
91 protected:
92 static deregisterChild(string pathname);
93 public:
94
95
97
99 protected:
100 *list<string> getChildProviderNamesImpl();
101 public:
102
103
105
109 protected:
110 *DiscordDataProviderBase getChildProviderImpl(string name);
111 public:
112
113
115 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
116
117};
118};
DiscordDataProvider::DiscordDataProviderBase
The Discord data provider base class.
Definition DiscordDataProviderBase.qc.dox.h:28
DiscordDataProvider::DiscordDataProviderBase::rest
*DiscordRestClient rest
The REST client object for API calls.
Definition DiscordDataProviderBase.qc.dox.h:43
DiscordDataProvider::DiscordDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition DiscordDataProvider.qc.dox.h:43
DiscordDataProvider::DiscordGuildDataProvider
The parent class for Discord guild REST APIs.
Definition DiscordGuildDataProvider.qc.dox.h:28
DiscordDataProvider::DiscordGuildDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
DiscordDataProvider::DiscordGuildDataProvider::getDesc
*string getDesc()
Returns the data provider description.
DiscordDataProvider::DiscordGuildDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DiscordDataProvider::DiscordGuildDataProvider::ProviderSummaryInfo
static hash< DataProviderSummaryInfo > ProviderSummaryInfo
Provider summary info.
Definition DiscordGuildDataProvider.qc.dox.h:49
DiscordDataProvider::DiscordGuildDataProvider::cal
*hash< auto > cal
The guild's metadata.
Definition DiscordGuildDataProvider.qc.dox.h:58
DiscordDataProvider::DiscordGuildDataProvider::ProviderInfo
static hash< DataProviderInfo > ProviderInfo
Provider info.
Definition DiscordGuildDataProvider.qc.dox.h:32
DiscordDataProvider::DiscordGuildDataProvider::getChildProviderImpl
*DiscordDataProviderBase getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
DiscordDataProvider::DiscordGuildDataProvider::deregisterChild
static deregisterChild(string pathname)
Deregister the named child data provider.
DiscordDataProvider::DiscordGuildDataProvider::registerChild
static registerChild(string pathname, Reflection::Class cls)
Register a new child data provider for Discord guilds.
DiscordDataProvider::DiscordGuildDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
DiscordDataProvider::DiscordGuildDataProvider::getName
string getName()
Returns the data provider name.
DiscordDataProvider::DiscordGuildDataProvider::constructor
constructor(DiscordRestClient::DiscordRestClient rest, hash< auto > guild)
Creates the object from a REST connection.
DiscordDataProvider::DiscordGuildDataProvider::getChildProviderSummaryInfo
*list< hash< DataProvider::DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
DiscordDataProvider::DiscordGuildDataProvider::guild
hash< auto > guild
The guild info.
Definition DiscordGuildDataProvider.qc.dox.h:55
DiscordDataProvider
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26