discogs / discogs_client

DEPRECATED - Official Python Client for the Discogs API
http://www.discogs.com/developers
Other
479 stars 132 forks source link

Trying to search for all of 'Columbia's' releases #29

Closed tcash21 closed 10 years ago

tcash21 commented 10 years ago

Have configured my user_agent but am getting this error. I was able to get releases for Columbia Records, but there seemed to only be 3,747. I didn't see any pagination options. When searching for releases for just "Columbia", I get this error:

import discogs_client as discogs discogs.user_agent = 'my-user-agent-string' label = discogs.Label('Columbia') releases = label.releases

Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/discogs_client.py", line 249, in releases return self.data.get('releases') File "/Library/Python/2.7/site-packages/discogs_client.py", line 57, in data raise DiscogsAPIError, '%s %s' % (status_code, httplib.responses[status_code]) discogs_client.DiscogsAPIError: 200 OK

rodneykeeling commented 10 years ago

Hi tcash21,

We have just finalized the merge of our new 2.0.0 client, and the old endpoints will be deprecated tomorrow.

With the new client, this can be done by:

import discogs_client as discogs
app = discogs.Client('my_user_agent/1.0')
label = app.label(1866) # 1866 is Columbia's label ID
releases = label.releases.page(1) # for the first page of results

Hope this helps!

tcash21 commented 10 years ago

Awesome, thanks!