osu: Implement pins (#53)

Also format recent so attempt count is displayed
This commit is contained in:
Natsu Kagami 2024-10-12 17:07:56 +02:00 committed by GitHub
parent a8d1d11223
commit 6fbae89dfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 167 additions and 51 deletions

View file

@ -238,6 +238,7 @@ pub mod builders {
pub(crate) enum UserScoreType {
Recent,
Best,
Pin,
}
pub struct UserScoreRequestBuilder {
@ -273,6 +274,7 @@ pub mod builders {
r = match self.score_type {
UserScoreType::Recent => r.recent().include_fails(true),
UserScoreType::Best => r.best(),
UserScoreType::Pin => r.pinned(),
};
if let Some(mode) = self.mode {
r = r.mode(mode.into());