[][src]Struct af_slack::api::Client

pub struct Client { /* fields omitted */ }

A Slack API client.

Implementations

impl Client[src]

pub fn new(token: impl AsRef<str>) -> Self[src]

Creates a new client with a given OAuth token.

pub async fn get<Q, O>(
    &self,
    method: &str,
    query: &Q
) -> Result<Result<O, ErrorResponse>> where
    Q: Serialize,
    O: for<'a> Deserialize<'a>, 
[src]

Sends a POST request.

pub async fn post<I, O>(
    &self,
    method: &str,
    body: &I
) -> Result<Result<O, ErrorResponse>> where
    I: Serialize,
    O: for<'a> Deserialize<'a>, 
[src]

Sends a POST request.

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument 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<V, T> VZip<V> for T where
    V: MultiLane<T>,