Crates.io | sellapp |
lib.rs | sellapp |
version | 0.1.0 |
source | src |
created_at | 2024-08-26 18:20:52.269243 |
updated_at | 2024-08-26 18:20:52.269243 |
description | Simple asynchronous wrapper for the Sell.App API. |
homepage | |
repository | https://github.com/WhatYouThing/sellapp-rs |
max_upload_size | |
id | 1352492 |
size | 41,378 |
Simple asynchronous wrapper for the Sell.App API, using the reqwest
crate under the hood.
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"]);
}