diff --git a/controllers/api.js b/controllers/api.js index c93375f516..b2ba4399f1 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -171,6 +171,7 @@ exports.getNewYorkTimes = function(req, res) { var url = 'http://api.nytimes.com/svc/books/v2/lists?' + query; request.get(url, function(error, request, body) { var bestSellers = JSON.parse(body); + console.log(bestSellers.results[0].book_details); res.render('api/nyt', { title: 'New York Times API', books: bestSellers.results diff --git a/views/api/foursquare.jade b/views/api/foursquare.jade index b5e6b9b1a4..f784f444ad 100644 --- a/views/api/foursquare.jade +++ b/views/api/foursquare.jade @@ -33,6 +33,7 @@ block content h3.text-primary Venue Detail p img(src='#{venueDetail.venue.photos.groups[0].items[0].prefix}150x150#{venueDetail.venue.photos.groups[0].items[0].suffix}') + .label.label-primary #{venueDetail.venue.name} (#{venueDetail.venue.categories[0].shortName}) .label.label-success #{venueDetail.venue.location.address}, #{venueDetail.venue.location.city}, #{venueDetail.venue.location.state} .label.label-warning #{venueDetail.venue.likes.count} likes, #{venueDetail.venue.rating} rating diff --git a/views/api/nyt.jade b/views/api/nyt.jade index df308ef0ad..49f7ba6370 100644 --- a/views/api/nyt.jade +++ b/views/api/nyt.jade @@ -3,7 +3,7 @@ extends ../layout block content .page-header h1 - i.fa.fa-music + i.fa.fa-building-o | New York Times API .btn-group.btn-group-justified a.btn.btn-lg.btn-primary(href='http://developer.github.com/guides/getting-started/', target='_blank') @@ -16,4 +16,20 @@ block content i.fa.fa-file-text-o | Documentation - p nyt api \ No newline at end of file + h3 Young Adult Best Sellers + table.dataTable.table.table-striped.table-bordered + thead + tr + th Rank + th Title + th.hidden-xs Description + th Author + th.hidden-xs ISBN-13 + tbody + for book in books + tr + td= book.rank + td= book.book_details[0].title + td.hidden-xs= book.book_details[0].description + td= book.book_details[0].author + td.hidden-xs= book.book_details[0].primary_isbn13 \ No newline at end of file