0.0.3 • Published 3 years ago

acousticbrainz v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Acousticbrainz

Package for interacting with the Acousticbrainz API.

Installation

npm i acousticbrainz

Usage

Typescript

import { AcousticBrainz } from 'acousticbrainz'

const ab = new AcousticBrainz()

JavaScript

const { AcousticBrainz } = require('acousticbrainz')

const ab = new AcousticBrainz()

Config Options

The constructor takes an optional configuration object:

{
  // Your AcousticBrainz API Key. Optional - May increase rate limits
  apiKey: '',
  // If true acousticbrainz will throw an error if it believes it has hit the rate limit
  errorOnRateLimit: false,
  // If true disable all rate limit checks
  disableRateLimitCheck: false,
}

Rate Limiting

AcousticBrainz's API implements rate limiting which is communicated via headers on the API responses. This library attempts to mitigate rejected API calls caused by rate limiting by waiting until the rate limit has refreshed if it believes it has exceeded the rate limit. This is mostly untested and can be disabled via the disableRateLimitCheck configuration option.

0.0.3

3 years ago

0.0.2-beta-2

3 years ago

0.0.2-beta

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago