Skip to content

Easy to use library for interacting with the getpantry.cloud API

License

Notifications You must be signed in to change notification settings

SebaOfficial/pantry-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍊 Pantry-Cloud

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.

About

Easy to use library for interacting with the getpantry.cloud API

Topics

Resources

License

Stars

Watchers

Forks

Languages