network/rest

This handles the logic for communicating with the Discord REST API. For more information: https://discord.com/developers/docs/reference#http-api

Types

Acceptable values for an Authorization header

pub type TokenType {
  Bearer
  Bot
}

Constructors

  • Bearer
  • Bot

Functions

pub fn decode_application(
  json_string: String,
) -> Result(Application, DecodeError)
pub fn request(
  ua_url: String,
  version: String,
  token_type: TokenType,
  token: String,
) -> Result(Response(String), Error)
Search Document