Struct rosu_v2::OsuBuilder
source · [−]pub struct OsuBuilder { /* private fields */ }
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
After acquiring the authorization code from a user through OAuth, use this method to provide the given code, and specified redirect uri.
For more info, check out https://osu.ppy.sh/docs/index.html#authorization-code-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
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more