Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Easiest way to use the Discogs API in Javascript/Typescript 🎵

License

NotificationsYou must be signed in to change notification settings

aknorw/discojs

Repository files navigation

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

CircleCICoverage Status

Installation

yarn add discojs

Usage example

import{Discojs}from'discojs'constclient=newDiscojs({userToken:process.env.USER_TOKEN,})client.searchArtist('Jacob Desvarieux').then(data=>doSomethingWith(data))

API Reference

v2

Documentation fordiscojs@2.x is available onGitHub Pages;

v1

Documentation fordiscojs@1.x is available in thewiki.

Tests

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

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

DGS_USERNAME=0ctocatUSER_TOKEN=7h1515myu53r70k3n

⚠️ 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 runtest

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

Credits

Inspired bydisconnect from@bartve

About

Easiest way to use the Discogs API in Javascript/Typescript 🎵

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp