Crates.io | phant |
lib.rs | phant |
version | 0.1.5 |
source | src |
created_at | 2014-11-24 16:54:22.842485 |
updated_at | 2016-08-12 21:31:42.030133 |
description | A library for manipulating data on a http://phant.io server. |
homepage | https://github.com/freiguy1/phant-rust |
repository | https://github.com/freiguy1/phant-rust |
max_upload_size | |
id | 384 |
size | 19,284 |
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
.
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.