1. Go to this page and download the library: Download stackla/stackla-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stackla / stackla-php-sdk example snippets
#!php
// Stackla stack name
$stack = "foo";
// Stackla Credentials details
$host = "https://api.stackla.com/api/";
$accessToken = "1234567890"; // OAuth2 access_token
$credentials = new \Stackla\Core\Credentials($host, $accessToken, $stack);
// Stackla API configs
$stack = new \Stackla\Api\Stack($credentials, $host, $stack);
#!php
// Stackla stack name
$stack = "foo";
// Stackla Credentials details
$host = "https://api.stackla.com/api/";
$apiKey = "1234567890"; // Stackla api key
$credentials = new \Stackla\Core\Credentials($host, $apiKey, $stack, \Stackla\Core\Credentials::TYPE_APIKEY);
// Stackla API configs
$stack = new \Stackla\Api\Stack($credentials, $host, $stack);
array
$id
#!php
// Create new instance of term
$term = $stack->instance('term');
// get 25 terms from RESTful API
$term->get();
// Work with each term
foreach ($term as $iterm) {
echo $iterm->id . " - " . $iterm->name . " - " . " - " . $iterm->network;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.