deanx/lastfm-api
Composer 安装命令:
composer require deanx/lastfm-api
包简介
Last.fm webservice client
README 文档
README
Thank you for using PHP Last.FM API!
You will need your own API key by registering at: http://www.last.fm/api
Installation
composer require deanx/lastfm-api
Usage
❗ Only read calls are tested (2016-03-17)
use LastFmApi\Api\AuthApi; use LastFmApi\Api\ArtistApi; class LastFm { private $apiKey; private $artistApi; public function __construct() { $this->apiKey = 'apikeyfromlastfm'; //required $auth = new AuthApi('setsession', array('apiKey' => $this->apiKey)); $this->artistApi = new ArtistApi($auth); } public function getBio($artist) { $artistInfo = $this->artistApi->getInfo(array("artist" => $artist)); return $artistInfo['bio']; } }
Enjoy!
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-17