[−][src]Struct mixer_wrappers::rest::REST
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]
&self,
method: &str,
endpoint: &str,
params: Option<&[(&str, &str)]>,
body: Option<&str>,
access_token: Option<&str>
) -> Result<String, Error>
Query an endpoint.
Arguments
method
- HTTP verbendpoint
- API endpoint (do not include the API base URL)params
- query params to include (if none, just send&[]
)body
- optional HTTP body Stringaccess_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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,