Crate algorithmia [−] [src]
Algorithmia client library
Examples
use algorithmia::Algorithmia; use algorithmia::algo::{Algorithm, Version}; // Initialize with an API key let client = Algorithmia::client("111112222233333444445555566"); let moving_avg = client.algo(("timeseries/SimpleMovingAverage", "0.1")); // Run the algorithm using a type safe decoding of the output to Vec<int> // since this algorithm outputs results as a JSON array of integers let input = (vec![0,1,2,3,15,4,5,6,7], 3); let result: Vec<f64> = moving_avg.pipe(&input).unwrap().decode().unwrap(); println!("Completed with result: {:?}", result);
Reexports
pub use client::ApiAuth::{self, SimpleAuth, NoAuth}; |
Modules
algo |
Interact with Algorithmia algorithms |
client |
Internal client |
data |
Manage data for algorithms |
error |
Error types |
mime |
Re-exporting the mime crate, for convenience. |
Structs
Algorithmia |
The top-level struct for instantiating Algorithmia client endpoints |
Url |
A parsed URL record. |