Easy to use library for interacting with the pantrycloud API.
You can install the package via composer:
composer require seba/pantry
$pantry = new new \Pantry\Client("YOUR_PANTRY_ID");
$basket = $pantry->createBasket("ILoveThisBasket", [ "key" => "value" ]);
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
$basket->update([ "newKey" => "newValue" ]);
$basket->delete();
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
This project is under the MIT License.