Qore DiscordRestClient Module Reference 1.0
Loading...
Searching...
No Matches

DiscordRestClient Introduction

The DiscordRestClient module provides an API for calling Discord REST API services.

To use this module, use "%requires DiscordRestClient" in your code.

All the public symbols in the module are defined in the DiscordRestClient namespace.

The main classes are:

  • DiscordRestClient: this class provides the REST client API for communuication with the Discord REST API; it also automates authentication and authorization to the target
  • DiscordRestConnection: provides a REST connection object to Discord cloud services (based on the ConnectionProvider module)
Example:
#!/usr/bin/env qore
%new-style
%strict-args
%require-types
%enable-all-warnings
%requires DiscordRestClient
%requires ConnectionProvider
DiscordRestClient rest = get_connection("my-discord-connection");
hash<auto> ans = rest.get("/calendar/users/me/calendarList");
printf("%N\n", ans.body);

Release Notes

DiscordRestClient v1.0

  • the initial version of the DiscordRestClient module