Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Checking Your API Key Daily Usage

From time to time you probably will want to check your API key daily usage. By default Technorati limits your API usage to 500 calls per day, and an exception is returned by Zend_Service_Technorati if you try to use it beyond this limit. You can get information about your API key usage using the Zend_Service_Technorati::keyInfo() method.

Zend_Service_Technorati::keyInfo() returns a Zend_Service_Technorati_KeyInfoResult object. For full details please see the API reference guide.

Example 852. Getting API key daily usage information

= new Zend_Service_Technorati('VALID_API_KEY');
$key $technorati->keyInfo();

"API Key: " $key->getApiKey() . "<br />";
"Daily Usage: " $key->getApiQueries() . "/" .
$key->getMaxQueries() . "<br />";

Zend Framework