You are here

public function AcquiaLiftAPI::getCallsForMonthToDate in Acquia Lift Connector 7

Returns counts of API calls from the 1st to the date provided.

Parameters

$timestamp: The timestamp representing the date up to which to show API calls from the start of that month. For example, passing in a timestamp representing the date October 17th 2013 would return the number of API calls made from October 1st 2013 to October 17th 2013.

Return value

array An associative array with type of call as keys and counts for each type as values, e.g. array( 'decisions' => 1000, 'goals' => 100, 'expires' => 2, 'webactions' => 0, 'other' => 10 )

1 call to AcquiaLiftAPI::getCallsForMonthToDate()
AcquiaLiftAPI::getTotalRuntimeCallsForMonthToDate in includes/acquia_lift.classes.inc
Returns the total number of runtimeAPI calls for the month prior to the date provided.

File

includes/acquia_lift.classes.inc, line 1358
Provides an agent type for Acquia Lift

Class

AcquiaLiftAPI
@file Provides an agent type for Acquia Lift

Code

public function getCallsForMonthToDate($timestamp) {
  $date_start = date('Y', $timestamp) . '-' . date('m', $timestamp) . '-01';
  $date_end = date('Y-m-d', $timestamp);
  $calls_this_month = $this
    ->getAPICallsForPeriod($date_start, $date_end);
  return $calls_this_month;
}