deanx / lastfm-api
Last.fm webservice client
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 46
pkg:composer/deanx/lastfm-api
Requires
- php: >=5.3.3
Requires (Dev)
- php: >=5.3.3
- phpunit/phpunit: ~4.8
This package is not auto-updated.
Last update: 2025-12-27 01:55:19 UTC
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!