NBA-Playoff Voting App(NPVA)



About this project 📝


NPVA allows users to pick their MVP as well as read statistic regarding players.



languages Used and technology 💻



HTML5

JavaScript

CSS3


Code snipets


This is the api component that calls the objects of players in adds them to the player list. This is where we get the player card information.

xhr.addEventListener("readystatechange", function () {

	if (this.readyState === this.DONE) {
		//console.log(JSON.parse(this.responseText));
		let playerObj = (JSON.parse(this.responseText));
		let index = 0
		
		
		
		for (index = 0; index < playerObj.api.players.length; index++) {
			playerList.push(playerObj.api.players[index])
			
		}
		console.log(playerList)

		displayDetails();         


Challenges Faced


We had trouble with using the format fetch to retrieve our API call so we had to learn how to use the Xmlhttprequest call to make our api call. By using this we had to learn how to make the call and return the JSON package (strings) and convert them to a set of player list objects to make our players display. In all this was a good chanllenge for us as a team.



List of API's used





Authors