pub struct Config<'a> {
pub client_id: i64,
pub client_secret: &'a SecretString,
}Expand description
The configuration for the Strava API client.
Fields§
§client_id: i64The client ID, assigned by Strava in Settings → My API Application.
client_secret: &'a SecretStringThe client secret, assigned by Strava in Settings → My API Application.
Implementations§
Source§impl Config<'_>
impl Config<'_>
Sourcepub fn login_url(&self, redirect: &str) -> Result<Url>
pub fn login_url(&self, redirect: &str) -> Result<Url>
Returns the URL that can be used to obtain an authorization token.
Users have to open the URL in their web browser, login to Strava and authorize the
application. They are then redirected to the given URL, e. g.
http://localhost/exchange_token, and have to extract the authroization token from the
code query field of the redirected URL. This token can then be used for the initial API
login with Api::login.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Config<'a>
impl<'a> RefUnwindSafe for Config<'a>
impl<'a> Send for Config<'a>
impl<'a> Sync for Config<'a>
impl<'a> Unpin for Config<'a>
impl<'a> UnwindSafe for Config<'a>
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