Struct podcast_api::Client[][src]

pub struct Client<'a> { /* fields omitted */ }
Expand description

Client for accessing Listen Notes API.

Implementations

impl Client<'_>[src]

pub fn new(id: Option<&str>) -> Client<'_>[src]

Creates new Listen API Client.

Uses default HTTP client with 30 second timeouts.

To access production API:

let client = podcast_api::Client::new(Some("YOUR-API-KEY"));

To access mock API:

let client = podcast_api::Client::new(None);

pub fn new_custom<'a>(
    client: Client,
    id: Option<&'a str>,
    user_agent: Option<&'a str>
) -> Client<'a>
[src]

Creates new Listen API Client with user provided HTTP Client.

pub async fn search(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /search with supplied parameters.

pub async fn typeahead(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /typeahead with supplied parameters.

pub async fn fetch_best_podcasts(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /best_podcasts with supplied parameters.

pub async fn fetch_podcast_by_id(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /podcasts/{id} with supplied parameters.

pub async fn batch_fetch_podcasts(&self, parameters: &Value) -> Result<Response>[src]

Calls POST /podcasts with supplied parameters.

pub async fn fetch_episode_by_id(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /episodes/{id} with supplied parameters.

pub async fn batch_fetch_episodes(&self, parameters: &Value) -> Result<Response>[src]

Calls POST /episodes with supplied parameters.

pub async fn fetch_curated_podcasts_list_by_id(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /curated_podcasts/{id} with supplied parameters.

pub async fn fetch_curated_podcasts_lists(
    &self,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /curated_podcasts with supplied parameters.

pub async fn fetch_podcast_genres(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /genres with supplied parameters.

pub async fn fetch_podcast_regions(
    &self,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /regions with supplied parameters.

pub async fn fetch_podcast_languages(
    &self,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /languages with supplied parameters.

pub async fn just_listen(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /just_listen with supplied parameters.

pub async fn fetch_recommendations_for_podcast(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /podcasts/{id}/recommendations with supplied parameters.

pub async fn fetch_recommendations_for_episode(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /episodes/{id}/recommendations with supplied parameters.

pub async fn fetch_playlist_by_id(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls GET /playlists/{id} with supplied parameters.

pub async fn fetch_my_playlists(&self, parameters: &Value) -> Result<Response>[src]

Calls GET /playlists with supplied parameters.

pub async fn submit_podcast(&self, parameters: &Value) -> Result<Response>[src]

Calls POST /podcasts/submit with supplied parameters.

pub async fn delete_podcast(
    &self,
    id: &str,
    parameters: &Value
) -> Result<Response>
[src]

Calls DELETE /podcasts/{id} with supplied parameters.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Client<'a>

impl<'a> Send for Client<'a>

impl<'a> Sync for Client<'a>

impl<'a> Unpin for Client<'a>

impl<'a> !UnwindSafe for Client<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

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

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.