04/03
2018
dev-master
9999999-devWrapper of the last.fm API.
MIT
The Requires
The Development Requires
by Luiz Pedone
Wrapper of the last.fm API.
This package wraps the last.fm API in a easy to use PHP package. This package is under development at the moment., (*2)
To install it using composer just execute the following command:, (*3)
composer require luizpedone/lastfm
<?php $lastFm = new \LuizPedone\LastFM\LastFM('your-last-fm-api-key'); $topArtists = $lastFm->user() ->topArtists('luiz-pedone') ->period(Period::LAST_MONTH) ->limit(10) ->get(); // Outputs an array of \LuizPedone\LastFM\User\Entity\TopArtist objects foreach ($topArtists as $topArtist) { echo $topArtist->getName(); echo $topArtist->getPlayCount(); }
Wrapper of the last.fm API.
MIT