pub trait Request: Serialize {
    type Response: DeserializeOwned + PartialEq;

    const PATH: &'static str;
    const SCOPE: &'static [Scope];
    const OPT_SCOPE: &'static [Scope] = &[];

    fn query(&self) -> Result<String, SerializeError> { ... }
    fn get_uri(&self) -> Result<Uri, InvalidUri> { ... }
    fn get_bare_uri() -> Result<Uri, InvalidUri> { ... }
}
Available on crate feature helix only.
Expand description

A request is a Twitch endpoint, see New Twitch API reference

Required Associated Types

Response type. twitch’s response will deserialize to this.

Required Associated Constants

The path to the endpoint relative to the helix root. eg. channels for Get Channel Information

Available on crate feature twitch_oauth2 only.

Scopes needed by this endpoint

Provided Associated Constants

Available on crate feature twitch_oauth2 only.

Optional scopes needed by this endpoint

Provided Methods

Defines layout of the url parameters.

Returns full URI for the request, including query parameters.

Returns bare URI for the request, NOT including query parameters.

Implementors