0

What is API? How it is use?

Please do anybody tell me what is api and how it is use?

13th Feb 2017, 5:54 PM
Shahid
Shahid - avatar
6 Answers
+ 7
API stands for application programming interface. It is a set of rules and protocols that an app uses in communication with other applications, programs or scripts. Consider Google's Geocoding API - you can "ask" it by sending a query, like "London, UK" and it will send you back some data, including geographic coordinates - longitude and latitude.
13th Feb 2017, 6:35 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 6
Hmm... let's put it this way - API is kind of a sender/recipient or input/output gateway. By using certain language of communication, this gateway can be accessed and sent data. If you know how to handle it in your program, this can be beneficial for you and your own application. For example, we have twitter as a social media and a smartphone application. But what this application does is in fact it is communicating with some twitter servers to process your input and user action, which is then translated and returned as output. Twitter, however, makes it possible to access some portion of this process by other, user-built applications - like for example webscripts which enable sharing, subscribing to twitter feeds or even sending a tweet. You can write a program in Python or Java, which displays 10 last tweets of a user, or which displays the number of followers. You can do that namely by accessing the Twitter API. Hope this clears it up a bit. P.S. Tak, jestem Polakiem :)
13th Feb 2017, 9:53 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 2
No problem. You may take a look on one of my codes here on Sololearn - GeoProject v. 1.1. It asks for input and communicates with Google API to return geographic coordinates of the input. It won't run in Sololearn environment though. You have to download it and run from IDE. Take a look how it works, I provided comments to each instruction there.
14th Feb 2017, 12:57 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
0
I still not understand, could you please give an example. Czy Pan jest Polakiem?
13th Feb 2017, 7:28 PM
Mohammad Hassoub
Mohammad Hassoub - avatar
0
Thanks so much bro
14th Feb 2017, 12:54 PM
Mohammad Hassoub
Mohammad Hassoub - avatar
0
API is an interface between two applications. when you want to use functionality which is provided by application X in application Y then you can make an API call(get or post etc) to X application which returns data required by you in generally XML or Json format. you can manipulate this data. The thing here to notice is in order to use functionality of a particular application first of all that application needs to expose its functionality as API. In simple words you will be dealing with a URL. Calling different methods on that URL like get or post u can either get required data or send your data to other application.
14th Feb 2017, 8:21 PM
Sai Kiran Rayapureddy
Sai Kiran Rayapureddy - avatar