INNER CODE UNIT · Rust
deref
aome510/spotify-player · spotify_player/src/client/mod.rs:85
fn deref(&self) -> &Self::Target {
&self.api_client
}
}
/// Build the Spotify Web API client from the configured client ID.
///
/// The returned client is unauthenticated; call [`auth::prompt_for_user_token`] to obtain an
/// access token.
pub fn new_api_client() -> Result<WebApiClient> {
let configs = config::get_config();
let id = configs.app_config.get_client_id()?;
let ncspot_only_get_endpoints = configs.app_config.ncspot_only_get_endpoints.clone();
let mut scopes = auth::OAUTH_SCOPES
.iter()
.map(ToString::to_string)
.collect::<HashSet<_>>();