@imikailoby/lastfm-ts
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

@imikailoby/lastfm-ts

TypeScript-based client for the Last.fm API 2.0, designed to streamline access to its public methods and JSON responses.

Key features

  • Zero Dependencies: Designed to function independently without any external dependencies.
  • Pure Responses: No altered or decorated data from the API. Use API's original responses as you wish.
  • Minimal size: ≈1kb minified and gzipped size (Bundlephobia).

Installation

# via yarn
yarn add @imikailoby/lastfm-ts

# via npm
npm install @imikailoby/lastfm-ts

Usage

  1. Obtain the Last.fm API Key (Read more).
  2. Initialize the LastFm class with the obtained API key.
  3. Use one of the available methods to get the required data.

Example:

import { LastFm } from '@imikailoby/lastfm-ts';

const lastFm = new LastFm('api_key'); // Insert your API key

lastFm.user.getInfo({ user: 'imikailoby' }).then((response) => {
    const { user } = response;
    // Do something with user data
});

Documentation

For comprehensive documentation, including detailed parameter descriptions, usage examples, FAQs, and more, please refer to the repository wiki.

/@imikailoby/lastfm-ts/

    Package Sidebar

    Install

    npm i @imikailoby/lastfm-ts

    Weekly Downloads

    16

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    39.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • imikailoby