What is API and How to use it?

Have you ever used a library in C#? Yes, that’s an API.

what is an api

An Application Programming Interface is something that let’s you interact with something or with an interface.

They are just a set of functions you can call. They have their documentation on what they do, how they behave, what input(s) they need to perform as intended.

For example, using Win32 API you can interact with Windows, using Twitter API you can interact with Twitter platform services, and so forth so long.

For example, Facebook wants to help programmers in general to develop applications that work with their platform. So they offer a library that you integrate with your application to access data in the Facebook systems.

Basically you start using an API by downloading it’s library or development kit (SDK) and reading it’s Manual (Documentation).

Let’s take Facebook for an example.

Go to https://developers.facebook.com and search for “SDK”.

Download the version appropriate for your Operating System and Development Framework.

Look at the samples. Try them.

Change them to do something slightly different.

Refer to this link for example: https://developers.google.com/maps/documentation/javascript/demogallery

This demonstrates to the various use of Google Maps API.

So, to summarize – every time we’re trying to interact with a service, whether it’s a local service access (like reading a file from disk on your machine, or you’re trying to post a tweet from your app – you’re using an API.

Explore more interesting topics at devsdaily.com

Leave a Comment