Crate algorithmia [−] [src]
Algorithmia client library
Examples
use algorithmia::Algorithmia; // 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<f64> // since this algorithm outputs results as a JSON array of numbers 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);
Modules
| algo |
Interact with Algorithmia algorithms |
| data |
Manage data for algorithms |
| error |
Error types |
| prelude |
Reexports of the most common types and traits |
Macros
| algo_entrypoint |
Macro for implementing |
Structs
| Algorithmia |
The top-level struct for instantiating Algorithmia client endpoints |
| Body |
Body type for a request. |
| Url |
A parsed URL record. |
Enums
| ApiAuth |
Represent the different ways to auth with the API |
Traits
| IntoUrl |
A helper trait to convert common objects into a Url. |