Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 719 Bytes

index.md

File metadata and controls

42 lines (31 loc) · 719 Bytes

Installation

Requirements

  • Rust 1.51.0 or higher
  • Cargo 1.51.0 or higher

Installation

Using CLI

cargo add lemonsqueezy

Using Cargo.toml

[dependencies]
lemonsqueezy = "0.1.0"

Usage

use lemonsqueezy::user::User;

#[tokio::main]
async fn main() {
    dotenv::dotenv().ok();

    // Create a new instance of LemonSqueezy with your API key
    let lemonsqueezy = lemonsqueezy::LemonSqueezy::new(std::env::var("API_KEY").unwrap());

    // Build a new instance of `User`
    let user = User::build(lemonsqueezy);
    
    // Retrieve the user
    let user = user.retrieve().await.unwrap();

    println!("{:#?}", user);
}

Quick Links