2.2.0 • Published 1 year ago

discojs v2.2.0

Weekly downloads
17
License
MIT
Repository
github
Last release
1 year ago

Discojs

Easiest way to use the Discogs API in Javascript - now with Typescript support! :musical_note:

CircleCI Coverage Status

Installation

yarn add discojs

Usage example

import {Discojs} from 'discojs'

const client = new Discojs({
  userToken: process.env.USER_TOKEN,
})

client
  .searchArtist('Jacob Desvarieux')
  .then(data => doSomethingWith(data))

API Reference

v2

Documentation for discojs@2.x is available on GitHub Pages;

v1

Documentation for discojs@1.x is available in the wiki.

Tests

As several methods need authentication, you'll need 2 environment variables: DGS_USERNAME and USER_TOKEN.

Create a .env file at the root of the directory, and add the following lines:

DGS_USERNAME=0ctocat
USER_TOKEN=7h1515myu53r70k3n

:warning: Use a test account as public information will be edited.

As stated by Discogs API, some methods need a seller account. As I do not have one, I could not test them (which explains the coverage).

npm run test

When running tests, go grab a cup of coffee as this may be long because of Discogs API rate limiting.

Credits

Inspired by disconnect from @bartve

2.2.0

1 year ago

2.1.0

1 year ago

2.0.0

4 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

6 years ago

1.0.1

6 years ago