glitch/api/client

Types

pub type ApiError {
  RequestError
}

Constructors

  • RequestError
pub opaque type Client
pub type Options {
  Options(client_id: String, access_token: String)
}

Constructors

  • Options(client_id: String, access_token: String)

Constants

pub const new: fn(Options) -> Client = Client

Functions

pub fn access_token(client: Client) -> String
pub fn client_id(client: Client) -> String
pub fn get(
  client: Client,
  request: Request(Json),
) -> Result(Response(String), Dynamic)
pub fn headers(client: Client) -> List(#(String, String))
pub fn post(
  client: Client,
  request: Request(Json),
) -> Result(Response(String), Dynamic)
Search Document