maxjoehnk / deezer-rs

5 stars 3 forks source link

Add method to retrieve album by upc #3

Open Ihsahn opened 3 years ago

Ihsahn commented 3 years ago

Deezer supports album retrieval by providing upc instead of it's (deezers) id, eg: https://api.deezer.com/album/upc:724384960650

I would like to add support for that.

Proposed changes:

@maxjoehnk I am willing to do the work, just would like to know your opinion first.

maxjoehnk commented 3 years ago

Api wise this looks fine we could think about a different client method, maybe an enum with an Id and a Upc variant. Do you know of more apis that we should consider?

Ihsahn commented 3 years ago

You can also query track by isrc, like: https://api.deezer.com/track/isrc:GBDUW0000059. I am not aware of any other ids/apis that could be used like that.

maxjoehnk commented 3 years ago

Then I would like an enum with an Isrc and a Upc variant and a method album_by_code or something similar.