pouler / deezer-api
Deezer API 的 PHP 包
1.1.2
2022-12-08 13:31 UTC
Requires
- php: >=8.1
- ext-json: *
- symfony/http-client: ^5.4|^6.0
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.0
README
这是一个 Deezer API 的 PHP 封装器。
要求
- PHP >=8.1
安装
使用 Composer 进行安装
composer require pouler/deezer-api
使用方法
在使用 Deezer API 之前,您需要在 Deezer 开发者网站 上创建一个应用。获得访问令牌后,您可以检索用户信息。
<?php require 'vendor/autoload.php'; $curl = new \Symfony\Component\HttpClient\CurlHttpClient(); $client = new PouleR\DeezerAPI\DeezerAPIClient($curl); $client->setAccessToken(''); $api = new PouleR\DeezerAPI\DeezerAPI($client); print_r($api->getUserInformation());