[][src]Struct algorithmia::Algorithmia

pub struct Algorithmia { /* fields omitted */ }

The top-level struct for instantiating Algorithmia client endpoints

Methods

impl Algorithmia[src]

pub fn new() -> Result<Algorithmia>[src]

Instantiate a new client

The 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.

pub fn client<A: Into<String>>(api_key: A) -> Result<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");

pub fn client_with_url<A: Into<String>, U: IntoUrl>(
    api_key: A,
    base_url: U
) -> Result<Algorithmia>
[src]

Instantiate a new client against alternate API servers

pub fn algo<A: Into<AlgoUri>>(&self, algorithm: A) -> Algorithm[src]

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");

pub fn dir(&self, path: &str) -> DataDir[src]

Instantiate a DataDirectory from this client

Examples

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

pub fn file(&self, path: &str) -> DataFile[src]

Instantiate a DataDirectory from this client

Examples

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

pub fn data(&self, path: &str) -> DataObject[src]

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Algorithmia

impl Sync for Algorithmia

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<T> Erased for T