mrprompt / silex-soundcloud
Silex SoundCloud Provider
dev-master
2016-10-21 15:32 UTC
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- njasm/soundcloud: *
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ^5.1
- silex/silex: ~1.3
This package is auto-updated.
Last update: 2024-11-28 08:12:42 UTC
README
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