2017 © Pedro Peláez
 

library lastfm-api

Last.fm webservice client

image

matto1990/lastfm-api

Last.fm webservice client

  • Monday, April 16, 2018
  • by devilcius
  • Repository
  • 10 Watchers
  • 94 Stars
  • 4,560 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 39 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

PHP Last.FM API

Thank you for using PHP Last.FM API!, (*1)

You will need your own API key by registering at: http://www.last.fm/api, (*2)

Installation

composer require matto1990/lastfm-api, (*3)

Usage

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'];
    }   
}

Testing

To run phpunit successfully, a .env file must be included in tests/Api:, (*4)

lastfm_api_key=
lastfm_api_secret=
lastfm_token=
lastfm_session_key=
lastfm_username=

If you just want to run the tests that don't need authentication: vendor/bin/phpunit --group notAuthenticated. In this case you'll only need to set lastfm_api_key property., (*5)

The Versions

16/04 2018

dev-master

9999999-dev https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

16/04 2018

v1.5.4

1.5.4.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

09/03 2018

v1.5.3

1.5.3.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

03/08 2017

v1.5.2

1.5.2.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

25/04 2017

v1.5.1

1.5.1.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

22/07 2016

v1.5

1.5.0.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

21/07 2016

v1.3

1.3.0.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

17/03 2016

v1.2

1.2.0.0 https://github.com/matto1990/PHP-Last.fm-API

Last.fm webservice client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client

17/03 2016

v1.1

1.1.0.0 https://github.com/devilcius/ExtraValidatorBundle

Extra validators for spanish CCC, DNI...

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar Matt
by Marcos

api last.fm webservice client