com.google.code.facebookapi
Enum Metric

java.lang.Object
  extended by java.lang.Enum<Metric>
      extended by com.google.code.facebookapi.Metric
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Metric>

public enum Metric
extends java.lang.Enum<Metric>

This class enumerates the various metrics that are available through the admin.getMetrics API call. Typically, you will pass a set containing the metrics you are interested in to the API call. See http://wiki.developers.facebook.com/index.php/Admin.getMetrics for details.


Enum Constant Summary
ACTIVE_USERS
          The number of active users.
API_CALLS
          Number of API calls made by your app.
CANVAS_FBML_RENDER_TIME_AVG
          The average time to render FBML on your application's canvas page.
CANVAS_HTTP_REQUEST_TIME_AVG
          The average time to fulfill an HTTP request to your application's canvas page.
CANVAS_PAGE_VIEWS
          Number of canvas page views.
DAILY_ACTIVE_USERS
          Deprecated. 
REQUEST_CONTINUE
          The number of canvas page views that returned HTTP code 100 -- Continue.
REQUEST_ERROR_301
          The number of canvas page views that returned HTTP code 301 -- Moved Permanently.
REQUEST_ERROR_302
          The number of canvas page views that returned HTTP code 302 -- Found.
REQUEST_ERROR_303
          The number of canvas page views that returned HTTP code 303 -- See Other.
REQUEST_ERROR_400
          The number of canvas page views that returned HTTP code 400 -- Bad Request.
REQUEST_ERROR_401
          The number of canvas page views that returned HTTP code 401 -- Unauthorized.
REQUEST_ERROR_403
          The number of canvas page views that returned HTTP code 403 -- Forbidden.
REQUEST_ERROR_404
          The number of canvas page views that returned HTTP code 404 -- Not Found.
REQUEST_ERROR_405
          The number of canvas page views that returned HTTP code 405 -- Method Not Allowed.
REQUEST_ERROR_413
          The number of canvas page views that returned HTTP code 413 -- Request Entity Too Large.
REQUEST_ERROR_422
          The number of canvas page views that returned HTTP code 422 -- Unprocessable Entity.
REQUEST_ERROR_500
          The number of canvas page views that returned HTTP code 500 -- Internal Server Error.
REQUEST_ERROR_502
          The number of canvas page views that returned HTTP code 502 -- Bad Gateway.
REQUEST_ERROR_503
          The number of canvas page views that returned HTTP code 503 -- Service Unavailable.
REQUEST_ERROR_505
          The number of canvas page views that returned HTTP code 505 -- HTTP Version Not Supported.
REQUEST_OK
          The number of canvas page views that returned HTTP code 200 -- OK.
REQUEST_OK_NO_DATA
          The number of canvas page views that returned HTTP code 200 -- OK -- and no data.
REQUEST_TIMEOUT
          The number of canvas page views that timed out.
UNIQUE_ADDS
          Deprecated. 
UNIQUE_API_CALLS
          The number of users on whose behalf your application made API calls.
UNIQUE_BLOCKS
          The number of users who blocked your application.
UNIQUE_CANVAS_PAGE_VIEWS
          The number of users who viewed your application's canvas page.
UNIQUE_REMOVES
          Deprecated. 
UNIQUE_UNBLOCKS
          The number of users who unblocked your application.
 
Field Summary
static long PERIOD_DAY
          Use in Admin.getMetrics calls to specify a daily time-period.
static long PERIOD_MONTH
          Use in Admin.getMetrics calls to specify a monthly time-period.
static long PERIOD_WEEK
          Use in Admin.getMetrics calls to specify a weekly time-period.
 
Method Summary
 java.lang.String getName()
          Get the name by which Facebook refers to this metric.
