My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Categories of APIs - Which are you familiar with?

Bolaji Ayodeji's photo
Bolaji Ayodeji
·Jun 8, 2019

Application Programming Interfaces (APIs) are constructs made available in programming languages to allow developers to create complex functionality more easily. They abstract more complex code away from you, providing some easier syntax to use in its place.

As a real-world example, think about the electricity supply in your house, apartment, or other dwellings. If you want to use an appliance in your house, you simply plug it into a plug socket and it works. You don't try to wire it directly into the power supply — to do so would be really inefficient and, if you are not an electrician, difficult and dangerous to attempt. - MDN

plug-socket.png

Basically, an API allows you to exchange data or information from one end to another.


Client-side JavaScript, in particular, has many APIs available to it — these are not part of the JavaScript language itself, rather they are built on top of the core JavaScript language. They generally fall into two categories:

  1. Browser APIs

    These are built into your web browser and are able to expose data from the browser to do useful complex things with it.

    e.g ["Web Audio API", "Fetch API", "Geolocation API"]

    Learn about all here and here

  2. Third-party APIs

    These are not built into the browser by default, and you generally have to retrieve their code and information externally from somewhere on the Web. You can do complex things with this too.

    e.g ["Twitter API", "GitHub API", "Google Maps API"]

    See a full list of them here

Questions

  • Did you know the categories of APIs before now?
  • Did you know Browser APIs before now?
  • Have you used any before?
  • Have you built any application with Browser APIs before?
  • Care to share description and/or links?
  • Which are your favourite Third-party APIs?

Let's turn this into an educative thread, looking forward to learning from all your comments :)