kimmy-wang / Meting

:cake: Wow, such a powerful music API framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meting

Author Version Downloads Travis License

🍰 Wow, such a powerful music API framework

Introduction

A powerful music API framework to accelerate development

  • Easy - Easy to use, suppose format return.
  • Light - 42KB around with only one file.
  • Powerful - Suppose various webserver, include tencent, netease, xiami, kugou, baidu and more.
  • Free - Under MIT license, you can use it anywhere if you want.

Requirement

PHP 5.4+ and BCMath, Curl, OpenSSL extension installed

Install

Require this package, with Composer, in the root directory of your project.

$ composer require metowolf/meting

Then you can import the class into your application:

use Metowolf\Meting;

$api = new Meting('tencent');

$data = $api->format(true)->search('Soldier');

Note: Meting requires the BCMath, cURL and OpenSSL extension in order to work.

Quick Start

require 'vendor/autoload.php';
// require 'Meting.php';

use Metowolf\Meting;

// Initialize to tencent API
$api = new Meting('tencent');

// Use custom cookie (option)
// $api->cookie('paste your cookie');

// Get data
$data = $api->format(true)->search('Soldier', [
    'page' => 1,
    'limit' => 50
]);

echo $data;
// [{"id":"0036bJCO3iRu9h","name":"Soldier","artist":["Samantha Jade"],"album":"Soldier","pic_id":"004GeOXp2mmIV7","url_id":"0036bJCO3iRu9h","lyric_id":"0036bJCO3iRu9h","source":"tencent"},{...},{...},...]

// Parse link
$data = $api->format(true)->url();

echo $data;
// {"url":"https://...","size":11823019,"br":320}

More usage

Join the Discussion

Related Projects

Author

Meting © metowolf, Released under the MIT License.

Blog @meto · GitHub @metowolf · Twitter @metowolf · Telegram Channel @metooooo

About

:cake: Wow, such a powerful music API framework

License:MIT License


Languages

Language:PHP 100.0%