This is the code I have for the above picture. I have to pull the Best Sellers L
ID: 3673174 • Letter: T
Question
This is the code I have for the above picture. I have to pull the Best Sellers List of fiction and non fiction books from the New York Times API and parse the JSON response.
<!DOCTYPE html>
<html>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<ul>
<li ng-repeat="x in books">
{{ x.title + ', ' + x.author }}
</li>
</ul>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://api.nytimes.com/svc/books/v3/lists/.json?api-key=37775f104c1d0455b95606647354d2ae:10:74362200")
.then(function (response) {
alert("RESPONSE=" + response.data.results.book[0].author);
$scope.books = response.data.results.book;
});
});
</script>
</body>
</html>
Explanation / Answer
first of all we have to check whether java software is working on your computer system or not?
in order to do this,
by default java installs in C:> drive in your system.
and then we have to copy the path where java is installed in "properties window"
and here the properties window can be appeared by navigating and right clicking on "my computer"
once the path is set we have to click on the tab called apply and ok.
and by default when ever we load java on to our computer system src will be automatically loaded and here "src" means sorce code and when ever we execute a java program we should save it .java as an extension and that is nothing but our notepad document and automatically "a class file will be created".
then by typing as java doc as a command in the command prompt the documentation will be displayed.
i.e., from src only all the documentation can be retrieved.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.