[][src]Struct mixer_wrappers::rest::REST

pub struct REST { /* fields omitted */ }

API wrapper around the Mixer REST API.

Implementations

impl REST[src]

pub fn new(client_id: &str) -> Self[src]

Create a new API wrapper.

Arguments

  • client_id - your Mixer API client ID

Examples

use mixer_wrappers::rest::REST;

let api = REST::new("abcd");

pub fn query(
    &self,
    method: &str,
    endpoint: &str,
    params: Option<&[(&str, &str)]>,
    body: Option<&str>,
    access_token: Option<&str>
) -> Result<String, Error>
[src]

Query an endpoint.

Arguments

  • method - HTTP verb
  • endpoint - API endpoint (do not include the API base URL)
  • params - query params to include (if none, just send &[])
  • body - optional HTTP body String
  • access_token - optional OAuth token

Examples

let api = REST::new("");
let text = api.query("GET", "some/endpoint", None, None, None).unwrap();

pub fn chat_helper(&self) -> ChatHelper[src]

Get a struct with several chat-related endpoint helpers.

Examples

let api = REST::new("");
let helper = api.chat_helper();

pub fn webhook_helper(&self) -> WebHookHelper[src]

Get a struct with several WebHook-related endpoint helpers.

Examples

let api = REST::new("");
let helper = api.webhook_helper();

Auto Trait Implementations

impl !RefUnwindSafe for REST

impl Send for REST

impl Sync for REST

impl Unpin for REST

impl !UnwindSafe for REST

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,