nucleos / setlistfm
Setlist.fm webservice 客户端,适用于 PHP。
3.4.0
2023-12-21 14:06 UTC
Requires
- php: ^8.1
- ext-json: *
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0 || ^2.0
- psr/log: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.0.1
- nyholm/psr7: ^1.0
- symfony/http-client: ^6.4 || ^7.0
Suggests
- symfony/http-client: Symfony HTTP client implementation
README
此库为在 PHP 中使用 Setlist.fm API 提供了一个包装器,并为 symfony 提供了一个桥梁。
安装
打开命令行,进入您的项目目录,并执行以下命令以下载此库的最新稳定版本
composer require nucleos/setlistfm
# To define a default http client and message factory
composer require symfony/http-client nyholm/psr7
使用方法
一般使用
// Create connection use Nucleos\SetlistFm\Builder\ArtistSearchBuilder; use Nucleos\SetlistFm\Connection\PsrClientConnection; use Nucleos\SetlistFm\Service\ArtistService; $connection = new PsrClientConnection($httpClient, $requestFactory); $artistApi = new ArtistService($connection); $artists = $artistApi->search(ArtistSearchBuilder::create() ->withArtistName('Slipknot') );
许可协议
此库遵循 MIT 许可协议。