pantry 1.0.0 copy "pantry: ^1.0.0" to clipboard
pantry: ^1.0.0 copied to clipboard

Simplify your interaction with the Pantry storage API with this simple wrapper.

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);
2
likes
160
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

Simplify your interaction with the Pantry storage API with this simple wrapper.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

http

More

Packages that depend on pantry