As1imwe-Mark / LeaderBoard

LeaderBoard is a project under microverse Module 2 block 2 aimed at testing my understanding of ES6 syntax, modules, APIs, gitflow and webpack. This app takes and stores scores of different players playing a game.
MIT License
0 stars 0 forks source link

Hit the API for storing and getting scores #2

Closed As1imwe-Mark closed 1 year ago

As1imwe-Mark commented 1 year ago

I used the leaderBoard API and the fetch API to capture scores from the player and store it and then retrieve it when needed. I followed the following guidelines

Create a new game with the name of your choice by using the API. Make sure that you saved the ID of your game that will be returned by API. Implement the "Refresh" button that will get all scores for a game created by you from the API (receiving data from the API and parsing the JSON). Implement the form "Submit" button that will save a score for a game created by you (sending data to the API). Use arrow functions instead of the function keyword. Use async and await JavaScript features to consume the API. No styling is required.