Discogs::Api

Build Status codecov Maintainability

A simple wrapper around the Discogs API.

I’m only aiming to implement endpoints that I actually use at this time, which is a very small subset of what’s available. See Implemented Endpoints and consider opening an issue or PR if you need more.

Installation

Add this line to your application’s Gemfile:

ruby gem 'discogs-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install discogs-api

Usage

```ruby # Set up a client with your auth token and user agent client = Discogs::Api::Client.new(‘my-auth-token’, ‘my-user-agent’)

Search for an artist

Discogs::Api::Search.artist(client, query: ‘Electric Octopus’)

Search for a master

Discogs::Api::Search.master(client, query: ‘This is our Culture’)

Search for an release

Discogs::Api::Search.release(client, query: ‘This is our Culture’)

Search for a label

Discogs::Api::Search.label(client, query: ‘Heavy Psych Sounds’)

Get an artist by its ID

Discogs::Api::Artist.get(client, 5272208)

Get an artist’s releases

Discogs::Api::Artist.releases(client, 5272208) ```

Implemented Endpoints

There are more endpoints regarding the marketplace, user identity, user collection, user wantlists, and user lists. I have no intention at all of implementing those at the moment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/shkm/discogs-api.

License

The gem is available as open source under the terms of the MIT License.