I am working with the following code written by Phil Sturgeon here: https://github.com/philsturgeon/codeigniter-restserver
No where in his docs can I see how the limit option is setup in side of the controller.
the RESTController controller file has some references e.g.
Shows the protected function, additionally there is:
// How many times can you get to this method an hour?
$limit = $this->methods[$controller_method]['limit'];
And from the rest.php config:
/* |-------------------------------------------------------------------------- | REST Enable Limits |-------------------------------------------------------------------------- | | When set to true REST_Controller will count the number of uses of each method | by an API key each hour. This is a general rule that can be overridden in the | $this->method array in each controller. |
Can anyone help me with this please? Pulling my hair out currently :-)
One of my controllers methods as it currently stands:
function listservices_get()
{
$organisation_id = $this->get('id');
$organisations = $this->api_buyus_model->list_services($organisation_id);
if($organisations)
{
$this->response($organisations, 200);
}
else
{
$this->response(array('error' => '1', 'errorDesc' => 'Buy us services list could not be retrieved.'), 400);
}
}