Crate podcast_api

Source
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§

Client
Client for accessing Listen Notes API.
Response
Response and request context for API call.

Enums§

Error
Error for API calls from Client.

Type Aliases§

Result
Result for API calls from Client