<commit_before>orc-rs
======

The beginnings of a Rust client for Orchestrate.io<commit_msg>add readme with examples<commit_after>orc-rs
======

A Rust client for Orchestrate.io

**HTTP clients for Rust are in active development and this could break at any
time.**

Examples:

```rust
extern crate orchestrate;
extern crate serialize;

use orchestrate::{Client, KeyValue};
use serialize::json;

fn main() {

  let mut client = Client::new("Your API Key");

  // define a user schema
  #[deriving(Encodable, Decobale, Show)]
  struct User {
    name: String,
    email: String,
    username: Option<String>,
    age: int
  }

  // create a user object
  let mut user = User {
    name: "Chad".to_string(),
    email: "<EMAIL>".to_string(),
    username: None,
    age: 25
  };

  // create a user, returns a path object with the generated key
  match client.post("users", &user) {
    Ok(result) => println!("{}", result.key),
    Err(err) => println!("{}", err.message)
  };

  // retrieve a user
  let result = client.get::<User>("users", "key").unwrap();
  println!("{}", result.value.age);
  println!("{}", result.path.key);

  // update a user
  user.username = Some("chadtmiller".to_string());
  match client.put("users", &user) {
    Ok(result) => println!("{}", result.ref_),
    Err(err) => println!("{}", err.message)
  }
}
```

{'fraction_non_alphanumeric': 0.17277486910994763, 'fraction_numerical': 0.0014958863126402393, 'mean_word_length': 3.6458333333333335, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4566790', 'n_tokens_mistral': 456, 'n_tokens_neox': 442, 'n_words': 131}