PHP code example of biologis / hv-client-lib

1. Go to this page and download the library: Download biologis/hv-client-lib 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/ */

    

biologis / hv-client-lib example snippets


$hv = new HVClient($yourAppId, $_SESSION);
$hv->connect($yourCertThumbPrint, $yourPrivateKey);

$personInfo = $hv->getPersonInfo();
$recordId = $personInfo->selected_record_id;

$things = $hv->getThings('Weight Measurement', $recordId);
foreach ($things as $thing) {
  print $thing->weight->value->kg;
}

$hv = new HVClient($yourAppId, $_SESSION);

$hv->setHealthVaultPlatform(
  'https://platform.healthvault-ppe.co.uk/platform/wildcat.ashx');
$hv->setLanguage('de');
$hv->setCountry('DE');

$hv->connect($yourCertThumbPrint, $yourPrivateKey);

$hv = new HVClient($yourAppId, $_SESSION);

try {
  $hv->connect($yourCertThumbPrint, $yourPrivateKey);
  $personInfo = $hv->getPersonInfo();
}
catch (HVRawConnectorUserNotAuthenticatedException $e) {
 print '<a href="' .
   $hv->getAuthenticationURL($yourReturnURL) .
   ">Authenticate</a>';
}
json
{
  "repositories": [
    {
      "type": "pear",
      "url": "http://pear.php.net"
    }
  ]
}