6 |
|
# Douglas Thrift |
7 |
|
# |
8 |
|
# $Id$ |
9 |
+ |
|
10 |
+ |
// Copyright 2004-2008 Facebook. All Rights Reserved. |
11 |
|
// |
12 |
|
// +---------------------------------------------------------------------------+ |
13 |
|
// | Facebook Platform PHP5 client | |
1620 |
|
'metrics' => json_encode($metrics))); |
1621 |
|
} |
1622 |
|
|
1623 |
+ |
/** |
1624 |
+ |
* Returns values for the specified metrics for the current |
1625 |
+ |
* application, in the given time range. The metrics are collected |
1626 |
+ |
* for fixed-length periods, and the times represent midnight at |
1627 |
+ |
* the end of each period. |
1628 |
+ |
* |
1629 |
+ |
* @param start_time unix time for the start of the range |
1630 |
+ |
* @param end_time unix time for the end of the range |
1631 |
+ |
* @param period number of seconds in the desired period |
1632 |
+ |
* @param metrics list of metrics to look up |
1633 |
+ |
* @return a list of the values for those metrics |
1634 |
+ |
*/ |
1635 |
+ |
public function &admin_getMetrics($start_time, $end_time, $period, $metrics) { |
1636 |
+ |
return $this->call_method('admin.getMetrics', |
1637 |
+ |
array('start_time' => $start_time, |
1638 |
+ |
'end_time' => $end_time, |
1639 |
+ |
'period' => $period, |
1640 |
+ |
'metrics' => json_encode($metrics))); |
1641 |
+ |
} |
1642 |
|
|
1643 |
|
|
1644 |
|
|
1727 |
|
|
1728 |
|
$post_string = $this->create_post_string($method, $params); |
1729 |
|
|
1709 |
– |
|
1730 |
|
if (function_exists('curl_init')) { |
1731 |
|
// Use CURL if installed... |
1732 |
|
$ch = curl_init(); |