Skip to content

API's Research 💻

Sensinki edited this page May 31, 2023 · 11 revisions

What is an API?

API stands for 'Application Programming Interface'. It is a function created for developers that allows them to load data or functions without having to know the full code. The API communicates and exchanges information with other software applications. Almost all software uses an API. If you see a Spotify music player on a website, it is using Spotify's API. It uploads the data to that website, but the code is managed by Spotify.

Web API's

As the name implies, a web API is an API that can be accessed through the web using the HTTP protocol. Web API can be accessed via a web server or a web browser. Web API is essentially a web development concept. It is limited to the client-side of Web Applications and does not include information about a web server or a web browser.

Examples

Third-party API's

People also named it external API. A third-party(external) API is developed by someone else, but you can use it in your system. Developers can use this tool by either connecting it to their app using a JavaScript library or by sending a specific request to a certain web address. Once the connection is made, the user's request travels back and forth between the app and the server through the API, allowing them to communicate with each other in both directions. In simple terms, it's a way for the app and the server to talk to each other.

Examples

APIs used in this project

The GamerPower API has been a valuable resource for my project, specifically for using game images. Although I had many opportunities to use the GamerPower API for different things like getting game details or adding advanced features, I chose to focus only on using game images. The reason is that I'm not very skilled at working with APIs.

Axios instead of Fetch API

Axios is not an API itself. Axios is a popular JavaScript library that acts as an HTTP client, which means it helps make HTTP requests from a web browser or a Node.js environment. It simplifies the process of making network requests to APIs by providing a set of methods and features to handle request and response handling, error management, and more.

I didn't use the Fetch API because I had trouble saving game image data into the database. It just wasn't working as expected. So, I asked ChatGPT for help, and ChatGPT suggested using Axios instead. Even though Axios isn't technically an API itself, it turned out to be really helpful in this situation. With Axios, I was able to handle the data successfully and overcome the problems I had with the Fetch API. I wanted to mention this because it's important to acknowledge the support from ChatGPT and the usefulness of using Axios in my project.

Sources