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>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumsEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumTracksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AlbumTracksEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedTrack>>
pub async fn get(self) -> Result<Page<SimplifiedTrack>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAlbumsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAlbumsEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SavedAlbum>>
pub async fn get(self) -> Result<Page<SavedAlbum>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, NewReleasesEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, NewReleasesEndpoint>
sourcepub fn country(self, country: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedAlbum>>
pub async fn get(self) -> Result<Page<SimplifiedAlbum>>
Sends the actual request.
source§impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, ArtistEndpoint>
impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, ArtistEndpoint>
pub fn albums(self) -> Builder<'a, F, V, ArtistAlbumsEndpoint>
pub fn top_tracks(self) -> Builder<'a, F, V, ArtistTopTracksEndpoint>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistAlbumsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistAlbumsEndpoint>
sourcepub fn include_groups(self, include_groups: &[AlbumGroup]) -> Self
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.
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedAlbum>>
pub async fn get(self) -> Result<Page<SimplifiedAlbum>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistTopTracksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ArtistTopTracksEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobooksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobooksEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookChaptersEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, AudiobookChaptersEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedChapter>>
pub async fn get(self) -> Result<Page<SimplifiedChapter>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAudiobooksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedAudiobooksEndpoint>
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChapterEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChapterEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChaptersEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChaptersEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoryEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoryEndpoint>
sourcepub fn country(self, country: impl Into<String>) -> Self
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.
sourcepub fn locale(self, locale: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoriesEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, BrowseCategoriesEndpoint>
sourcepub fn country(self, country: impl Into<String>) -> Self
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.
sourcepub fn locale(self, locale: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, StartPlaybackEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, StartPlaybackEndpoint>
sourcepub fn device_id(self, device_id: impl Into<String>) -> Self
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.
sourcepub fn context_uri(self, context_uri: impl Into<String>) -> Self
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.
sourcepub fn position_ms(self, position_ms: u32) -> Self
pub fn position_ms(self, position_ms: u32) -> Self
The position at which to start/resume the playback.
source§impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, RecentlyPlayedTracksEndpoint<Unspecified>>
impl<'a, F: AuthFlow, V: Verifier> Builder<'a, F, V, RecentlyPlayedTracksEndpoint<Unspecified>>
source§impl<F: AuthFlow, V: Verifier, T: TimestampMarker> Builder<'_, F, V, RecentlyPlayedTracksEndpoint<T>>
impl<F: AuthFlow, V: Verifier, T: TimestampMarker> Builder<'_, F, V, RecentlyPlayedTracksEndpoint<T>>
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<CursorPage<PlayHistory>>
pub async fn get(self) -> Result<CursorPage<PlayHistory>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChangePlaylistDetailsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ChangePlaylistDetailsEndpoint>
sourcepub fn collaborative(self, collaborative: bool) -> Self
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.
sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
The new description for the playlist.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistItemsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, PlaylistItemsEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<PlaylistTrack>>
pub async fn get(self) -> Result<Page<PlaylistTrack>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UpdatePlaylistItemsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UpdatePlaylistItemsEndpoint>
sourcepub fn uris<T: ToString>(self, uris: &[T]) -> Self
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).
sourcepub fn range_length(self, range_length: u32) -> Self
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.
sourcepub fn snapshot_id(self, snapshot_id: impl Into<String>) -> Self
pub fn snapshot_id(self, snapshot_id: impl Into<String>) -> Self
The playlist’s snapshot ID against which to make changes.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CurrentUserPlaylistsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CurrentUserPlaylistsEndpoint>
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserPlaylistsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserPlaylistsEndpoint>
source§impl<'a, F: AuthFlow, V: Verifier> Builder<'_, F, V, CreatePlaylistEndpoint<'a>>
impl<'a, F: AuthFlow, V: Verifier> Builder<'_, F, V, CreatePlaylistEndpoint<'a>>
sourcepub fn public(self, public: bool) -> Self
pub fn public(self, public: bool) -> Self
Whether or not to make the playlist public. Defaults to true.
sourcepub fn collaborative(self, collaborative: bool) -> Self
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.
sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
The description for the new playlist.
pub fn tracks(self, track_uris: &'a [&str]) -> Self
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FeaturedPlaylistsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FeaturedPlaylistsEndpoint>
sourcepub fn country(self, country: impl Into<String>) -> Self
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.
sourcepub fn locale(self, locale: impl Into<String>) -> Self
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)
sourcepub fn timestamp(self, timestamp: DateTime<Utc>) -> Self
pub fn timestamp(self, timestamp: DateTime<Utc>) -> Self
An ISO 8601 timestamp (yyyy-MM-ddTHH:mm:ss)
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<FeaturedPlaylists>
pub async fn get(self) -> Result<FeaturedPlaylists>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CategoryPlaylistsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, CategoryPlaylistsEndpoint>
sourcepub fn country(self, country: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedPlaylist>>
pub async fn get(self) -> Result<Page<SimplifiedPlaylist>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SearchEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SearchEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub fn include_external(self, include_external: bool) -> Self
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.
sourcepub async fn get(self) -> Result<SearchResults>
pub async fn get(self) -> Result<SearchResults>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowsEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEpisodesEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, ShowEpisodesEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SimplifiedEpisode>>
pub async fn get(self) -> Result<Page<SimplifiedEpisode>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodeEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodeEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodesEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, EpisodesEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedEpisodesEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedEpisodesEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SavedEpisode>>
pub async fn get(self) -> Result<Page<SavedEpisode>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TrackEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TrackEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TracksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, TracksEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedTracksEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, SavedTracksEndpoint>
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<Page<SavedTrack>>
pub async fn get(self) -> Result<Page<SavedTrack>>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedArtists>>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedArtists>>
sourcepub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self
pub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self
Up to 5 Spotify genre IDs used for seeding the recommendations.
sourcepub fn seed_tracks<T: AsRef<str>>(self, track_ids: &[T]) -> Self
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>>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedGenres>>
sourcepub fn seed_artists<T: AsRef<str>>(self, artist_ids: &[T]) -> Self
pub fn seed_artists<T: AsRef<str>>(self, artist_ids: &[T]) -> Self
Up to 5 Spotify artist IDs used for seeding the recommendations.
sourcepub fn seed_tracks<T: AsRef<str>>(self, track_ids: &[T]) -> Self
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>>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, RecommendationsEndpoint<SeedTracks>>
sourcepub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self
pub fn seed_genres<T: AsRef<str>>(self, genres: &[T]) -> Self
Up to 5 Spotify genre IDs used for seeding the recommendations.
sourcepub fn seed_artists<T: AsRef<str>>(self, artist_ids: &[T]) -> Self
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>>
impl<F: AuthFlow, V: Verifier, S: SeedType> Builder<'_, F, V, RecommendationsEndpoint<S>>
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub fn market(self, market: impl Into<String>) -> Self
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.
sourcepub async fn get(self) -> Result<Recommendations>
pub async fn get(self) -> Result<Recommendations>
Sends the actual request.
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserTopItemsEndpoint>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, UserTopItemsEndpoint>
source§impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FollowedArtistsBuilder>
impl<F: AuthFlow, V: Verifier> Builder<'_, F, V, FollowedArtistsBuilder>
sourcepub fn after(self, artist_id: impl Into<String>) -> Self
pub fn after(self, artist_id: impl Into<String>) -> Self
The last artist ID retrieved from the previous request.
sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
The maximum amount of items to return. Defaults to 20.
Must be a value between 1 - 50.
sourcepub async fn get(self) -> Result<CursorPage<Artist>>
pub async fn get(self) -> Result<CursorPage<Artist>>
Sends the actual request.