[−][src]Struct rspotify::oauth2::SpotifyOAuth
Authorization for spotify
Fields
client_id: String
client_secret: String
redirect_uri: String
state: String
cache_path: PathBuf
scope: String
proxies: Option<String>
Methods
impl SpotifyOAuth
[src]
pub fn default() -> SpotifyOAuth
[src]
pub fn client_id(self, client_id: &str) -> SpotifyOAuth
[src]
pub fn client_secret(self, client_secret: &str) -> SpotifyOAuth
[src]
pub fn redirect_uri(self, redirect_uri: &str) -> SpotifyOAuth
[src]
pub fn scope(self, scope: &str) -> SpotifyOAuth
[src]
pub fn state(self, state: &str) -> SpotifyOAuth
[src]
pub fn cache_path(self, cache_path: PathBuf) -> SpotifyOAuth
[src]
pub fn proxies(self, proxies: &str) -> SpotifyOAuth
[src]
pub fn build(self) -> SpotifyOAuth
[src]
pub async fn get_cached_token<'_>(&'_ mut self) -> Option<TokenInfo>
[src]
pub async fn get_access_token<'_, '_>(
&'_ self,
code: &'_ str
) -> Option<TokenInfo>
[src]
&'_ self,
code: &'_ str
) -> Option<TokenInfo>
gets the access_token for the app given the code
pub fn parse_response_code(&self, url: &mut str) -> Option<String>
[src]
Parse the response code in the given response url
pub fn get_authorize_url(
&self,
state: Option<&str>,
show_dialog: Option<bool>
) -> String
[src]
&self,
state: Option<&str>,
show_dialog: Option<bool>
) -> String
Gets the URL to use to authorize this app
pub async fn refresh_access_token<'_, '_>(
&'_ self,
refresh_token: &'_ str
) -> Option<TokenInfo>
[src]
&'_ self,
refresh_token: &'_ str
) -> Option<TokenInfo>
after refresh access_token, the response may be empty when refresh_token again
Trait Implementations
impl Clone for SpotifyOAuth
[src]
fn clone(&self) -> SpotifyOAuth
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SpotifyOAuth
[src]
impl<'de> Deserialize<'de> for SpotifyOAuth
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for SpotifyOAuth
[src]
Auto Trait Implementations
impl RefUnwindSafe for SpotifyOAuth
impl Send for SpotifyOAuth
impl Sync for SpotifyOAuth
impl Unpin for SpotifyOAuth
impl UnwindSafe for SpotifyOAuth
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,