Giter VIP home page Giter VIP logo

Comments (3)

eiked avatar eiked commented on August 20, 2024

I'd suggest to add enummerations:

Discogs.Condition = {
mint:'Mint (M)',
near_mint: 'Near Mint (NM or M-)',
very_good_plus: 'Very Good Plus (VG+)',
....
}

Discogs.Status= {
for_sale: 'For Sale',
.....
}

You might even want to wrap them in something from Hashie so that Discogs.Condition.mint would also work.

from discogs.

buntine avatar buntine commented on August 20, 2024

I think adding a hash in for condition constants could be good. Want to add it and send a pull request?

from discogs.

eiked avatar eiked commented on August 20, 2024

Hi Andrew,

I need to learn first, how to make a push/pull
but that should be easy.

I just monkey patched today, to get things working.
because I have to learn,
how to get my new modifications
in sync with you, integrating that into your offical release.

me Monkey:

require 'discogs' # force loading before patching
class Discogs::Wrapper

# monkey patch to fix issue #38
# https://github.com/buntine/discogs/issues/38
# copied from Discogs::Wrapper,v2.0.0
# https://github.com/buntine/discogs/blob/master/lib/wrapper/wrapper.rb
def query_and_build(path, params={}, method=:get, body=nil)
    # FIXME: parameters is not used below: should be removed
    parameters = {:f => "json"}.merge(params)
    data = query_api(path, params, method, body)
    case data
        when nil    then nil
        when ''     then {}
        else Hashie::Mash.new(JSON.parse(data))
    end
end

end

Am 20.06.2014 um 01:08 schrieb Andrew Buntine [email protected]:

I think adding a hash in for condition constants could be good. Want to add it and send a pull request?


Reply to this email directly or view it on GitHub.

from discogs.

Related Issues (20)

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.