I have a requirement to output the total number of hours in a given time frame using the Harvest API. I have coded in PHP but it gives an error Call to undefined method HarvestAPI::getUsersActiveTimer() The Input is the Start Date End Date Output Total Hours
This is my code
<?php
require_once( dirname(__FILE__) . '/HarvestAPI.php' );
spl_autoload_register(array('HarvestAPI', 'autoload') );
$api = new HarvestAPI();
$api->setUser( $user );
$api->setPassword( $password );
$api->setAccount( $account_name );
$api->setSSL( true );
$result = $api->getUsersActiveTimer( $userid );
if( $result->isSuccess() ) {
echo "It is Successful!";
if( ! is_null( $result->data ) ){
echo $result->get( "started-at" );
}
}
else{
echo "It is not Successful";
}
?>
Kindly suggest a way to go about this