flastm

1.0.1 • Public • Published

flastm Build Status Coverage Status

Package for Node.JS which provides Promise based API under Last.fm REST API.

Installation

Install via npm:

npm install --save flastm

Install via yarn:

yarn add flastm

Usage

First of all to use this package you should receive Last.fm API key and secret. You can do it via creation API key.

After that you can use package by this way:

const config = {
    api_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    // Optional: fill only if chosen use auth.getMobileSession method for authorization.
    username: 'xxxxxxxx',
    password: 'xxxxxxxx'
};
const flastm = require('flastm')(config);
const { album, artist } = flastm;
 
// Get information about album.
album.getInfo('Breaking Benjamin', 'Phobia')
    .then(res => console.log(res));
 
// Get information about artist.
artist.getInfo('Breaking Benjamin')
    .then(res => console.log(res));

List of all packages and methods you can see here.

Readme

Keywords

none

Package Sidebar

Install

npm i flastm

Weekly Downloads

0

Version

1.0.1

License

GPL-2.0

Last publish

Collaborators

  • sumthief