| Qore DiscordDataProvider Module Reference 2.0

Loading...
Searching...
No Matches
DiscordDataProvider Module

Qore DiscordDataProvider module definition

# Introduction to the DiscordDataProvider Module

The DiscordDataProvider module provides a data provider API for Discord cloud REST API services.

This data provider provides Discord API access to:

- guild (server) info (by ID and name):
  - `guilds/{id}/get`
  - `guilds-by-name/{name}/get`
- user info:
  - `user-info`
- Discord WebSocket gateway events:
  - `discordws`

To use this data provider, you will need a connection that has already executed the OAuth2 authorization code flow and acquired a token to communicate with the Discord API.

# Discord Data Provider Factory

The name of the Discord data provider factory is `discord`.

# Discord Data Provider Examples

These examples are with `qdp`, the command-line interface to the Data Provider API, and additionally assume that there is an available connection called `discord`, which has been fully authorized with OAuth2 to access Discord on behalf of the user.

API Example: Retrieve Information for a Guild by Name

      qdp discord/guilds-by-name/"My Server"/get dor

API Example: Retrieve Information About the Current User

      qdp discord/user-info dor

API Example: Communicate with the Discord Gateway API

      qdp -s discordws discord/discordws ix

# Release Notes

## DiscordDataProvider v1.0

- initial release of the module