teakowa/octo

一个用于简单使用音乐服务API的composer包。

v1.3.0 2020-04-21 04:02 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:32 UTC


README

一个用于简单使用音乐服务API的composer包。

Travis (.org) StyleCI PHP from Packagist Packagist Version LICENSE LICENSE 996.icu

特性

我们支持以下音乐服务提供商

  • 酷狗
  • 腾讯

安装

composer require teakowa/octo

使用

use Teakowa\Octo\Adapter\Headers;
use Teakowa\Octo\Adapter\Guzzle as Adapter;
use Teakowa\Octo\Provider\Kugou;
use Teakowa\Octo\Provider\Tencent;

$adapter = new Adapter(new Headers());
$data    = new API($adapter);
$kugou   = new Kugou($adapter);
$tencent = new Tencent($adapter);

酷狗

$kugou->artist($id)->info();
$kugou->artist($id)->pic();
$kugou->artist($id)->fans();
$kugou->song($hash)->info();
$kugou->song($hash)->special();

腾讯

$tencent->artist($id)->info();
$tencent->album($mid)->pic();
$tencent->song($mid)->info();

LICENSE

此存储库中的代码,除非另有说明,均受Anti 996许可证和Apache许可证(版本2.0)的条款约束。