ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/facebook/trunk/facebookapi_php5_restlib.php
(Generate patch)

Comparing facebook/trunk/facebookapi_php5_restlib.php (file contents):
Revision 1015 by douglas, 2008-05-25T05:56:55-07:00 vs.
Revision 1058 by douglas, 2008-06-25T02:40:10-07:00

# Line 6 | Line 6
6   # Douglas Thrift
7   #
8   # $Id$
9 +
10 + // Copyright 2004-2008 Facebook. All Rights Reserved.
11   //
12   // +---------------------------------------------------------------------------+
13   // | Facebook Platform PHP5 client                                             |
# Line 1618 | Line 1620 | function toggleDisplay(id, type) {
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  
# Line 1706 | Line 1727 | function toggleDisplay(id, type) {
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();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines