internet4000 / explorer-discogs

A work in progress to explore and play Discogs
https://explorer.radio4000.com
2 stars 0 forks source link

Fetch label.releases_url with new model labelReleases #19

Closed 4www closed 6 years ago

4www commented 6 years ago

In order to fetch label.releases_url, which is a relationship, but does not exists in the form of a hasMany, we try to create a new model labelReleases.

This new ressources endpoint is releases_url = api.discogs.com/labels/:id/releases

Therefore it allows us to get:

Notes:

  1. Maybe using a model is not the right solution for assigning the releases data to a label. I thought it was nice to use ember-data's adapter/serializer for making it work
  2. The choice of model name labelReleases might be discussed. The idea here, is to stay close to the resource endpoint name and the hasMany only relation of this model.
oskarrough commented 6 years ago

Just noticed we also have a similar relationship releases_url on artist. Example: https://api.discogs.com/artists/5456