Skip to content

tomheaton/hop-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

🦀 Hop server side SDK for Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published