Created
November 12, 2016 00:28
-
-
Save ezy/bc4c16046f5d6cc6d121fc8091b37d35 to your computer and use it in GitHub Desktop.
Simple ember spotify artist ajax request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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