irlndts / go-discogs Goto Github PK
View Code? Open in Web Editor NEWDiscogs Rest API 2.0 client
License: MIT License
Discogs Rest API 2.0 client
License: MIT License
Hi,
I've been playing around with Discogs' API and found your project which I wanted to use for a personal project.
So first thanks for the work, simple and efficient (+1)
But your Search does not work because you set every single parameters even with an empty string, and it looks like Discogs handles these parameters if declared and doesn't check if it's empty.
Example:
This request below gives the default result of a search, just like if you set no paramter
GET https://api.discogs.com/database/search?anv&artist&barcode&catno&contributor&country&credit&format&genre&label&page=0&per_page=10&q&style&submitter&year&release_title&track&type=artist&title=eminem
This one do give Eminem as an artist
GET https://api.discogs.com/database/search?type=artist&title=eminem
Not sure if you're interested in pull requests for this project, but I've implemented support for Go contexts, rate limiting, and concurrent use with multiple tokens here. Context support does of course require passing around a context.Context which breaks the existing go-discogs API, though.
Hey there,
Still working with your lib, I'm trying to search an album from an artist like so:
disc.Search.Search(discogs.SearchRequest{
Title: title,
Artist: artist,
Format: "album",
Page: 0,
PerPage: 100,
})
Which makes a request like this:
https://api.discogs.com/database/search?page=0&per_page=500&artist=eminem&format=album&title=Infinite
The result of this request gives you a master_id
that I'd like to use to then get all the tracks in the album. I thought master_id
was the same as id
, until this request:
https://api.discogs.com/database/search?page=0&per_page=500&artist=Jenifer&format=album&title=declaration
If you could add a MasterID
in your Search structure that'll be great!
Thank you for your time
This would be extremely useful to have included, to watch for a 429 error in an API response, and inject a pause of say 10 seconds, then retry
Check all the available methods in documentation and check if authentication is required
don't send requests to discogs if authentication is required, return ErrUnauthorized
instead
Hey again,
I saw that the field name
in the Artist
structure was missing, just that I'm doing an API and do not have the artist's name when they give me the ID.
I looked for more missing fields as I was at it, here's the list:
Artist
name
realname
aliases
Master
num_for_sale
most_recent_release
notes
most_recent_release_url
lowest_price
Thanks for adding them (specially the artist's name ;))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.