Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.12 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.12 KB

SoundCloud Silex Provider

Build Status Code Climate Test Coverage Issue Count

Install

composer require mrprompt/silex-soundcloud

Usage

use SilexFriends\SoundCloud\SoundCloud;
use Silex\Application;

$client_id      = getenv('SOUNDCLOUD_CLIENT_ID');
$client_secret  = getenv('SOUNDCLOUD_CLIENT_SECRET');

$app = new Application;
$app->register(new SoundCloud($client_id, $client_secret));

/* @var $url string */
$url = $app['request']->get('url');

/* @var $sound array */
$sound = $app['soundcloud']($url);

var_dump($sound);

Tests

./vendor/bin/phpunit

License

MIT