PHP code example of steein / steein-sdk
1. Go to this page and download the library: Download steein/steein-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/ */
steein / steein-sdk example snippets
define('STEEIN_CONFIG_PATH', __DIR__);
$steein = new Steein();
$steein = new Steein([
'client_id' => '{id}',
'client_secret' => '{secret_key}',
'default_api_version' => 'v2.0'
]);
$steein->setDefaultAccessToken('{access_token}');
$get = $steein->get('/users/show'); //$steein->get('/users/show',['id' => 1]);
$user = $get->getUserModel(); //$get->getDecodedBody()
echo 'ID: '. $user->getId(); //or $user->all();