Expand description
Official library for accessing the Listen API by Listen Notes.
§Quick Start Example
use serde_json::json;
#[tokio::main]
async fn main() {
// Api Key (None => Test API, Some(key) => Production API)
let api_key = None;
// Create client
let client = podcast_api::Client::new(api_key);
// Call API
match client
.typeahead(&json!({
"q": "startup",
"show_podcasts": 1
}))
.await
{
Ok(response) => {
println!("Successfully called \"typeahead\" endpoint.");
println!("Response Body:");
println!("{:?}", response);
}
Err(err) => {
println!("Error calling \"typeahead\" endpoint:");
println!("{:?},", err);
}
};
}Structs§
- ApiError
- The status, headers, and body returned by an unsuccessful API request.
- Client
- Client for accessing Listen Notes API. Each instance owns its HTTP configuration.
- Response
- Response and request context for an API call.
Enums§
- Error
- Errors returned by
crate::Client. HTTP errors retain their response context.