Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/AJDurant/acr-cloud-php

An ACRCloud API PHP client library
https://github.com/AJDurant/acr-cloud-php

Last synced: 2 months ago
JSON representation

An ACRCloud API PHP client library

Awesome Lists containing this project

README

        

acr-cloud-php
==============

[![Build Status](https://travis-ci.org/AJDurant/acr-cloud-php.svg?branch=master)](https://travis-ci.org/AJDurant/acr-cloud-php)

About
--------------

URL: [https://github.com/AJDurant/acr-cloud-php](https://github.com/AJDurant/acr-cloud-php)

Author: AJDurant

Usage
--------------

Install through composer.

```
use \AJDurant\ACRCloud\ACRCloud;

$acr = new ACRCloud(api_key, api_secret);
$data = $acr->identify(path_to_audio_file);
```
Data returned is of the format described in the [ACRCloud Metadata Docs](https://docs.acrcloud.com/metadata) as a PHP associative array.

Build dependencies
--------------

In order to build your generated Composer project from its source, you will need Grunt and PHP on the command line.

So, you must install PHP5 on your system on your command line. Test it:

```
php --help
```

To install Grunt globally on the command line (and run the above build task), run:

```
npm install -g grunt-cli
```

Then, with Grunt, you can install Composer, PhpDocumentor, PhpUnit and PhpCPD locally. Just run once:

```
grunt init
```

Then, you can install PhpDocumentor, PhpUnit and PhpCPD locally. Just run once:

```
php composer.phar install -v
```

Finally, you should also install the PHP extension named Xdebug, which will be used by PhpUnit for code coverage.

Build the sources
--------------

Once all your dependencies are installed, you can build your project with Grunt:

```
grunt build
```

The build process will run the following tasks:

* PhpLint: runs php -l over the "src" folder
* Runs the tests located in the "tests" folder with [PHPUnit](http://phpunit.de/)
* Generates a [PhpDocumentor](http://phpdoc.org) documentation in the "doc" folder from the files of the "src" folder
* Detects copy/paste of code in the files of the "src" folder with [PhpCPD](https://github.com/sebastianbergmann/phpcpd)

[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)

Credits
--------------

acr-cloud-php was initiated with [generator-composer](https://github.com/T1st3/generator-composer), a [Yeoman](http://yeoman.io) generator that builds a PHP Composer project.

This project uses the following as development dependencies:

* [PHPUnit](http://phpunit.de/)
* [PhpDocumentor](http://phpdoc.org)
* [Php Copy/Paste Detector](https://github.com/sebastianbergmann/phpcpd)

License
--------------

[License](https://github.com/AJDurant/acr-cloud-php/blob/master/LICENSE)