Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos in conditon/sleeve_condition api comments #35

Closed
eiked opened this issue Jun 19, 2014 · 3 comments
Closed

Typos in conditon/sleeve_condition api comments #35

eiked opened this issue Jun 19, 2014 · 3 comments

Comments

@eiked
Copy link

eiked commented Jun 19, 2014

Typos in the api comments on the values for conditon and sleeve_condition:

Near Mint (NM or NM-) --> Near Mint (NM or M-)
Very Good Plus (VG)+ --> Very Good Plus (VG+)
Good Plus (G)+ --> Good Plus (G+)

@eiked
Copy link
Author

eiked commented Jun 19, 2014

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.

@buntine
Copy link
Owner

buntine commented Jun 19, 2014

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

@eiked
Copy link
Author

eiked commented Jun 25, 2014

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 notifications@github.com:

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.

eiked added a commit to eiked/discogs that referenced this issue Jul 1, 2014
@buntine buntine closed this as completed Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants