PHP code example of torchlighttechnology / ttg-sdk
1. Go to this page and download the library: Download torchlighttechnology/ttg-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/ */
torchlighttechnology / ttg-sdk example snippets
use torchlighttechnology\TtgSDK;
$api = new TtgSDK(
'URL', //
'foo' => 'bar'
];
// your API method must be a dashed route
// calling it here needs to be camelcased
$response = $api->yourExposedApiMethod( // translates to your-exposed-api-method
json_encode($args), // JSON encoded array
'POST' // request type of GET, POST, PUT, DELETE
);