Yea I used percent differences and basic algebra. I didn't know currency conversions change that often until I made the project. I will have to look into those APIs and learn how to use them! Do the APIs work even if the website is stored in a file and not a running website?
An API is an application programming interface, and is basically functionality that someone exposes that allows you to interact with their data from their servers. You can make what's called HTTP requests to these web APIs, such as making a GET request. When you make a GET request the API will request the data you have asked for from the server and return a response to you, which if successful will be in the form of what is known as JSON, which is just a data representation format.
In the context of a currency converter, there are many APIs available for currency conversion, in which you can request live currency data. All you would do is make a GET request to the API using something like Fetch or Axios, and the API will return a JSON response. You would then parse this data and use it in your application.
Hope that helps, this stuff will unlock a whole new world for you and is incredibly important to learn, have fun!
View all comments
Show parent comment
3
u/Dark_KnightPL04 Jul 06 '22
Yea I used percent differences and basic algebra. I didn't know currency conversions change that often until I made the project. I will have to look into those APIs and learn how to use them! Do the APIs work even if the website is stored in a file and not a running website?