nucleos/setlistfm

Setlist.fm webservice 客户端,适用于 PHP。

3.4.0 2023-12-21 14:06 UTC

README

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage Type Coverage

此库为在 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 许可协议