Expand description

API bindings for NASA’s Open APIs

Features light bindings for a multitude of APIs. Including:

  • APOD
  • DONKI
  • JPL
  • NEO
  • TECH_TRANSFER

Sample program with the GeoMagnetic base client

Create a .env file at the root of your project and add your api key with the variable name API_KEY.

use voyager_client::{donki, time};
use voyager_client::response::*;
 
use serde_json::Value as JsonValue;

// Instantiate a base client
let base = donki::GeoMagnetic::new();
 
// Setup time
let start = String::from("2015-01-01");
let end = time::today();
// Query the endpoint
let res: Response = base.query(start, end).unwrap();
 
// Manipulating the response
let json: JsonValue = res.json().unwrap();
let bytes_vec: Vec<u8> = res.bytedump().unwrap();

Base clients query methods return a Response object.

Re-exports

pub use pretty::*;

Modules

For interacting with NASA’s Picture of the Day endpoint.

Contains methods for interacting with the DONKI client library.

For interacting with the Insight Rover API.

Jet Propulsion Laboratory

Handling API keys for NASA’s open APIs from .env files. All keys must be stored in a .env file in the root directory of your project with the key “API_KEY”.

For interacting with the Near Earth Objects API.

Contains methods for prettyfying JSON responses.

Methods for manipulating responses. Get serde_json dumps or byte vectors from responses.

For interacting with the Tech Transfer API. Defaults to the patent collection but can also be switched to patent protected, software, or spinoff via the .switch() method.

For handling different request times. Known overflow errors at the moment, so use with caution. Use manual dates if possible.