Struct spotify_rs::endpoint::Builder

source ·
pub struct Builder<'s, F: AuthFlow, V: Verifier, E: Endpoint> { /* private fields */ }
Expand description

Builder for methods that get information from the API.

Implementations§

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Album>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumsEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Album>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumTracksEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedTrack>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAlbumsEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SavedAlbum>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, NewReleasesEndpoint>

source

pub fn country(self, country: impl Into<String>) -> Self

Sets the country to the specified ISO 3166-1 alpha-2 country code.

If supplied, the returned content will be relevant to the provided country.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedAlbum>>

Sends the actual request.

source§

impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, ArtistEndpoint>

source

pub fn albums(self) -> Builder<'a, F, V, ArtistAlbumsEndpoint>

source

pub fn top_tracks(self) -> Builder<'a, F, V, ArtistTopTracksEndpoint>

source

pub async fn get(self) -> Result<Artist>

Sends the actual request.

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistAlbumsEndpoint>

source

pub fn include_groups(self, include_groups: &[AlbumGroup]) -> Self

Sets the album types to be returned. If not supplied all album types will be returned.

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedAlbum>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistTopTracksEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Track>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Audiobook>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobooksEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Audiobook>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookChaptersEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedChapter>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAudiobooksEndpoint>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedAudiobook>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChapterEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Chapter>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChaptersEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Chapter>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoryEndpoint>

source

pub fn country(self, country: impl Into<String>) -> Self

Sets the country to the specified ISO 3166-1 alpha-2 country code.

If supplied, the returned content will be relevant to the provided country.

source

pub fn locale(self, locale: impl Into<String>) -> Self

The ISO 639-1 language code, followed by an underscore and the ISO 3166-1 alpha-2 country code

For example: es_MX - “Spanish (Mexico)”.

If supplied, the returned content will be in the specified language. If the locale isn’t supplied or the specified language isn’t available, all strings will be returned in Spotify’s default language (American English)

source

pub async fn get(self) -> Result<Category>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoriesEndpoint>

source

pub fn country(self, country: impl Into<String>) -> Self

Sets the country to the specified ISO 3166-1 alpha-2 country code.

If supplied, the returned content will be relevant to the provided country.

source

pub fn locale(self, locale: impl Into<String>) -> Self

The ISO 639-1 language code, followed by an underscore and the ISO 3166-1 alpha-2 country code

For example: es_MX - “Spanish (Mexico)”.

If supplied, the returned content will be in the specified language. If the locale isn’t supplied or the specified language isn’t available, all strings will be returned in Spotify’s default language (American English)

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<Category>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TransferPlaybackEndpoint>

source

pub fn play(self, play: bool) -> Self

If true, ensure playback happens on the new device. Otherwise, keep the current playback state.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, StartPlaybackEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub fn context_uri(self, context_uri: impl Into<String>) -> Self

The URI of the context to play. Valid contexts are albums, artists and playlists.

source

pub fn uris(self, uris: &[&str]) -> Self

The URIs of the tracks to play.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub fn position_ms(self, position_ms: u32) -> Self

The position at which to start/resume the playback.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SeekToPositionEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SetRepeatModeEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SetPlaybackVolumeEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ToggleShuffleEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, RecentlyPlayedTracksEndpoint<Unspecified>>

source

pub fn after( self, after: u64, ) -> Builder<'a, F, V, RecentlyPlayedTracksEndpoint<After>>

A Unix timestamp in miliseconds. Returns all items after (but not including) this cursor position.

source

pub fn before( self, before: u64, ) -> Builder<'a, F, V, RecentlyPlayedTracksEndpoint<Before>>

A Unix timestamp in miliseconds. Returns all items before (but not including) this cursor position.

source§

impl<F: AuthFlow, V: Verifier, T: TimestampMarker> Builder<'_, F, V, RecentlyPlayedTracksEndpoint<T>>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub async fn get(self) -> Result<CursorPage<PlayHistory>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AddItemToQueueEndpoint>

source

pub fn device_id(self, device_id: impl Into<String>) -> Self

The ID of the targeted device. If not supplied, the user’s current device will be affected.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Playlist>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChangePlaylistDetailsEndpoint>

source

pub fn name(self, name: impl Into<String>) -> Self

The new name for the playlist.

source

pub fn public(self, public: bool) -> Self

Whether or not to make the playlist public.

source

pub fn collaborative(self, collaborative: bool) -> Self

If true, other users will be able to modify the playlist.

You can only set collaborative to true on private playlists.

source

pub fn description(self, description: impl Into<String>) -> Self

The new description for the playlist.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistItemsEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<PlaylistTrack>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UpdatePlaylistItemsEndpoint>

source

pub fn uris<T: ToString>(self, uris: &[T]) -> Self

The Spotify URIs of the items to add (an item can be a track or episode).

source

pub fn range_length(self, range_length: u32) -> Self

The amount of items to be reordered. Defaults to 1.

The range of items to be reordered begins from the range_start position, and includes the range_length subsequent items.

For example, to move the items at index 9-10 to the start of the playlist, range_start should be 9 and range_length 2.

source

pub fn snapshot_id(self, snapshot_id: impl Into<String>) -> Self

The playlist’s snapshot ID against which to make changes.

source

pub async fn send(self) -> Result<String>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AddPlaylistItemsEndpoint>

source

pub fn position(self, position: u32) -> Self

The position to insert the items at, zero-based. If omitted, items will be appended to the playlist.

source

pub async fn send(self) -> Result<String>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RemovePlaylistItemsEndpoint>

source

pub fn snapshot_id(self, snapshot_id: impl Into<String>) -> Self

The playlist’s snapshot ID against which to make changes.

source

