Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teakowa/octo
A composer package to simple use music service API.
https://github.com/teakowa/octo
Last synced: about 1 month ago
JSON representation
A composer package to simple use music service API.
- Host: GitHub
- URL: https://github.com/teakowa/octo
- Owner: Teakowa
- License: other
- Created: 2019-07-31T09:23:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T03:44:05.000Z (over 3 years ago)
- Last Synced: 2024-04-19T23:03:56.890Z (8 months ago)
- Language: PHP
- Homepage: https://packagist.org/packages/teakowa/octo
- Size: 333 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE-ANTI996
Awesome Lists containing this project
README
# Octo
A composer package to simple use music service API.
![Travis (.org)](https://img.shields.io/travis/teakowa/octo?style=flat-square)
[![StyleCI](https://github.styleci.io/repos/199823129/shield?branch=master)](https://github.styleci.io/repos/199823129)
![PHP from Packagist](https://img.shields.io/packagist/php-v/teakowa/octo?style=flat-square)
[![Packagist Version](https://img.shields.io/packagist/v/teakowa/octo?style=flat-square)](https://packagist.org/packages/teakowa/octo)
[![LICENSE](https://img.shields.io/badge/License-Anti%20996-blue.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE)
[![LICENSE](https://img.shields.io/badge/License-Apache--2.0-green.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0)
[![996.icu](https://img.shields.io/badge/Link-996.icu-red.svg?style=flat-square)](https://996.icu)## Feature
We have supported the following music service providers:
- Kugou
- Tencent## Installation
```sh
composer require teakowa/octo
```## Usage
```php
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
```php
$kugou->artist($id)->info();
$kugou->artist($id)->pic();
$kugou->artist($id)->fans();
$kugou->song($hash)->info();
$kugou->song($hash)->special();
```### Tencent
```php
$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](https://github.com/996icu/996.ICU/blob/master/LICENSE) License and the [Apache License (Version 2.0)](https://www.apache.org/licenses/LICENSE-2.0).