pub struct FyydClient { /* private fields */ }Expand description
Client for interacting with the fyyd API.
Implementations§
Source§impl FyydClient
impl FyydClient
Sourcepub fn new(client_builder: Option<ClientBuilder>) -> Self
pub fn new(client_builder: Option<ClientBuilder>) -> Self
Creates a new instance of the FyydClient.
Arguments:
client_builder- OptionalClientBuilderto customize the underlying HTTP client.
Returns:
A new instance of FyydClient.
§Example
use fyyd_api::v2::fyyd_api::FyydClient;
use reqwest::ClientBuilder;
let client_builder = ClientBuilder::new().timeout(std::time::Duration::from_secs(10));
let client = FyydClient::new(Some(client_builder));Sourcepub async fn search_podcast_feed(
&self,
title: Option<String>,
url: Option<String>,
term: Option<String>,
page: Option<u16>,
) -> Result<FyydResponse<Vec<FyydPodcast>>, Box<dyn Error>>
pub async fn search_podcast_feed( &self, title: Option<String>, url: Option<String>, term: Option<String>, page: Option<u16>, ) -> Result<FyydResponse<Vec<FyydPodcast>>, Box<dyn Error>>
Search for a podcast feed inside fyyd’s database, matches any - or some set of a given critetia.
Arguments:
-
title- the podcast’s title -
url- the podcast’s url -
term- a search term inside the podcast -
page- the page of the search, WARNING: if the page is overshot it will still return valid pages
Sourcepub async fn get_episodes_from_id(
&self,
id: u64,
slug: Option<String>,
count: Option<u16>,
page: Option<u16>,
_episodes: bool,
) -> Result<FyydResponse<FyydPodcast>, Box<dyn Error>>
pub async fn get_episodes_from_id( &self, id: u64, slug: Option<String>, count: Option<u16>, page: Option<u16>, _episodes: bool, ) -> Result<FyydResponse<FyydPodcast>, Box<dyn Error>>
Retrieves information about a podcast
Retrieve episodes by appending /episodes
Arguments:
-
id- the podcast’s id from feeds database -
slug- the podcast’s slug -
count- the page size (default: 50) -
page- the page of the search, WARNING: if the page is overshot it will still return valid pages -
episodes- bool - whether to query episodes information