Struct slack_chat_api::oauth::Oauth
source · [−]pub struct Oauth {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl Oauth
impl Oauth
sourcepub async fn access(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
pub async fn access(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
This function performs a GET to the /oauth.access endpoint.
Exchanges a temporary OAuth verifier code for an access token.
FROM: https://api.slack.com/methods/oauth.access
Parameters:
client_id: &str– Issued when you created your application.client_secret: &str– Issued when you created your application.code: &str– Thecodeparam returned via the OAuth callback.redirect_uri: &str– This must match the originally submitted URI (if one was sent).single_channel: bool– Request the user to add your app only to a single channel. Only valid with a legacy workspace app.
sourcepub async fn token(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
pub async fn token(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
This function performs a GET to the /oauth.token endpoint.
Exchanges a temporary OAuth verifier code for a workspace token.
FROM: https://api.slack.com/methods/oauth.token
Parameters:
client_id: &str– Issued when you created your application.client_secret: &str– Issued when you created your application.code: &str– Thecodeparam returned via the OAuth callback.redirect_uri: &str– This must match the originally submitted URI (if one was sent).single_channel: bool– Request the user to add your app only to a single channel.
Auto Trait Implementations
impl !RefUnwindSafe for Oauth
impl Send for Oauth
impl Sync for Oauth
impl Unpin for Oauth
impl !UnwindSafe for Oauth
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more