Joseph Goode

API Fetch

API Directory

Using a random user generator API from randomuser.me, I requested JSON objects using fetch and parsed the data into a grid with each card displaying some of the user information. Clicking on their image or name opened a modal with more detailed information.

<The Code>

API Project Snippet

variables for grid, and modals. fetch data from API, catch commands for errors

forEach methods, dot notations and template literals for string interpolation with placeholder expressions

API Project Snippet

Using variables and event listeners to cycle through the employees while in the modal using previous and next buttons.

if statement with click event listener to select the closest card when the user clicks inside the grid.

Takeaway

I can see how APIs are so crucial in the development of applications and websites. The way they move data around so freely really makes the development process that much more fluid. From using Google Maps within an app such as Uber, to embedding YouTube videos on a website, we definitely don't want to shoot THESE messengers!