PHP code example of teakowa / octo
1. Go to this page and download the library: Download teakowa/octo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teakowa / octo example snippets
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();