1. Go to this page and download the library: Download newtonproject/hep-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/ */
newtonproject / hep-sdk example snippets
Instance = new HepRestApi\Api\RestApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$api_version = "api_version_example"; // string |
$dapp_id = "dapp_id_example"; // string |
$dapp_key = "dapp_key_example"; // string | The decentralized application access key
$protocol = "protocol_example"; // string | The protocol name. default is 'HEP'.
$version = "version_example"; // string | The protocol version such as '1.0'
$ts = 56; // int | The current timestamp
$nonce = "nonce_example"; // string | The random string or auto-increment sequence
$os = "os_example"; // string | The operating system of client such as ios, android, dweb,etc.
$language = "language_example"; // string | The i18n language code such as zh, en, etc.
$dapp_signature_method = "dapp_signature_method_example"; // string | The signature method used by dapp.
$dapp_signature = "dapp_signature_example"; // string | The signature generated by dapp.
try {
$result = $apiInstance->restDappsRead($api_version, $dapp_id, $dapp_key, $protocol, $version, $ts, $nonce, $os, $language, $dapp_signature_method, $dapp_signature);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RestApi->restDappsRead: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.