pub async fn send(self) -> Result<String>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CurrentUserPlaylistsEndpoint>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedPlaylist>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserPlaylistsEndpoint>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedPlaylist>>

Sends the actual request.

source§

impl<'a, F: AuthFlow, V: Verifier> Builder<'_, F, V, CreatePlaylistEndpoint<'a>>

source

pub fn public(self, public: bool) -> Self

Whether or not to make the playlist public. Defaults to true.

source

pub fn collaborative(self, collaborative: bool) -> Self

If true, other users will be able to modify the playlist.

You can only set collaborative to true on private playlists. Defaults to false.

source

pub fn description(self, description: impl Into<String>) -> Self

The description for the new playlist.

source

pub fn tracks(self, track_uris: &'a [&str]) -> Self

source

pub async fn send(self) -> Result<Playlist>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FeaturedPlaylistsEndpoint>

source

pub fn country(self, country: impl Into<String>) -> Self

Sets the country to the specified ISO 3166-1 alpha-2 country code.

If supplied, the returned content will be relevant to the provided country.

source

pub fn locale(self, locale: impl Into<String>) -> Self

The ISO 639-1 language code, followed by an underscore and the ISO 3166-1 alpha-2 country code

For example: es_MX - “Spanish (Mexico)”.

If supplied, the returned content will be in the specified language. If the locale isn’t supplied or the specified language isn’t available, all strings will be returned in Spotify’s default language (American English)

source

pub fn timestamp(self, timestamp: DateTime<Utc>) -> Self

An ISO 8601 timestamp (yyyy-MM-ddTHH:mm:ss)

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<FeaturedPlaylists>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CategoryPlaylistsEndpoint>

source

pub fn country(self, country: impl Into<String>) -> Self

Sets the country to the specified ISO 3166-1 alpha-2 country code.

If supplied, the returned content will be relevant to the provided country.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedPlaylist>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SearchEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub fn include_external(self, include_external: bool) -> Self

If specified, it signals that the client can play externally hosted audio content, and marks the content as playable in the response.

By default externally hosted audio content is marked as unplayable in the response.

source

pub async fn get(self) -> Result<SearchResults>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Show>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowsEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Option<SimplifiedShow>>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEpisodesEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SimplifiedEpisode>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedShowsEndpoint>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SavedShow>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodeEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Episode>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodesEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Episode>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedEpisodesEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SavedEpisode>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TrackEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Track>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TracksEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub async fn get(self) -> Result<Vec<Track>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedTracksEndpoint>

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<SavedTrack>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedArtists>>

source

pub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self

Up to 5 Spotify genre IDs used for seeding the recommendations.

source

pub fn seed_tracks<T: AsRef<str>>(self, track_ids: &[T]) -> Self

Up to 5 Spotify track IDs used for seeding the recommendations.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedGenres>>

source

pub fn seed_artists<T: AsRef<str>>(self, artist_ids: &[T]) -> Self

Up to 5 Spotify artist IDs used for seeding the recommendations.

source

pub fn seed_tracks<T: AsRef<str>>(self, track_ids: &[T]) -> Self

Up to 5 Spotify track IDs used for seeding the recommendations.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedTracks>>

source

pub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self

Up to 5 Spotify genre IDs used for seeding the recommendations.

source

pub fn seed_artists<T: AsRef<str>>(self, artist_ids: &[T]) -> Self

Up to 5 Spotify artist IDs used for seeding the recommendations.

source§

impl<F: AuthFlow, V: Verifier, S: SeedType> Builder<'_, F, V, RecommendationsEndpoint<S>>

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn market(self, market: impl Into<String>) -> Self

Sets the market to the specified ISO 3166-1 alpha-2 country code.

If supplied, only content available in the provided market will be returned, otherwise the country associated with the user access token is used. If neither are present, the content is considered unavailable for the client.

source

pub fn features(self, features: &[Feature]) -> Self

A list of Features. Read more about the available features here.

source

pub async fn get(self) -> Result<Recommendations>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserTopItemsEndpoint>

source

pub fn time_range(self, time_range: TimeRange) -> Self

The time frame of the computed affinities.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub fn offset(self, offset: u32) -> Self

The index of the first item to return.

source

pub async fn get(self) -> Result<Page<UserItem>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FollowPlaylistBuilder>

source

pub fn public(self, public: bool) -> Self

If set to true, the playlist will be included in the user’s public playlists. Defaults to true.

source

pub async fn send(self) -> Result<Nil>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FollowedArtistsBuilder>

source

pub fn after(self, artist_id: impl Into<String>) -> Self

The last artist ID retrieved from the previous request.

source

pub fn limit(self, limit: u32) -> Self

The maximum amount of items to return. Defaults to 20. Must be a value between 1 - 50.

source

pub async fn get(self) -> Result<CursorPage<Artist>>

Sends the actual request.

source§

impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FollowUserOrArtistEndpoint>

source

pub async fn follow(self) -> Result<Nil>

Sends the actual request.

source

pub async fn unfollow(self) -> Result<Nil>

Sends the actual request.

source

pub async fn check(self) -> Result<Vec<bool>>

Sends the actual request.

Auto Trait Implementations§

§

impl<'s, F, V, E> Freeze for Builder<'s, F, V, E>
where E: Freeze,

§

impl<'s, F, V, E> !RefUnwindSafe for Builder<'s, F, V, E>

§

impl<'s, F, V, E> Send for Builder<'s, F, V, E>
where E: Send, V: Send, F: Send,

§

impl<'s, F, V, E> Sync for Builder<'s, F, V, E>
where E: Sync, V: Sync, F: Sync,

§

impl<'s, F, V, E> Unpin for Builder<'s, F, V, E>
where E: Unpin,

§

impl<'s, F, V, E> !UnwindSafe for Builder<'s, F, V, E>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more