Expand description
An asynchronous client for NASA “Astronomy Picture of the Day” API.
The client is based on reqwest and
tokio, and requires the tokio reactor to be setup
(which is usually done by annotating your main function with [tokio::main]
)
§Example
use apod_async_client::{APODClient, APODClientError, Date};
use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), APODClientError> {
let client = APODClient::new("DEMO_KEY");
let (metadata, rate_limit) = client.get_picture(&Date::Today, true).await?;
Ok(())
}
Structs§
- APOD
Client - An asynchronous client for NASA “Astronomy Picture Of the Day” service
- APOD
Metadata - Metadata for a NASA “Astronomy Picture Of the Day”
- Rate
Limit Info - Holds info about API rate limit
Enums§
- APOD
Client Error - Client errors
- Date
- A simple date representation