Pantry Client in Rust
This is a Rust client for interacting with the Pantry API.
Installation
or add the following to your Cargo.toml
file:
= "0.1.0"
Usage
Create a new client by bringing in the package in scope
let client = new_client;
Get Pantry
To get a pantry, use the GetPantry method.
let res = client.get_pantry.await?;
println!;
Update Pantry Details
To update pantry details, use the UpdatePantryDetails method.
let req = UpdatePantryRequest ;
let res = p.update_pantry_details.await.unwrap;
println!;
Upset Basket
To update basket, use the UpdateBasket method.
let data = json!;
let res = p.upsert_basket.await?;
println!;
Get Basket Contents
To get contents of the basket, use the GetContents method.
let res = p.get_basket_content.await?;
println!;
Delete Basket
To delete a basket, use the DeleteBasket method.
let del = p.delete_basket.await?;
println!;
Update Basket Contents
To update basket contents, use the UpdateBasketContents method.
let update = json!;
let res = p.update_basket_content.await?;
println!;