Struct rosu_v2::request::GetBeatmapsetSearch
source · pub struct GetBeatmapsetSearch<'a> { /* private fields */ }
Expand description
Get a BeatmapsetSearchResult
struct containing the first page of maps that fit the search query.
The default search parameters are:
- mode: any
- status: has leaderboard (ranked, loved, approved, and qualified)
- genre: any
- language: any
- extra: does neither contain “have video” nor “have storyboard”
- nsfw: allowed
- sort: by relevance, descending
The contained Beatmapset
s will have the
following options filled: artist_unicode
, legacy_thread_url
, maps
,
ranked_date
and submitted_date
if available, and title_unicode
.
The search query allows the following options to be specified: ar
, artist
,
bpm
, created
, creator
, cs
, dr
(hp drain rate), keys
, length
,
ranked
, stars
, and status
.
Example
// Search for mapsets from Sotarks that have a map with no more than AR 9.
let query = "creator=sotarks ar<9";
// Loved mapsets from Camellia including at least one map above 8 stars
let query = "status=loved artist=camellia stars>8";
Implementations§
source§impl<'a> GetBeatmapsetSearch<'a>
impl<'a> GetBeatmapsetSearch<'a>
sourcepub fn mode(self, mode: GameMode) -> Self
pub fn mode(self, mode: GameMode) -> Self
Specify the mode for which the mapsets has to have at least one map.
sourcepub fn any_status(self) -> Self
pub fn any_status(self) -> Self
Allow any status for mapsets. To specify a specific one, use the
status
method.
sourcepub fn status(self, status: RankStatus) -> Self
pub fn status(self, status: RankStatus) -> Self
Specify a status for the mapsets, defaults to has_leaderboard
i.e. ranked, loved, approved, and qualified. To allow any status, use the
any_status
method.
Note
The API does not seem to filter for the RankStatus::Approved
status specifically.
sourcepub fn language(self, language: Language) -> Self
pub fn language(self, language: Language) -> Self
Specify a language for the mapsets, defaults to Any
.
sourcepub fn video(self, video: bool) -> Self
pub fn video(self, video: bool) -> Self
Specify whether mapsets can have a video, defaults to false
.
sourcepub fn storyboard(self, storyboard: bool) -> Self
pub fn storyboard(self, storyboard: bool) -> Self
Specify whether mapsets can have a storyboard, defaults to false
.
sourcepub fn sort(self, sort: BeatmapsetSearchSort, descending: bool) -> Self
pub fn sort(self, sort: BeatmapsetSearchSort, descending: bool) -> Self
Specify how the result should be sorted
Trait Implementations§
source§impl Future for GetBeatmapsetSearch<'_>
impl Future for GetBeatmapsetSearch<'_>
§type Output = Result<BeatmapsetSearchResult, OsuError>
type Output = Result<BeatmapsetSearchResult, OsuError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GetBeatmapsetSearch<'a>
impl<'a> Send for GetBeatmapsetSearch<'a>
impl<'a> Sync for GetBeatmapsetSearch<'a>
impl<'a> Unpin for GetBeatmapsetSearch<'a>
impl<'a> !UnwindSafe for GetBeatmapsetSearch<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for Twhere
T: Future + ?Sized,
impl<T> FutureExt for Twhere T: Future + ?Sized,
§fn map<U, F>(self, f: F) -> Map<Self, F>where
F: FnOnce(Self::Output) -> U,
Self: Sized,
fn map<U, F>(self, f: F) -> Map<Self, F>where F: FnOnce(Self::Output) -> U, Self: Sized,
§fn map_into<U>(self) -> MapInto<Self, U>where
Self::Output: Into<U>,
Self: Sized,
fn map_into<U>(self) -> MapInto<Self, U>where Self::Output: Into<U>, Self: Sized,
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
Self: Sized,
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>where F: FnOnce(Self::Output) -> Fut, Fut: Future, Self: Sized,
f
. Read more§fn left_future<B>(self) -> Either<Self, B>where
B: Future<Output = Self::Output>,
Self: Sized,
fn left_future<B>(self) -> Either<Self, B>where B: Future<Output = Self::Output>, Self: Sized,
§fn right_future<A>(self) -> Either<A, Self>where
A: Future<Output = Self::Output>,
Self: Sized,
fn right_future<A>(self) -> Either<A, Self>where A: Future<Output = Self::Output>, Self: Sized,
§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where Self: Sized,
§fn flatten(self) -> Flatten<Self>where
Self::Output: Future,
Self: Sized,
fn flatten(self) -> Flatten<Self>where Self::Output: Future, Self: Sized,
§fn flatten_stream(self) -> FlattenStream<Self>where
Self::Output: Stream,
Self: Sized,
fn flatten_stream(self) -> FlattenStream<Self>where Self::Output: Stream, Self: Sized,
§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where Self: Sized,
poll
will never again be called once it has
completed. This method can be used to turn any Future
into a
FusedFuture
. Read more§fn inspect<F>(self, f: F) -> Inspect<Self, F>where
F: FnOnce(&Self::Output),
Self: Sized,
fn inspect<F>(self, f: F) -> Inspect<Self, F>where F: FnOnce(&Self::Output), Self: Sized,
§fn unit_error(self) -> UnitError<Self>where
Self: Sized,
fn unit_error(self) -> UnitError<Self>where Self: Sized,
Future<Output = T>
into a
TryFuture<Ok = T, Error = ()
>.§fn never_error(self) -> NeverError<Self>where
Self: Sized,
fn never_error(self) -> NeverError<Self>where Self: Sized,
Future<Output = T>
into a
TryFuture<Ok = T, Error = Never
>.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere F: Future,
§type IntoFuture = F
type IntoFuture = F
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
§impl<Fut> TryFutureExt for Futwhere
Fut: TryFuture + ?Sized,
impl<Fut> TryFutureExt for Futwhere Fut: TryFuture + ?Sized,
§fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>where
Self::Ok: Sink<Item, Error = Self::Error>,
Self: Sized,
fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>where Self::Ok: Sink<Item, Error = Self::Error>, Self: Sized,
Sink
]. Read more