pub struct Oauth {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Oauth
impl Oauth
Sourcepub async fn access(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool,
) -> Result<Response<DndEndSchema>, ClientError>
pub async fn access( &self, client_id: &str, client_secret: &str, code: &str, redirect_uri: &str, single_channel: bool, ) -> Result<Response<DndEndSchema>, ClientError>
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<Response<DndEndSchema>, ClientError>
pub async fn token( &self, client_id: &str, client_secret: &str, code: &str, redirect_uri: &str, single_channel: bool, ) -> Result<Response<DndEndSchema>, ClientError>
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 Freeze for Oauth
impl !RefUnwindSafe for Oauth
impl Send for Oauth
impl Sync for Oauth
impl Unpin for Oauth
impl !UnwindSafe for Oauth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more