https://github.com/shkm/discogs-api
💿 Discogs API client in Ruby.
https://github.com/shkm/discogs-api
api-client discogs ruby
Last synced: 3 months ago
JSON representation
💿 Discogs API client in Ruby.
- Host: GitHub
- URL: https://github.com/shkm/discogs-api
- Owner: shkm
- License: mit
- Created: 2018-08-17T15:39:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-24T14:55:08.000Z (over 2 years ago)
- Last Synced: 2025-04-11T15:57:51.331Z (3 months ago)
- Topics: api-client, discogs, ruby
- Language: Ruby
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Discogs::Api
[](https://badge.fury.io/rb/discogs-api)
[](https://travis-ci.org/shkm/discogs-api)
[](https://codecov.io/gh/shkm/discogs-api)
[](https://codeclimate.com/github/shkm/discogs-api/maintainability)A simple wrapper around the [Discogs API](https://www.discogs.com/developers/).
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](#user-content-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
- [ ] OAuth
- [ ] GET [oauth/request_token](https://www.discogs.com/developers/#page:authentication)
- [ ] POST [oauth/access_token](https://www.discogs.com/developers/#page:authentication)
- [ ] GET [oauth/identify](https://www.discogs.com/developers/#page:authentication)
- [ ] Releases
- [ ] GET [releases/:id](https://www.discogs.com/developers/#page:database,header:database-release)
- [ ] GET [releases/:id/rating](https://www.discogs.com/developers/#page:database,header:database-community-release-rating-get)
- [ ] GET [releases/:id/rating/:user](https://www.discogs.com/developers/#page:database,header:database-release-rating-by-user)
- [ ] PUT [releases/:id/rating/:user](https://www.discogs.com/developers/#page:database,header:database-release-rating-by-user-put)
- [ ] DELETE [releases/:id/rating/:user](https://www.discogs.com/developers/#page:database,header:database-release-rating-by-user-delete)
- [ ] Masters
- [ ] GET [masters/:id](https://www.discogs.com/developers/#page:database,header:database-master-release-get)
- [ ] GET [masters/:id/versions](https://www.discogs.com/developers/#page:database,header:database-master-release-get)
- [x] Artists
- [x] GET [artists/:id](https://www.discogs.com/developers/#page:database,header:database-artist-get)
- [x] GET [artists/:id/releases](https://www.discogs.com/developers/#page:database,header:database-artist-releases)
- [ ] Labels
- [ ] GET [label/:id](https://www.discogs.com/developers/#page:database,header:database-artist-releases)
- [ ] GET [label/:id/releases](https://www.discogs.com/developers/#page:database,header:database-all-label-releases-get)
- [x] Search
- [x] GET [database/search](https://www.discogs.com/developers/#page:database,header:database-search-get)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](https://opensource.org/licenses/MIT).