17 - API

Here's the most barebones and proper definition of an API:

An API is code that tells a developer what they can do with someone else's code.

When executed, it will perform a bunch of things behind the scenes that you don't always need to know about.

So long as the end result is achieved, the API has does its job.

Consider the following:
  • You can't order sushi at McDonald's because their menu ("API") doesn't have it.
  • And you can't ask your Wedding Planner to give you a backrub because their list of services (API) doesn't include that.
  • You can't go to the 11th floor if the elevator button panel (API) only has 10 floors to choose from.