100 Days of Joy: Day 2

What is an API?

Honestly, I have no reason for starting here other than the fact that I woke up one morning (today), and decided that I was going understand what an API is and how to use one. EDIT: I had a very introspective moment during my nightly "Nighthacks for Night Owls group where I realize that I started at this point because it SOUNDS like something that web developers talk about all the time. Unconsciously, its the start to me claiming the fact that I am a Web Developer.

At first I berated myself because I didn't want to pick up with where I initially left off, which is somewhere along the lines of HTML, CSS and finally understanding how JavaScript interacts with the first two.

After lunch and a mile long walk, I finally settled into the fact that APIs is where my brain wanted to go today.

API: APPLICATION PROGRAMMING INTERFACE

An information gateway that allows the back ends of software and services to communicate with one another.

To break this down further:

  • application: any piece of software that can be distinctly separated from its environment can be an application.
  • programming: interacting with computer/code.
  • interface: the place where independent and unrelated systems meet and communicate.

TYPES OF APIs:

  • Browser APIs: built into web browser and are able to expose data from the browser and surrounding computer environment to do useful complex things.
  • Third Party APIs: not built into the browser by default, and code had to be retrieved to be used. (Google Maps, Twilio)
  • APIs for manipulating documents: DOM (Document Object Model)
  • APIs for drawing and manipulating data: Canvas and WebGL, allow you to programmatically update the pixel data contained in an HTML.
  • Client-side storage APIs: used in apps that save their state between page loads or work when the device is offline.