Giter VIP home page Giter VIP logo

go-discogs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-discogs's Issues

Search not working

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

Context support, rate limiting, etc.

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.

ID is different from MasterID

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

API RateLimit Handling

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

Improve basic logic

  • remove release service, use just a client
  • add new fields to the response
  • add functions to set token and useragent
  • create setcurrency function

Missing fields in Artist and Master

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 ;))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.