Skip to content

Small component that renders an html element that shows what music you're currently listening to, using lastFM.

Notifications You must be signed in to change notification settings

siddv/listening-to

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

listening-to

Small component that renders an html element that shows what music you're currently listening to, using lastFM.

Usage

Config

    var config = {
        user: 'LastFM username',
        APIKey: 'LastFM apikey'
        theme: 'dark' // optional, do not define for 'light' theme
    }

Constructor

    var listeningTo = new ListeningTo(config);

Exposed Methods

   // Returns promise
   listeningTo.getLatestSong();

Returns a vanilla JS promise, which resolves to a song object.

   listeningTo.show();

Renders the widget to the page.

About

Small component that renders an html element that shows what music you're currently listening to, using lastFM.

Resources

Stars

Watchers

Forks

Packages

No packages published