Last updated:
0 purchases
pantry
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");
copied to clipboard
Create a Basket #
final newBasketResult = await pantry.newBasket("My Basket", {
"derp": "flerp123",
"testPayload": true,
"keysLength": 3,
});
print(newBasketResult);
copied to clipboard
Retrieve Basket Contents #
final basketContent = await pantry.getBasket("My Basket");
print("Basket Content: $basketContent");
copied to clipboard
Update Basket Contents #
final updatedBasketContent = await pantry.updateBasket("My Basket", {"new_key": "new_value"});
print("Updated Basket Content: $updatedBasketContent");
copied to clipboard
Delete a Basket #
final deleteBasketResult = await pantry.deleteBasket("My Basket");
print(deleteBasketResult);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.