PHP code example of hscore / hsapi

1. Go to this page and download the library: Download hscore/hsapi 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/ */

    

hscore / hsapi example snippets


use hscore\RequestGenerator;

$request->authenticate('api_username', 'api_password', 'api_key');

$request->setOutputFormat('json'); // or 'xml', default is 'json'

$request = new RequestGenerator('products');
$request->authenticate('api_username', 'api_password', 'api_key');

$response = $request->send();

echo $response;