[][src]Module algorithmia::algo

API client for calling Algorithmia algorithms

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<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)?.decode()?;
println!("Completed with result: {:?}", result);

Structs

AlgoMetadata

Metadata returned from the API

AlgoOptions

Options used to alter the algorithm call, e.g. configuring the timeout

AlgoResponse

Successful API response that wraps the AlgoIo and its Metadata

AlgoUri

URI of an Algorithmia algorithm

Algorithm

Algorithmia algorithm - intialized from the Algorithmia builder

Enums

AlgoIo

Types that store either input or ouput to an algorithm