Skip to content

Simplify interactions with the Pantry storage API with this simple wrapper.

License

Notifications You must be signed in to change notification settings

georges-ph/pantry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use this helper package to interact with the Pantry JSON storage API

Getting started

Get your pantry ID from here

Usage

Initialize your Pantry object with the ID from above:

final pantry = Pantry("xxxx-xxxx-xxxx-xxxx-xxxx-xxxx");

Create a Basket

final newBasketResult = await pantry.newBasket("My Basket", {
    "derp": "flerp123",
    "testPayload": true,
    "keysLength": 3,
});
print(newBasketResult);

Retrieve Basket Contents

final basketContent = await pantry.getBasket("My Basket");
print("Basket Content: $basketContent");

Update Basket Contents

final updatedBasketContent = await pantry.updateBasket("My Basket", {"new_key": "new_value"});
print("Updated Basket Content: $updatedBasketContent");

Delete a Basket

final deleteBasketResult = await pantry.deleteBasket("My Basket");
print(deleteBasketResult);

About

Simplify interactions with the Pantry storage API with this simple wrapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages