A PHP SDK for the Dolby API


March 7th, 2023

A PHP SDK for the Dolby API

PHP SDK for the Dolby API is a PHP package by Andréia Bohner that provides a wrapper around the Dolby API:

For example, Dolby provides various media APIs such as enhance, improving the quality of your media. Using this package, you can do the following to enhance the quality of an audio file:

use DolbyApi\DolbyApi;
$dolbyApi = new DolbyApi('your-api-token');
$startEnhance = $dolbyApi->api('media')
// "{"job_id":"5970da3d-cdbc-4128-b2f8-21ab61573d2e"}"
// decoded body: [ "job_id" => "44fccc05-54cc-4bda-84ba-a8c9ee4b8335"]
$startEnhance->status(); // 200

Since this is an asynchronous operation, you can get the status of the enhancement by providing the job ID:

$enhanceStatus = $dolbyApi
// {"path":"/media/enhance","status":"Success","progress":100,"api_version":"v1.1.2","result":{}}"

Check out the documentation on GitHub for usage and examples. You can learn more about this package, get full installation instructions, and view the source code on GitHub.

As a side note, this package uses the excellent Saloon Package, which is helpful in building API integrations and SDKs in PHP.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.