| Package Data | |
|---|---|
| Maintainer Username: | Skizu |
| Maintainer Contact: | email@danielhunt.info (Skizu) |
| Package Create Date: | 2015-03-30 |
| Package Last Update: | 2016-03-07 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-10 03:04:39 |
| Package Statistics | |
|---|---|
| Total Downloads: | 170 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 1 |
A simple api wrapper with quick and easy caching and throttling.
To configure a new api key you must register it in the .env where in the example EXAMPLE_KEY is the key.
# Required
EXAMPLE_KEY_API_URL=http://api.example.com/
# Optional
EXAMPLE_KEY_API_THROTTLE_LIMIT=100
EXAMPLE_KEY_API_STORAGE_TIME=1440
EXAMPLE_KEY_API_CACHE_TIME=60
Example to resolve http://api.example.com/baz?foo=bar
$api = new SimpleAPI\RegisterAPI('example_key');
$query = [
'foo' => 'bar'
];
$result = $api->action('baz')->lookup($query);
This library works by throwing exceptions which you would need to catch.
ConfigException
ThrottleException
RequestException
ResponseException
ServerException