11 releases
Uses old Rust 2015
0.1.5 | Aug 12, 2016 |
---|---|
0.1.4 | Jun 23, 2016 |
0.1.3 | Oct 24, 2015 |
0.0.6 | Mar 25, 2015 |
0.0.2 | Nov 24, 2014 |
#4 in #sparkfun
30 downloads per month
16KB
295 lines
phant-rust
A library in rust for manipulating data on a Phant server. Check out the generated documentation for detailed information. A more thorough example is provided at examples/main.rs
.
Depends on:
To use with cargo:
In your project's Cargo.toml, include:
[dependencies]
phant = "*"
To use the library, include the crate with extern crate phant;
and then use it:
let mut phant = phant::Phant::new("http://data.sparkfun.com", "your_public_key", "your_private_key", Some("your_delete_key"));
// COLUMN NAME DATA VALUE
phant.add("computer_name", "my-computer");
phant.add("external_ip", "123.321.111.222");
phant.add("internal_ip", "192.168.1.104");
phant.push().ok().expect("Pushing to server did not succeed");
As you can see, the delete key is optional, but if you attempt delete_stream()
, an error will be thrown.
Dependencies
~6MB
~142K SLoC