seba / pantry
SDK for getpantry.cloud
Fund package maintenance!
SebaOfficial
Buy Me A Coffee
racca.me/donate
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.62
README
Easy to use library for interacting with the pantrycloud API.
🛠 Instalation
You can install the package via composer:
composer require seba/pantry
❔ Usage
$pantry = new new \Pantry\Client("YOUR_PANTRY_ID");
Create a Basket
$basket = $pantry->createBasket("ILoveThisBasket", [ "key" => "value" ]);
Get a Basket
There are several ways to get a basket
$basket = $pantry->getBasket("ILoveThisBasket"); // Get the basket instance echo $basket; // The basket data as a json string var_dump($basket); // The basket data as an object $basketData = $basket(); // The basket data as an object $basketData = $basket->get(); // The basket data as an object
Update a Basket
$basket->update([ "newKey" => "newValue" ]);
Delete a Basket
$basket->delete();
Get Pantry information
There are several ways to get information about the pantry
echo $pantry; // The pantry data as a json string var_dump($pantry); // The pantry data as an object $pantryData = $pantry(); // The pantry data as an object $pantryData = $pantry->getData(); // The pantry data as an object
⚖️ License
This project is under the MIT License.