dev-master
9999999-devOfficial Stackable library for PHP
The Requires
- php >=5.4
The Development Requires
library stackable
Wallogit.com
2017 © Pedro Peláez
Official Stackable library for PHP
This is the Official Stackable API PHP library for getting data from stacks., (*1)
Install using Composer, (*2)
$ composer install get-stackable/stackable-php
Or simple include src/Stackable.php file to your project., (*3)
Make sure to create an account at http://www.stackable.space and setup your Stack and Containers., (*4)
To initialize, (*5)
$stackable = new Stackable('YOUR-STACK-PUBLIC-KEY-HERE');
To list all containers, (*6)
$result = $stackable->getContainers(); print_r($result);
To get single containers, (*7)
$result = $stackable->getContainer('CONTAINER-ID-HERE');
print_r($result);
To get all items within single container, (*8)
$result = $stackable->getContainerItems('CONTAINER-ID-HERE');
print_r($result);
To get all items within stack, (*9)
$result = $stackable->getAllItems(); print_r($result);
To get single item, (*10)
$result = $stackable->getItem('ITEM-ID-HERE');
print_r($result);
To create new item, (*11)
$stackable = new Stackable('YOUR-STACK-PRIVATE-KEY-HERE');
var dataToPost = [
name => 'John Doe',
age => 29
];
$result = $stackable->createItem('CONTAINER-ID-HERE', dataToPost);
print_r($result);
To update an item, (*12)
var dataToPost = [
name => 'John Doe',
age => 29
];
$result = $stackable->updateItem('ITEM-ID-HERE', dataToPost);
print_r($result);
To play with this library: https://beta.tehplayground.com/D85vaCf8xDxKeb8S, (*13)
Official Stackable library for PHP
library stackable