pub struct Client<'a> { /* private fields */ }Expand description
Client for accessing Listen Notes API. Each instance owns its HTTP configuration.
Implementations§
Source§impl Client<'_>
impl Client<'_>
Sourcepub async fn search(&self, parameters: &Value) -> Result<Response>
pub async fn search(&self, parameters: &Value) -> Result<Response>
Full-text search See full API documentation.
Sourcepub async fn typeahead(&self, parameters: &Value) -> Result<Response>
pub async fn typeahead(&self, parameters: &Value) -> Result<Response>
Typeahead search See full API documentation.
Sourcepub async fn search_episode_titles(
&self,
parameters: &Value,
) -> Result<Response>
pub async fn search_episode_titles( &self, parameters: &Value, ) -> Result<Response>
Find individual episodes by searching for their titles See full API documentation.
Sourcepub async fn spellcheck(&self, parameters: &Value) -> Result<Response>
pub async fn spellcheck(&self, parameters: &Value) -> Result<Response>
Spell check on a search term See full API documentation.
Fetch related search terms See full API documentation.
Sourcepub async fn fetch_trending_searches(
&self,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_trending_searches( &self, parameters: &Value, ) -> Result<Response>
Fetch trending search terms See full API documentation.
Sourcepub async fn fetch_best_podcasts(&self, parameters: &Value) -> Result<Response>
pub async fn fetch_best_podcasts(&self, parameters: &Value) -> Result<Response>
Fetch a list of best podcasts by genre See full API documentation.
Sourcepub async fn fetch_podcast_by_id(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_podcast_by_id( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch detailed meta data and episodes for a podcast by id See full API documentation.
Sourcepub async fn delete_podcast(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn delete_podcast( &self, id: &str, parameters: &Value, ) -> Result<Response>
Request to delete a podcast See full API documentation.
Sourcepub async fn fetch_episode_by_id(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_episode_by_id( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch detailed meta data for an episode by id See full API documentation.
Sourcepub async fn batch_fetch_episodes(&self, parameters: &Value) -> Result<Response>
pub async fn batch_fetch_episodes(&self, parameters: &Value) -> Result<Response>
Batch fetch basic meta data for episodes See full API documentation.
Sourcepub async fn batch_fetch_podcasts(&self, parameters: &Value) -> Result<Response>
pub async fn batch_fetch_podcasts(&self, parameters: &Value) -> Result<Response>
Batch fetch basic meta data for podcasts See full API documentation.
Sourcepub async fn fetch_curated_podcasts_list_by_id(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_curated_podcasts_list_by_id( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch a curated list of podcasts by id See full API documentation.
Sourcepub async fn fetch_podcast_genres(&self, parameters: &Value) -> Result<Response>
pub async fn fetch_podcast_genres(&self, parameters: &Value) -> Result<Response>
Fetch a list of podcast genres See full API documentation.
Sourcepub async fn fetch_podcast_regions(
&self,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_podcast_regions( &self, parameters: &Value, ) -> Result<Response>
Fetch a list of supported countries/regions for best podcasts See full API documentation.
Sourcepub async fn fetch_podcast_languages(
&self,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_podcast_languages( &self, parameters: &Value, ) -> Result<Response>
Fetch a list of supported languages for podcasts See full API documentation.
Sourcepub async fn just_listen(&self, parameters: &Value) -> Result<Response>
pub async fn just_listen(&self, parameters: &Value) -> Result<Response>
Fetch a random podcast episode See full API documentation.
Sourcepub async fn fetch_curated_podcasts_lists(
&self,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_curated_podcasts_lists( &self, parameters: &Value, ) -> Result<Response>
Fetch curated lists of podcasts See full API documentation.
Sourcepub async fn fetch_recommendations_for_podcast(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_recommendations_for_podcast( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch recommendations for a podcast See full API documentation.
Sourcepub async fn fetch_recommendations_for_episode(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_recommendations_for_episode( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch recommendations for an episode See full API documentation.
Sourcepub async fn submit_podcast(&self, parameters: &Value) -> Result<Response>
pub async fn submit_podcast(&self, parameters: &Value) -> Result<Response>
Submit a podcast to Listen Notes database See full API documentation.
Sourcepub async fn fetch_playlist_by_id(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_playlist_by_id( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch a playlist’s info and items (i.e., episodes or podcasts). See full API documentation.
Sourcepub async fn fetch_my_playlists(&self, parameters: &Value) -> Result<Response>
pub async fn fetch_my_playlists(&self, parameters: &Value) -> Result<Response>
Fetch a list of your playlists. See full API documentation.
Sourcepub async fn fetch_audience_for_podcast(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_audience_for_podcast( &self, id: &str, parameters: &Value, ) -> Result<Response>
Fetch audience demographics for a podcast See full API documentation.
Sourcepub async fn fetch_podcasts_by_domain(
&self,
domain_name: &str,
parameters: &Value,
) -> Result<Response>
pub async fn fetch_podcasts_by_domain( &self, domain_name: &str, parameters: &Value, ) -> Result<Response>
Fetch podcasts by a publisher’s domain name See full API documentation.
Sourcepub async fn create_playlist(&self, parameters: &Value) -> Result<Response>
pub async fn create_playlist(&self, parameters: &Value) -> Result<Response>
Create a playlist. See full API documentation.
Sourcepub async fn update_playlist(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn update_playlist( &self, id: &str, parameters: &Value, ) -> Result<Response>
Update playlist metadata. See full API documentation.
Sourcepub async fn delete_playlist(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn delete_playlist( &self, id: &str, parameters: &Value, ) -> Result<Response>
Delete a playlist. See full API documentation.
Sourcepub async fn add_playlist_item(
&self,
id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn add_playlist_item( &self, id: &str, parameters: &Value, ) -> Result<Response>
Add an episode or podcast to a playlist. See full API documentation.
Sourcepub async fn delete_playlist_item(
&self,
id: &str,
item_id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn delete_playlist_item( &self, id: &str, item_id: &str, parameters: &Value, ) -> Result<Response>
Remove an item from a playlist. See full API documentation.
Sourcepub async fn update_playlist_item_notes(
&self,
id: &str,
item_id: &str,
parameters: &Value,
) -> Result<Response>
pub async fn update_playlist_item_notes( &self, id: &str, item_id: &str, parameters: &Value, ) -> Result<Response>
Update notes for a playlist item. See full API documentation.
Source§impl<'a> Client<'a>
impl<'a> Client<'a>
Sourcepub fn new(api_key: Option<&'a str>) -> Self
pub fn new(api_key: Option<&'a str>) -> Self
Create a production client with an API key, or a public mock client with None.
Uses a 30-second total timeout and a 10-second connection timeout.
Sourcepub fn http_client_builder() -> ClientBuilder
pub fn http_client_builder() -> ClientBuilder
Start with the SDK’s timeout, no-redirect, and no-retry defaults.
Use this builder with Self::new_custom to customize proxies or timeouts.
Sourcepub fn new_custom(
client: Client,
api_key: Option<&'a str>,
user_agent: Option<&'a str>,
) -> Self
pub fn new_custom( client: Client, api_key: Option<&'a str>, user_agent: Option<&'a str>, ) -> Self
Create a client with a supplied HTTP client and optional User-Agent. The caller controls that HTTP client’s timeout, proxy, redirect, and retry policies.
Sourcepub fn with_base_url(self, base_url: &str) -> Result<Self>
pub fn with_base_url(self, base_url: &str) -> Result<Self>
Override the API base URL, for example for a local test server. Requests send this client’s credentials to the supplied server.