teakowa / octo
A composer package to simple use music service API.
v1.3.0
2020-04-21 04:02 UTC
Requires
- php: >=7.1.3
- ext-bcmath: *
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: ^6.2
- guzzlehttp/psr7: ^1.6
- metowolf/meting: ^1.5
- psr/http-message: ~1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- phpmd/phpmd: @stable
- phpstan/phpstan: ^0.12.19
- phpunit/phpunit: ^7.5 || ^8.0
This package is auto-updated.
Last update: 2024-10-29 05:40:54 UTC
README
A composer package to simple use music service API.
Feature
We have supported the following music service providers:
- Kugou
- Tencent
Installation
composer require teakowa/octo
Usage
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
$kugou->artist($id)->info(); $kugou->artist($id)->pic(); $kugou->artist($id)->fans(); $kugou->song($hash)->info(); $kugou->song($hash)->special();
Tencent
$tencent->artist($id)->info(); $tencent->album($mid)->pic(); $tencent->song($mid)->info();
LICENSE
The code in this repository, unless otherwise noted, is under the terms of both the Anti 996 License and the Apache License (Version 2.0).