pub trait OAuthApiClient: NadeoApiClient {
// Required method
async fn get_oauth_token(&self) -> Result<OAuthToken, String>;
// Provided methods
async fn get_oauth_permit_and_token(
&self,
) -> Result<(OAuthToken, SemaphorePermit<'_>), String> { ... }
async fn get_display_names<T>(
&self,
account_ids: &[T],
) -> Result<HashMap<String, String>, String>
where T: Into<String> + Clone { ... }
}
Required Methods§
Sourceasync fn get_oauth_token(&self) -> Result<OAuthToken, String>
async fn get_oauth_token(&self) -> Result<OAuthToken, String>
For adding API requests, use get_oauth_permit_and_token
.
Provided Methods§
async fn get_oauth_permit_and_token( &self, ) -> Result<(OAuthToken, SemaphorePermit<'_>), String>
Sourceasync fn get_display_names<T>(
&self,
account_ids: &[T],
) -> Result<HashMap<String, String>, String>
async fn get_display_names<T>( &self, account_ids: &[T], ) -> Result<HashMap<String, String>, String>
Get Display Names for a list of Uuids
https://webservices.openplanet.dev/oauth/reference/accounts/id-to-name
calls GET https://api.trackmania.com/api/display-names?accountId[]={accountId}
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.