powler / soundcloud-api
SoundCloud API 的 PHP 封装
1.3
2022-12-06 12:50 UTC
Requires
- php: >=8.1
- ext-json: *
- symfony/http-client: ^5.4|^6.0
- symfony/mime: ^5.4|^6.0
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.0
README
SoundCloud API PHP
这是一个 SoundCloud API 的 PHP 封装。
要求
- PHP >=8.1
- Symfony HTTP 客户端
安装
使用 Composer 安装
composer require pouler/soundcloud-api
<?php require 'vendor/autoload.php'; $curl = new \Symfony\Component\HttpClient\CurlHttpClient(); $client = new PouleR\SoundCloudAPI\SoundCloudClient($curl); $api = new \PouleR\SoundCloudAPI\SoundCloudAPI($client); $api->setClientId('client.id'); // Get information about given user $api->getUser(123456); // Get information about current usr $api->setAccessToken('access.token'); $api->getUser(); var_dump($result);