2017 © Pedro Peláez
 

library last-fm-now-playing

Get track info that a user is currently playing

image

spatie/last-fm-now-playing

Get track info that a user is currently playing

  • Tuesday, January 2, 2018
  • by Spatie
  • Repository
  • 4 Watchers
  • 33 Stars
  • 4,941 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown

The README.md

, (*1)

Get the currently playing track from a last.fm user

Latest Version on Packagist Software License Build Status Quality Score Total Downloads, (*2)

This package contains a class to determine the current track a specified user is playing according to last.fm, (*3)

Support us

, (*4)

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products., (*5)

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall., (*6)

Installation

You can install the package via composer:, (*7)

``` bash composer require spatie/last-fm-now-playing, (*8)


## Usage The constructor of `Spatie\NowPlaying\NowPlaying` needs an api key you can get [from the last.fm site](http://www.last.fm/api/account/create). ``` php $nowPlaying = new Spatie\NowPlaying\NowPlaying($apiKey); $nowPlaying->getTrackInfo($lastFmUserName);

If the specified user is currently playing a track you'll get backy and array with keys artist, album, trackName, artwork and trackUrl. The getTrackInfo-function will return false when a user is not currently playing a track., (*9)

If something goes wrong an instance of Spatie\NowPlaying\Exceptions\BadResponse will be thrown., (*10)

Changelog

Please see CHANGELOG for more information what has changed recently., (*11)

Testing

bash $ composer test, (*12)

Contributing

Please see CONTRIBUTING for details., (*13)

Security

If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker., (*14)

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using., (*15)

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium., (*16)

We publish all received postcards on our company website., (*17)

Credits

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

02/01 2018

dev-master

9999999-dev https://github.com/spatie/last-fm-now-playing

Get track info that a user is currently playing

  Sources   Download

MIT

The Requires

  • php ^5.5|^7.0

 

The Development Requires

spatie last-fm-now-playing

10/08 2017

1.0.2

1.0.2.0 https://github.com/spatie/last-fm-now-playing

Get track info that a user is currently playing

  Sources   Download

MIT

The Requires

  • php ^5.5|^7.0

 

The Development Requires

spatie last-fm-now-playing

15/05 2016

1.0.1

1.0.1.0 https://github.com/spatie/last-fm-now-playing

Get track info that a user is currently playing

  Sources   Download

MIT

The Requires

  • php ^5.5|^7.0

 

The Development Requires

spatie last-fm-now-playing

09/05 2016

1.0.0

1.0.0.0 https://github.com/spatie/last-fm-now-playing

Get track info that a user is currently playing

  Sources   Download

MIT

The Requires

  • php ^5.5|^7.0

 

The Development Requires

spatie last-fm-now-playing

07/05 2016

0.0.1

0.0.1.0 https://github.com/spatie/last-fm-now-playing

Get track info that a user is currently playing

  Sources   Download

MIT

The Requires

  • php ^5.5|^7.0

 

The Development Requires

spatie last-fm-now-playing