gakimball / micro-lastfm

Microservice to fetch last song scrobbled on Last.fm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

micro-lastfm

Microservice to fetch last song scrobbled on Last.fm

Travis

Setup

  1. Clone the repository.
  2. Copy .env_example to .env and fill in your Last.fm API key.
  3. Run npm start to start the service.

Usage

Load /:user to get the most recently played track (or the currently playing track) from a Last.fm user. A JSON object with these properties will be returned:

  • title: song name.
  • artist: artist name.
  • album: album name.
  • live: true if the user is currently listening to this song.
  • date: timestamp at which user listened to this song, or null if they're currently listening.

Local Development

git clone https://github.com/gakimball/micro-lastfm
cd micro-lastfm
npm install

To run the service in development mode, use npm run dev. To run the linter and unit tests, run npm test.

License

MIT © Geoff Kimball

About

Microservice to fetch last song scrobbled on Last.fm

License:MIT License


Languages

Language:JavaScript 100.0%