hop-rs (wip)
Hop's Rust library. Requires Rust 1.61+
Installation
[dependencies]
hop = "0.0.0"
Usage
Create a project token or personal access token.
extern crate hop;
extern crate rand;
use hop::Hop;
use rand::Rng;
#[tokio::main]
async fn main() {
let my_token = "ptk_xxx";
let hop = Hop::new(my_token);
// Example: Creating a project secret
hop.projects.create_secret(
"RANDOM_NUMBER",
rand::thread_rng().gen_range(0..100).to_string(),
).await.unwrap();
}
Examples
To run examples, add a Personal token and a Project token to the .env
file.
cargo run --example <example_name>
Examples can be found here.