Qore DiscordDataProvider Module Reference 2.0
Loading...
Searching...
No Matches
DiscordGuildDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace DiscordDataProvider {
29
30public:
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
53protected:
55 hash<auto> guild;
56
58 *hash<auto> cal;
59
60 const DefaultChildMap = ...;
61
62
63 static hash<string, Reflection::Class> childMap = DefaultChildMap;
64
65public:
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
91protected:
92 static deregisterChild(string pathname);
93public:
94
95
97
99protected:
101public:
102
103
105
109protected:
111public:
112
113
115 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
116
117};
118};
The Discord data provider base class.
Definition DiscordDataProviderBase.qc.dox.h:28
*DiscordRestClient rest
The REST client object for API calls.
Definition DiscordDataProviderBase.qc.dox.h:43
const ConstructorOptions
Constructor options.
Definition DiscordDataProvider.qc.dox.h:43
The parent class for Discord guild REST APIs.
Definition DiscordGuildDataProvider.qc.dox.h:28
constructor(*hash< auto > options)
Creates the object from constructor options.
*string getDesc()
Returns the data provider description.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
static hash< DataProviderSummaryInfo > ProviderSummaryInfo
Provider summary info.
Definition DiscordGuildDataProvider.qc.dox.h:49
*hash< auto > cal
The guild's metadata.
Definition DiscordGuildDataProvider.qc.dox.h:58
static hash< DataProviderInfo > ProviderInfo
Provider info.
Definition DiscordGuildDataProvider.qc.dox.h:32
*DiscordDataProviderBase getChildProviderImpl(string name)
Returns the given child provider or nothing if the given child is unknown.
static deregisterChild(string pathname)
Deregister the named child data provider.
static registerChild(string pathname, Reflection::Class cls)
Register a new child data provider for Discord guilds.
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
string getName()
Returns the data provider name.
constructor(DiscordRestClient::DiscordRestClient rest, hash< auto > guild)
Creates the object from a REST connection.
*list< hash< DataProvider::DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
hash< auto > guild
The guild info.
Definition DiscordGuildDataProvider.qc.dox.h:55
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26