Struct SpClient

Source
pub struct SpClient(/* private fields */);

Implementations§

Source§

impl SpClient

Source

pub fn set_strategy(&self, strategy: RequestStrategy)

Source

pub async fn flush_accesspoint(&self)

Source

pub async fn get_accesspoint(&self) -> Result<SocketAddress, Error>

Source

pub async fn base_url(&self) -> Result<String, Error>

Source

pub async fn client_token(&self) -> Result<String, Error>

Source

pub async fn request_with_protobuf<M: Message + MessageFull>( &self, method: &Method, endpoint: &str, headers: Option<HeaderMap>, message: &M, ) -> SpClientResult

Source

pub async fn request_as_json( &self, method: &Method, endpoint: &str, headers: Option<HeaderMap>, body: Option<&str>, ) -> SpClientResult

Source

pub async fn request( &self, method: &Method, endpoint: &str, headers: Option<HeaderMap>, body: Option<&str>, ) -> SpClientResult

Source

pub async fn put_connect_state( &self, connection_id: &str, state: &PutStateRequest, ) -> SpClientResult

Source

pub async fn get_metadata(&self, scope: &str, id: &SpotifyId) -> SpClientResult

Source

pub async fn get_track_metadata(&self, track_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_episode_metadata( &self, episode_id: &SpotifyId, ) -> SpClientResult

Source

pub async fn get_album_metadata(&self, album_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_artist_metadata(&self, artist_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_show_metadata(&self, show_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_lyrics(&self, track_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_lyrics_for_image( &self, track_id: &SpotifyId, image_id: &FileId, ) -> SpClientResult

Source

pub async fn get_playlist(&self, playlist_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_user_profile( &self, username: &str, playlist_limit: Option<u32>, artist_limit: Option<u32>, ) -> SpClientResult

Source

pub async fn get_user_followers(&self, username: &str) -> SpClientResult

Source

pub async fn get_user_following(&self, username: &str) -> SpClientResult

Source

pub async fn get_radio_for_track(&self, track_id: &SpotifyId) -> SpClientResult

Source

pub async fn get_apollo_station( &self, scope: &str, context_uri: &str, count: Option<usize>, previous_tracks: Vec<SpotifyId>, autoplay: bool, ) -> SpClientResult

Source

pub async fn get_next_page(&self, next_page_uri: &str) -> SpClientResult

Source

pub async fn get_canvases(&self, request: EntityCanvazRequest) -> SpClientResult

Source

pub async fn get_extended_metadata( &self, request: BatchedEntityRequest, ) -> SpClientResult

Source

pub async fn get_audio_storage(&self, file_id: &FileId) -> SpClientResult

Source

pub fn stream_from_cdn( &self, cdn_url: &CdnUrl, offset: usize, length: usize, ) -> Result<IntoStream<ResponseFuture>, Error>

Source

pub async fn request_url(&self, url: &str) -> SpClientResult

Source

pub async fn get_audio_preview(&self, preview_id: &FileId) -> SpClientResult

Source

pub async fn get_head_file(&self, file_id: &FileId) -> SpClientResult

Source

pub async fn get_image(&self, image_id: &FileId) -> SpClientResult

Trait Implementations§

Source§

impl Clone for SpClient

Source§

fn clone(&self) -> SpClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,