Skip to content

Instantly share code, notes, and snippets.

@ezy
Created November 12, 2016 00:28
Show Gist options
  • Select an option

  • Save ezy/bc4c16046f5d6cc6d121fc8091b37d35 to your computer and use it in GitHub Desktop.

Select an option

Save ezy/bc4c16046f5d6cc6d121fc8091b37d35 to your computer and use it in GitHub Desktop.
Simple ember spotify artist ajax request
// app/artist/route.js (pods structure)
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return Ember.$.ajax({
url: `https://api.spotify.com/v1/artists?ids=0oSGxfWSnnOXhD2fKuz2Gy,3dBVyJ7JuOMt4GE9607Qin`
}).then(function(response) {
return response.artists.map((data) => {
return data;
});
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment