APIs

Definition

An API definition can be written from two perspectives (and the code for it could be too). An API is an interface used to access some of a platform's services. It can be created by the creator of the application, who wants their tool to easily be implemented by others, or it could be written by a programmer, hoping to make use of the functionality found in another program.

Using an API has several benefits:

  1. Able to use the target program's services
  2. You don't have to rewrite the code, saving time and energy while moving up timelines
  3. Able to easily swap out the target program for another, if needed without having to rewrite too much code.

Examples


When one website talks to another website, an API is used. An example of this is when a news webpage include a comment section that's linked to Facebook; that's an API. Or your favorite online recipe that has a link to it's pinterest post, that's an API. 

Another example is a game development engine. These engines save developers a lot of time from rewriting common code, like camera positioning and graphics rendering. Using an API to access an engine allows the developers to focus on more key characteristics of their game.

Documentation

Documentation should also exist in this case and explain how to use the API. If developing your own API, you'll want to develop clear documentation as well.





Comments