discogs / discogs_client

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

Artist Releases (Verbose Info) #74

Closed systems-rebooter closed 7 years ago

systems-rebooter commented 7 years ago

Hi,

How can I get verbose info on Artist releases with discogs_client in one shot? Like here with CURL: https://www.discogs.com/developers/#page:database,header:database-artist-releases

$ curl -s https://api.discogs.com/artists/{artist_id}/releases

{
  "pagination": {
    "per_page": 50,
    "items": 9,
    "page": 1,
    "urls": {},
    "pages": 1
  },
  "releases": [
    {
      "artist": "Nickelback",
      "id": 173765,
      "main_release": 3128432,
      "resource_url": "http://api.discogs.com/masters/173765",
      "role": "Main",
      "thumb": "https://api-img.discogs.com/lb0zp7--FLaRP0LmJ4W6DhfweNc=/fit-in/90x90/filters:strip_icc():format(jpeg):mode_rgb()/discogs-images/R-5557864-1396493975-7618.jpeg.jpg",
      "title": "Curb",
      "type": "master",
      "year": 1996
    },
    {
      "artist": "Nickelback",
      "format": "CD, EP",
      "id": 4299404,
      "label": "Not On Label (Nickelback Self-released)",
      "resource_url": "http://api.discogs.com/releases/4299404",
      "role": "Main",
      "status": "Accepted",
      "thumb": "https://api-img.discogs.com/eFRGD78N7UhtvRjhdLZYXs2QJXk=/fit-in/90x90/filters:strip_icc():format(jpeg):mode_rgb()/discogs-images/R-4299404-1361106117-3632.jpeg.jpg",
      "title": "Hesher",
      "type": "release",
      "year": 1996
    },
    {
      "artist": "Nickelback",
      "id": 173767,
      "main_release": 1905922,
      "resource_url": "http://api.discogs.com/masters/173767",
      "role": "Main",
      "thumb": "https://api-img.discogs.com/12LXbUV44IHjyb6drFZOTQxgCqs=/fit-in/90x90/filters:strip_icc():format(jpeg):mode_rgb()/discogs-images/R-1905922-1251540516.jpeg.jpg",
      "title": "Leader Of Men",
      "type": "master",
      "year": 1999
    }
  ]
}

With discogs_client i only able to get the following info:

>>> artist.releases.page(1)[0:3]
[<Release 738756 'Linear Cryptics'>, <Release 1220080 'Surge'>, <Master 248367 'The Nothings Of The North'>]

Iterating over each release independently is not very convenient and time consuming. Also, API calls are wasted.

Any help is appreciated!

Thanks

rodneykeeling commented 7 years ago

Hi @systems-rebooter,

Unfortunately, that is likely the current most efficient way of getting that information through the client.

Thanks, Rodney