Liking cljdoc? Tell your friends :D

Discogs Clojure CI Clojars Project cljdoc badge

note

A fully-featured, data-oriented, Discogs API Client written in pure clojure.

Usage

Create a Client

There is differents way to create a Discogs client, here is a detailed guide to find what fit the best for your use-case:

1. Create anonymous client

note

Requests are throttled by the server by source IP to 60 per minute for authenticated requests, and 25 per minute for unauthenticated requests, with some exceptions.

(require '[discogs.client :as dc])

(def client (dc/mk-client))

2. Create client for application Key & Secrets

  • Go to Discogs Developers Portal:
    Visit Discogs API Documentation to create your developer account
  • Create an App:
    In your developer settings, create a new application. You will receive a Consumer Key and Consumer Secret.
(require '[discogs.client :as dc])

(def client (dc/mk-client "ZrUgstGwOmYzWChuPXrH" "S3FEVERXTUdFR1ZQSEhtclNYckljTmdQZ3ZoY0NocloK"))

3. Create Using PAT

To generate a Personal Access Token (PAT) for the Discogs API, follow these steps:

  1. Log in to your Discogs Account:
    Go to the Discogs website and sign in with your username and password.
  2. Navigate to Developer Settings:
    • Click your user avatar (usually in the top-right corner).
    • Select Settings from the dropdown menu.
    • Go to the Developers section.
  3. Generate a New Token:
    • In the Developers section, look for the option to Generate new token.
    • Click it to create your personal access token.
  4. Store the Token Securely:
    • Copy the generated token and keep it safe—do not share it or commit it to public repositories.
    • You can use it directly in your API requests as an authentication header.

warning

This token is only valid for your own account and does not allow access to other users’ data unless you use OAuth for broader permissions.

(require '[discogs.client :as dc])

(def client (dc/mk-client "pat_ZrUgstGNqDTDWMGWChuPXrH"))

Interact With Database

TODO

Commons Algorithms

TODO

Disclaimer of Affiliation with Discogs

This software/library is an independent project developed by its author(s) and is not affiliated with, sponsored by, or endorsed by Discogs or any of its subsidiaries. "Discogs" is a registered trademark of Discogs Inc.

The use of the "Discogs" name and any related trademarks within this project is for identification and descriptive purposes only and does not imply any connection, endorsement, or approval by Discogs Inc.

License

Copyright © 2025 iomonad

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close