kraku / angular-echonest Goto Github PK
View Code? Open in Web Editor NEWUnofficial AngularJS module for the Echo Nest API
License: MIT License
Unofficial AngularJS module for the Echo Nest API
License: MIT License
Hi,
I have been trying to use the API to access songs for a Artist like so:
Echonest.artists.get({
name: 'nirvana'
}).then(function(artist) {
console.log(artist.getSongs(), "Song get request visible");
artist = artist.getSongs();
console.log(Artist.songs, "Song get request");
});
});
The following code executed in chrome 38.0.2125.104 with angular 1.3.0 will result in a output in the dev-tools that looks like this:
Artist {id: "ARH3S5S1187FB4F76B", name: "Nirvana", getBiographies: function, getBlogs: function, getImages: function…}id: "ARH3S5S1187FB4F76B"name: "Nirvana"songs: Array[15]__proto__: Object "Song get request visible" all.js:44330
undefined "Song get request"
The object that is returned by Artist.getSong() has no accessible value named songs, i don't know why this is happening but it seems like it's able to set the something to this but the key songs itself is not registered on the this.
Echonest.artists.get({
name: 'nirvana'
}).then(function(artist) {
console.log(artist.getSongs(), "Song get request visible");
artist = artist.getSongs();
console.log(Object.keys(artist), "Song get request"); // => ["id", "name"] "Song get request"
});
});
Any ideas why this is happening or a solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.