#api #json-api #tokio #async #sell

sellapp

Simple asynchronous wrapper for the Sell.App API

1 unstable release

0.1.0 Aug 26, 2024

#1951 in Web programming

Apache-2.0

31KB
441 lines

Sell.App API Wrapper for Rust

Simple asynchronous wrapper for the Sell.App API, using the reqwest crate under the hood.

Example Usage

use sellapp;
use serde_json::{self, Value};
use tokio;

#[tokio::main]
async fn main() {
    let api = sellapp::init("your_api_key", "");

    let res = api.invoices_list_all("?limit=25").await.unwrap();

    let text = res.text().await;
    let data: Value = serde_json::from_str(&text.unwrap()).unwrap();
    println!("The ID of the 4th invoice is: {}", data["data"][3]["id"]);
}

Dependencies

~4–14MB
~182K SLoC