pub struct Client {
pub client_id: String,
}
Fields§
§client_id: String
Implementations§
Source§impl Client
impl Client
pub async fn search_albums( &self, query: Option<&AlbumQuery>, ) -> Result<Playlists, Box<dyn Error>>
Source§impl Client
impl Client
pub async fn new() -> Result<Self, Box<dyn Error>>
pub async fn get_json<R: DeserializeOwned, Q: Serialize>( base_url: &str, path: Option<&str>, query: Option<&Q>, client_id: &str, ) -> Result<R, Box<dyn Error>>
pub async fn get<Q: Serialize, R: DeserializeOwned>( &self, path: &str, query: Option<&Q>, ) -> Result<R, Box<dyn Error>>
Source§impl Client
impl Client
pub async fn search_playlists( &self, query: Option<&PlaylistsQuery>, ) -> Result<Playlists, Box<dyn Error>>
pub async fn get_playlist_by_id( &self, id: &str, ) -> Result<Playlist, Box<dyn Error>>
pub async fn get_playlist_by_urn( &self, urn: &str, ) -> Result<Playlist, Box<dyn Error>>
pub async fn get_playlist_reposters_by_id( &self, id: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_playlist_reposters_by_urn( &self, urn: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn download_playlist( &self, playlist: &Playlist, destination: Option<&str>, playlist_name: Option<&str>, ) -> Result<(), Box<dyn Error>>
Source§impl Client
impl Client
pub async fn get_search_results( &self, query: Option<&SearchResultsQuery>, ) -> Result<SearchResultsResponse, Box<dyn Error>>
pub async fn search_all( &self, query: Option<&SearchAllQuery>, ) -> Result<SearchAllResponse, Box<dyn Error>>
Source§impl Client
impl Client
pub async fn search_tracks( &self, query: Option<&TracksQuery>, ) -> Result<Tracks, Box<dyn Error>>
pub async fn get_track_by_id(&self, id: &str) -> Result<Track, Box<dyn Error>>
pub async fn get_track_by_urn(&self, urn: &str) -> Result<Track, Box<dyn Error>>
pub async fn download_track( &self, track: &Track, stream_type: Option<&StreamType>, destination: Option<&str>, filename: Option<&str>, ) -> Result<(), Box<dyn Error>>
pub async fn get_track_waveform( &self, track: &Track, ) -> Result<Waveform, Box<dyn Error>>
pub async fn get_stream_url( &self, track: &Track, stream_type: Option<&StreamType>, ) -> Result<String, Box<dyn Error>>
Source§impl Client
impl Client
pub async fn search_users( &self, query: Option<&UsersQuery>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_user_by_id(&self, id: &str) -> Result<User, Box<dyn Error>>
pub async fn get_user_by_urn(&self, urn: &str) -> Result<User, Box<dyn Error>>
pub async fn get_user_followers_by_id( &self, id: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_user_followers_by_urn( &self, urn: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_user_followings_by_id( &self, id: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_user_followings_by_urn( &self, urn: &str, pagination: Option<&Paging>, ) -> Result<Users, Box<dyn Error>>
pub async fn get_user_playlists_by_id( &self, id: &str, pagination: Option<&Paging>, ) -> Result<Playlists, Box<dyn Error>>
pub async fn get_user_playlists_by_urn( &self, urn: &str, pagination: Option<&Paging>, ) -> Result<Playlists, Box<dyn Error>>
pub async fn get_user_tracks_by_id( &self, id: &str, pagination: Option<&Paging>, ) -> Result<Tracks, Box<dyn Error>>
pub async fn get_user_tracks_by_urn( &self, urn: &str, pagination: Option<&Paging>, ) -> Result<Tracks, Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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
Mutably borrows from an owned value. Read more