Application Programming Interface
Application Programming Interface
Application Programming Interface
Browser APIs are built into your web browser and are able to expose data from the
browser and surrounding computer environment and do useful complex things with it.
For example, the Web Audio API provides JavaScript constructs for manipulating audio
in the browser — taking an audio track, altering its volume, applying effects to it, etc. In
the background, the browser is actually using some complex lower-level code (e.g. C++
or Rust) to do the actual audio processing. But again, this complexity is abstracted away
from you by the API.
Third-party APIs are not built into the browser by default, and you generally have to retrieve
their code and information from somewhere on the Web.
For example, the Twitter API allows you to do things like displaying your latest tweets on your
website.
It provides a special set of constructs you can use to query the Twitter service and return
specific information.
Relationship between JavaScript, APIs, and
other JavaScript tools
client-side JavaScript APIs are, and how they relate to the JavaScript language
JavaScript — A high-level scripting language built into browsers that allows you to
implement functionality on web pages/apps. Note that JavaScript is also available in other
programming environments, such as Node.
Browser APIs — constructs built into the browser that sits on top of the JavaScript
language and allows you to implement functionality more easily.
Third-party APIs — constructs built into third-party platforms (e.g. Twitter, Facebook)
that allow you to use some of those platform's functionality in your own web pages (for
example, display your latest Tweets on your web page).
JavaScript libraries — Usually one or more JavaScript files containing custom functions that
you can attach to your web page to speed up or enable writing common functionality. Examples
include jQuery, Mootools and React.
JavaScript frameworks — The next step up from libraries, JavaScript frameworks (e.g. Angular
and Ember) tend to be packages of HTML, CSS, JavaScript, and other technologies that you
install and then use to write an entire web application from scratch. The key difference between a
library and a framework is "Inversion of Control". When calling a method from a library, the
developer is in control. With a framework, the control is inverted: the framework calls the
developer's code.
common categories of browser API
The Twitter API, which allows you to do things like displaying your latest tweets on your
website.
Map APIs, like Mapquest and the Google Maps API, which allow you to do all sorts of
things with maps on your web pages.
The Facebook suite of APIs, which enables you to use various parts of the Facebook
ecosystem to benefit your app, such as by providing app login using Facebook login,
accepting in-app payments, rolling out targeted ad campaigns, etc.
The YouTube API, which allows you to embed YouTube videos on your site, search
YouTube, build playlists, and more.
Benefits Of Using API
APIs needed to make the connection between application functions to handle the data
from predefined processes
Easy of Integration: APIs can be embedded with any type of software application, so it
can be easily integrate with the applications and functions between different websites
REST API and RESTful API