The programmer, especially the beginners, encounters a set of terms and synonyms in the world of programming that may constitute an obstacle for them to understand it, especially the scarcity of war sources that explain these terms to you more precisely in your mother tongue, so you resort in the end to platforms such as Wikipedia or software platforms in order to learn more about that term Understanding it, but the language barrier always prevents you from exploring the new term.
Therefore, we decided in the programming section on our website to help you explore and understand a set of programming terms in order to facilitate access to them, and we will also launch a new section called "Programming Terms" that will help you to explore the most used terms in the programming field with their full and adequate explanation .
Our first explanation will be about the API, one of the most famous and prominent terms currently in the field of the Internet, and it is difficult to start programming without encountering this term, so what is the API then? What is its function and uses? Will I need it in my programming path?
What is the API in its simplest terms?
The API is an abbreviation for the term Application Programming Interface, and perhaps we can translate it in Arabic to the application's programming interface. The API aims to be an intermediary between your own software and other software, for this it is most of the time a third-party service (that is, the third member next to your site and the site you communicate with), but for what purpose will the API mediate?
The answer is simply to send and receive information between your own software, and another program that is not affiliated with you (we will see examples later). You can consider it as a medium to bring in information and send it, as if it was the postman who takes the information from your own software and sends it to another program, or vice versa.
The API provides more programming explanations
It's called entirely the RESTful API, because the API performs a set of requests using the HTTPS protocol. If you've worked with PHP before, it's more like GET and POST. Through the RESTful API you can send a set of information (mostly Parameters in the link such as example.com?data=1), and then receive a list of all the information that you have requested from the site, the reception is either in XML format (rarely or little), but currently You receive it as Json code.
The API is often just a link to a specific site (for example, ip-api.com/json of the IP API site, for example). This link can deal with requests by sending and receiving them, so when clicking on it, for example, it will provide you with information about your IP and your location. The geographic location will show it in the browser in the form of JSON, and you can also add a set of information or Parameters that you can send with the link in order to customize it more (try, for example, clicking on ip-api.com/json/?fields=countryCode to get in the result only the country code and not All information), then you will get a set of data in the form of Json that you can deal with in your programming for several languages such as Javascript.
Why do we use the API?
The uses of the API differ according to your programming needs, and there are many uses related to the API, most notably:
Shortening the work on you: Imagine, for example, if you want to extract the IP addresses of users, it will be difficult and you will need to develop your software from scratch that deals with this goal, so it will be easier and better to use like the previous API, and do the entire work only through two lines of programming and maybe less You are using advanced technologies (like Axios in Vuejs).
Include popular software in your own software: Have you ever come across a site that allows you to register via Facebook, Twitter, or Google? You can also do this, so that you can include the registration through external services such as Facebook on your site through the company's API, this will be easier than creating an interface for registration and logging into your site. The same is true for other services that you want to include in your site in order to shorten the effort and work.
Importing / sending content: There are popular sites that fetch content from sites and embed them within it, for example the Flipboard platform, this popular and global platform is based only on a group of API's that search popular sites and bring their articles and topics on them and review them in one place.
Dealing with difficult or simple tasks sometimes: But sometimes you may only want to use the API to deal with difficult or expensive tasks, or tasks that may seem very easy sometimes, for example, there is an API from Cloudinary that allows you to reduce the area of images before adding them to your site, which is the API Good for those who do not have much storage space on their site and want to reduce space for images before uploading them. Such functions would be easier if you could shorten them in the API instead of programming them from scratch.
And more other tasks related to the API's, just remember that most of the popular sites currently allow you to have their own API (such as Facebook, Google, Instagram, WhatsApp ...) some of them are free and some of them are paid, and through the Documentation of each API you will be able to know what you can Achieve it by using it (for example, on Twitter, you can extract the most used hashtags and place them on your site, for example).
1 Comments
Titanium for sale
ReplyDeleteThe titanium trimmer as seen on tv original design of this item. titanium rings The titanium exhaust tips aluminum pieces are designed to keep the original, durable and attractive for use with your Type: BicycleFrame: CeramicColor: Black Rating: 5 · titanium dental 3 reviews · $13.95 titanium solvent trap · In stock