+ 3

Pls, I need help here; Is API so much of a big deal?

It's not yet very long since i started the life of programming, this topic of API keep confusing me. I here were some coders say they can design their own API to do whatever they want. please I need to be clarified what really is an API used for or is there a very good explanation to help paint a very clear picture of what API really is meant for and maybe how to even go about creating one.

13th Apr 2017, 4:38 PM
S@mi3 C0d3sz
S@mi3 C0d3sz - avatar
8 ответов
+ 11
Check out this Abbreviations and Acronym code. In the source code, you won't find any acronym or definition. The application is using an API hosted on another server. It'll connect to the third party server and request for data which will be delivered to the client/user. Check it out to understand what I'm saying better. https://code.sololearn.com/WzrcIsHPhiUN/?ref=app
13th Apr 2017, 5:51 PM
Wisdom Abioye
Wisdom Abioye - avatar
+ 7
API stands for Application Programming Interface and is just that - a standardized way of sending instructions to an application which has it enabled. For example Google Maps offers an API for its geolocation application - you can write a program in Python or C++ (or some others), which uses its geocoding abilities - for example to return geo coordinates of user input. Nothing scary, really - you just have to study the documentation, it often contains example instructions or even whole codes.
13th Apr 2017, 4:52 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 6
As @Kuba has beautifully outlined an API is often accompanied by documentation for using the API. In a simplistic (but not technically correct) way think of an API as an imported module that allows you to input data into your program from another source if you use the correct function commands. A (very) loose analogy could be... do you know how some website provide RSS feeds that you can incorporate into your own website? Well APIs are similar: some services provide APIs that you can incorporate into your own program. Also, many API providers use the same data for their own application(s) that they are providing to others in the API. An example is Spotify's API (which no longer exists unfortunately). Spotify provided their streaming service music data to others through the use of an API they had defined and documented. (The API was restricted in use to prevent enabling competition, but that is beyond the scope of this Q&A.) Please anyone feel free to correct me if I am wrong in anyway.
13th Apr 2017, 5:11 PM
Bryan Boyett
Bryan Boyett - avatar
+ 6
Just to give you an example code on the Google API - in a few lines I have my own geolocator ;) https://code.sololearn.com/c57gr6Ay31s9/?ref=app Won't run on Sololearn, but feel free to copy to your IDE or (QPython3 if on Android) and then run.
13th Apr 2017, 5:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 6
When a programmer says that he creates and API then it means that he declare and document interfaces which are usable and callable by others (who will use this API). But the implementation of the API is hidden. The developer of the API can change this implementation transparently until the interface (the API) remains unchanged.
13th Apr 2017, 8:48 PM
Tamás Barta
Tamás Barta - avatar
+ 2
which gives the platform to create an application is API. An application is which makes easier a human being's daily life. I think u understood...
13th Apr 2017, 4:51 PM
Md. Jahidul Islam
Md. Jahidul Islam - avatar
+ 1
@kuba tnx a lot for this, it really helped a lot.
13th Apr 2017, 5:54 PM
S@mi3 C0d3sz
S@mi3 C0d3sz - avatar
+ 1
@Bryan tnx a lot for the further explanation
13th Apr 2017, 5:57 PM
S@mi3 C0d3sz
S@mi3 C0d3sz - avatar