[][src]Crate apod_async_client

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

APODClient

An asynchronous client for NASA "Astronomy Picture Of the Day" service

APODMetadata

Metadata for a NASA "Astronomy Picture Of the Day"

RateLimitInfo

Holds info about API rate limit

Enums

APODClientError

Client errors

Date

A simple date representation