tnapf/spotify

Spotify API 包装器

维护者

详细信息

github.com/tnapf/spotify

源代码

问题

安装: 36

依赖: 0

建议: 0

安全: 0

星标: 2

关注者: 1

分支: 0

v0.1.0-alpha 2023-05-24 17:41 UTC

This package is auto-updated.

Last update: 2024-09-24 12:13:34 UTC


README

PHP 的 Spotify API 客户端(仍在开发中)

安装

composer require tnapf/spotify

使用

创建新的 Spotify 对象

use Tnapf\Spotify\Client;
use Psr\Http\Client\ClientInterface;

$httpClient = ClientInterface::class; // <- must be a client interface implementation

$spotify = new Client($httpClient, $clientId, $clientSecret);

发送请求

/** @var Album */
$spotify->albums->get('0rGKEhiSyEwmcpQoU5Gg61');

由于所有内容最终都将进行映射,因此您的 IDE 将提供自动完成功能,您不必总是查阅文档。