pel / freesound-api
A class to consume freesound's API.
dev-master
2019-05-10 01:28 UTC
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is not auto-updated.
Last update: 2025-06-21 22:22:25 UTC
README
freesound-api
About
A PSR-4 PHP class to consume freesound's API.
Usage
Here's an example of how to use the freesound-api class.
include('FreesoundAPI.php'); $api_key = 'g1d11a5117a4143be0f5f'; $curl_options = array(); $api = new Pel\Helper\FreesoundAPI($api_key, $curl_options); $result = $api->sound(123); if ($result === FALSE) { echo 'Error code = ' . $api->error['code'] . '<br/>'; echo 'Error message = ' . $api->error['message'] . '<br/>'; } else { var_dump($result); }
Take a look at the class's source code to see all the possible API calls.