static Metric valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Metric[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DAILY_ACTIVE_USERS

@Deprecated
public static final Metric DAILY_ACTIVE_USERS
Deprecated. 

UNIQUE_ADDS

@Deprecated
public static final Metric UNIQUE_ADDS
Deprecated. 

UNIQUE_REMOVES

@Deprecated
public static final Metric UNIQUE_REMOVES
Deprecated. 

ACTIVE_USERS

public static final Metric ACTIVE_USERS
The number of active users.


API_CALLS

public static final Metric API_CALLS
Number of API calls made by your app.


UNIQUE_API_CALLS

public static final Metric UNIQUE_API_CALLS
The number of users on whose behalf your application made API calls.


CANVAS_PAGE_VIEWS

public static final Metric CANVAS_PAGE_VIEWS
Number of canvas page views.


UNIQUE_CANVAS_PAGE_VIEWS

public static final Metric UNIQUE_CANVAS_PAGE_VIEWS
The number of users who viewed your application's canvas page.


CANVAS_HTTP_REQUEST_TIME_AVG

public static final Metric CANVAS_HTTP_REQUEST_TIME_AVG
The average time to fulfill an HTTP request to your application's canvas page.


CANVAS_FBML_RENDER_TIME_AVG

public static final Metric CANVAS_FBML_RENDER_TIME_AVG
The average time to render FBML on your application's canvas page.


UNIQUE_BLOCKS

public static final Metric UNIQUE_BLOCKS
The number of users who blocked your application. 1-day only.


UNIQUE_UNBLOCKS

public static final Metric UNIQUE_UNBLOCKS
The number of users who unblocked your application. 1-day only.


REQUEST_TIMEOUT

public static final Metric REQUEST_TIMEOUT
The number of canvas page views that timed out.


REQUEST_CONTINUE

public static final Metric REQUEST_CONTINUE
The number of canvas page views that returned HTTP code 100 -- Continue.


REQUEST_OK

public static final Metric REQUEST_OK
The number of canvas page views that returned HTTP code 200 -- OK.


REQUEST_OK_NO_DATA

public static final Metric REQUEST_OK_NO_DATA
The number of canvas page views that returned HTTP code 200 -- OK -- and no data.


REQUEST_ERROR_301

public static final Metric REQUEST_ERROR_301
The number of canvas page views that returned HTTP code 301 -- Moved Permanently.


REQUEST_ERROR_302

public static final Metric REQUEST_ERROR_302
The number of canvas page views that returned HTTP code 302 -- Found.


REQUEST_ERROR_303

public static final Metric REQUEST_ERROR_303
The number of canvas page views that returned HTTP code 303 -- See Other.


REQUEST_ERROR_400

public static final Metric REQUEST_ERROR_400
The number of canvas page views that returned HTTP code 400 -- Bad Request.


REQUEST_ERROR_401

public static final Metric REQUEST_ERROR_401
The number of canvas page views that returned HTTP code 401 -- Unauthorized.


REQUEST_ERROR_403

public static final Metric REQUEST_ERROR_403
The number of canvas page views that returned HTTP code 403 -- Forbidden.


REQUEST_ERROR_404

public static final Metric REQUEST_ERROR_404
The number of canvas page views that returned HTTP code 404 -- Not Found.


REQUEST_ERROR_405

public static final Metric REQUEST_ERROR_405
The number of canvas page views that returned HTTP code 405 -- Method Not Allowed.


REQUEST_ERROR_413

public static final Metric REQUEST_ERROR_413
The number of canvas page views that returned HTTP code 413 -- Request Entity Too Large.


REQUEST_ERROR_422

public static final Metric REQUEST_ERROR_422
The number of canvas page views that returned HTTP code 422 -- Unprocessable Entity.


REQUEST_ERROR_500

public static final Metric REQUEST_ERROR_500
The number of canvas page views that returned HTTP code 500 -- Internal Server Error.


REQUEST_ERROR_502

public static final Metric REQUEST_ERROR_502
The number of canvas page views that returned HTTP code 502 -- Bad Gateway.


REQUEST_ERROR_503

public static final Metric REQUEST_ERROR_503
The number of canvas page views that returned HTTP code 503 -- Service Unavailable.


REQUEST_ERROR_505

public static final Metric REQUEST_ERROR_505
The number of canvas page views that returned HTTP code 505 -- HTTP Version Not Supported.

Field Detail

PERIOD_DAY

public static final long PERIOD_DAY
Use in Admin.getMetrics calls to specify a daily time-period.

See Also:
Constant Field Values

PERIOD_WEEK

public static final long PERIOD_WEEK
Use in Admin.getMetrics calls to specify a weekly time-period.

See Also:
Constant Field Values

PERIOD_MONTH

public static final long PERIOD_MONTH
Use in Admin.getMetrics calls to specify a monthly time-period.

See Also:
Constant Field Values
Method Detail

values

public static Metric[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Metric c : Metric.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Metric valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()
Get the name by which Facebook refers to this metric.

Returns:
the Facebook-supplied name of this metric.


Copyright © 2009. All Rights Reserved.