opennode-client 0.1.0

Client for the Opennode v1 HTTP API
Documentation

opennode-client

MIT licensed opennode on crates.io opennode on docs.rs tippin.me

Rust Client for the Opennode v1 HTTP API. This library rely on rust Futures to allow asynchronous usage.

Opennode API documentation

Usage

Put this in your Cargo.toml:

[dependencies]
opennode = "1.0.0"
opennode-client = "0.1.0"

And this in your crate root:

extern crate opennode;
extern crate opennode_client;

Test

cargo test

Examples

Run file from examples with:

cargo run --example <example> -- <example flags> <example args>

Getting Started

To get started, create a client:

let client = opennode_client::client::Client::new("OPENNODE-TOKEN");

Let's create a new charge using an actor system like actix_rt:

use opennode::charge;
use opennode_client::create_charge;

// opennode_client::create_charge signature:
// (client: &Client, payload: Payload) -> impl Future<Item=Charge, Error=Error>

let charge: charge::Charge = System::new("test").block_on(lazy(|| {
    create_charge(&client, charge::Payload::new(1000))
})).unwrap();