Struct rosu_v2::OsuBuilder [−][src]
pub struct OsuBuilder { /* fields omitted */ }
Expand description
Builder struct for an Osu
client.
client_id
as well as client_secret
must be specified before building.
For more info, check out https://osu.ppy.sh/docs/index.html#client-credentials-grant
Implementations
Create a new OsuBuilder
Build an Osu
client.
To build the client, the client id and secret are being used to acquire a token from the API which expires after a certain time. The client will from then on update the token regularly on its own.
Errors
Returns an error if
- client id was not set
- client secret was not set
- API did not provide a token for the given client id and client secret
Set the client id of the application.
For more info, check out https://osu.ppy.sh/docs/index.html#client-credentials-grant
Set the client secret of the application.
For more info, check out https://osu.ppy.sh/docs/index.html#client-credentials-grant
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for OsuBuilder
impl Send for OsuBuilder
impl Sync for OsuBuilder
impl Unpin for OsuBuilder
impl UnwindSafe for OsuBuilder