This week 2 Hackathon focussed on using our newfound skills to make an app that fetched data from a server.
We were given a selection of free to use APIs, and from the documentation, needed to determine how we could use them and access the data returned.
From there, we brainstormed what we could make with our knowledge of JavaScript, the DOM, and the API data.
We decided to use the Pokemon API and create a Pokemon Battle game that would generate selections for two players, determine skills from the API result, and return random score values for each player to 'battle' them. A message then pops up onscreen to tell you which Pokemon won.
The style of the app is intentionally retro, channelling old-school Nintendo DS (and earlier) games.
// fetch the first pokemon
fetch("https://pokeapi.co/api/v2/pokemon/1/");
This app uses:
- HTML
- JavaScript
- CSS