Last.fm get artist info example
This commit is contained in:
@ -182,9 +182,21 @@ exports.getNewYorkTimes = function(req, res) {
|
|||||||
*/
|
*/
|
||||||
exports.getLastfm = function(req, res) {
|
exports.getLastfm = function(req, res) {
|
||||||
var lastfm = new LastFmNode({
|
var lastfm = new LastFmNode({
|
||||||
api_key: '1f3e35019e98124cc8f75f8ae99df25f', // sign-up for a key at http://www.last.fm/api
|
api_key: '1f3e35019e98124cc8f75f8ae99df25f',
|
||||||
secret: '4ae76d10d76cf680cebf4f0c8dea1aa4'
|
secret: '4ae76d10d76cf680cebf4f0c8dea1aa4'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
lastfm.request("artist.getInfo", {
|
||||||
|
artist: 'Evanescence',
|
||||||
|
handlers: {
|
||||||
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
console.log(error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
19
views/api/lastfm.jade
Normal file
19
views/api/lastfm.jade
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
extends ../layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
.page-header
|
||||||
|
h1
|
||||||
|
i.fa.fa-music
|
||||||
|
| Last.fm API
|
||||||
|
.btn-group.btn-group-justified
|
||||||
|
a.btn.btn-lg.btn-primary(href='http://developer.github.com/guides/getting-started/', target='_blank')
|
||||||
|
i.fa.fa-check-square-o
|
||||||
|
| Getting Started
|
||||||
|
a.btn.btn-lg.btn-primary(href='https://apigee.com/console/github', target='_blank')
|
||||||
|
i.fa.fa-laptop
|
||||||
|
| API Console
|
||||||
|
a.btn.btn-lg.btn-primary(href='http://developer.github.com/v3/', target='_blank')
|
||||||
|
i.fa.fa-file-text-o
|
||||||
|
| Documentation
|
||||||
|
|
||||||
|
p last.fm api
|
Reference in New Issue
Block a user