Struct algorithmia::Algorithmia [] [src]

pub struct Algorithmia { /* fields omitted */ }

The top-level struct for instantiating Algorithmia client endpoints

Methods

impl<'a, 'c> Algorithmia
[src]

Instantiate a new client

Client should be instatiated with your API key, except when running within an algorithm on the Algorithmia platform.

Examples

use algorithmia::*;
// Initialize a client
let client = Algorithmia::client("simUseYourApiKey");

// Initialize a client (for algorithms running on the Algorithmia platform)
let client = Algorithmia::client(ApiAuth::None);

Instantiate a new client against alternate API servers

Instantiate an Algorithm from this client

By using In

Examples

use algorithmia::Algorithmia;
let client = Algorithmia::client("111112222233333444445555566");
let factor = client.algo("anowell/Dijkstra/0.1");

Instantiate a DataDirectory from this client

Examples

use algorithmia::Algorithmia;
let client = Algorithmia::client("111112222233333444445555566");
let rustfoo = client.dir("data://.my/rustfoo");

Instantiate a DataDirectory from this client

Examples

use algorithmia::Algorithmia;
let client = Algorithmia::client("111112222233333444445555566");
let rustfoo = client.file("data://.my/rustfoo");

Instantiate a DataPath from this client

Use this if you don't explicitly know if a Data URI is to a directory or file

Examples

use algorithmia::Algorithmia;
let client = Algorithmia::client("111112222233333444445555566");
let rustfoo = client.data("data://.my/rustfoo/what_am_i");

Trait Implementations

impl Clone for Algorithmia
[src]

Allow cloning in order to reuse http client (and API key) for multiple connections

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Algorithmia
[src]

The default Algorithmia client uses environment variables ALGORITHMIA_API to override the default base URL of the API and ALGORITHMIA_API_KEY to optionally the API key.

Returns the "default value" for a type. Read more