Crate cscart_rs

source ·
Expand description

§About

Cscart-rs is an sdk for making api request using the cscart rest api

This library is a work in process and so not all entities are supported for the v1 release

§Example

use cscart_rs::Client;
use serde_json::Value;
use std::error::Error;
use anyhow;

async fn get_categories() -> anyhow::Result<Value> {
    let client = Client::new()
        .host("http://my-ecommerce-site.com")
        .username("my-user-email@email.com")
        .api_key("user-api-key");

    let categories = client
        .category()
        .get_all().await;

    categories
}

Structs§

  • Configure an api client to perform requests