Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 640 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 640 Bytes

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.