Struct podcast_api::Client [−][src]
pub struct Client<'a> { /* fields omitted */ }
Expand description
Client for accessing Listen Notes API.
Implementations
impl Client<'_>
[src]
impl Client<'_>
[src]pub fn new(id: Option<&str>) -> 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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[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]
fn in_current_span(self) -> Instrumented<Self>
[src]