Syntax
int countLists( string api_key [, array search_criteria ] );
Parameters
api_key
(string)The key required to access the API. See Getting Started for more information.
search_criteria
(array - optional)An array of search criteria that selects the Lists to be counted. See searchLists for a description of the values that can be searched on.
Return Value
The number of Lists that match the search criteria.
Examples
$search_criteria = array(
array('creator_user_id', 'not', '600')
);
$api = new Api($url, 'YOURAPIKEY');
$list_count = $api->invokeMethod('countLists', $search_criteria);
array('creator_user_id', 'not', '600')
);
$api = new Api($url, 'YOURAPIKEY');
$list_count = $api->invokeMethod('countLists', $search_criteria);
{
"id": 1,
"method": "countLists",
"params": [
"YOURAPIKEY",
[
["creator_user_id", "not", "600"]
]
]
}
"id": 1,
"method": "countLists",
"params": [
"YOURAPIKEY",
[
["creator_user_id", "not", "600"]
]
]
}
{
"id": 1,
"result": 5,
"error": null
}
"id": 1,
"result": 5,
"error": null
}
Error Codes
This method may return the following error code in addition to the standard error codes:
Code | Error | Description |
---|---|---|
311 |
Invalid Search Parameter Format | search_critera is not valid |