Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@gustavoerivero gustavoerivero released this 10 Jun 21:17
· 17 commits to main since this release

Version 2.0.0 of venecodollar has been released both as an API and as a library. In this version, the following has been added:

  1. New endpoints have been incorporated, which are:

In the first endpoint, it is mandatory to provide the value for the "dollar" parameter. This endpoint is responsible for calculating in bolivars the amount supplied in the "dollar" parameter. In case the "entity" parameter has been supplied, the API will filter the entities by the given parameter and will return those that match it.

Similarly, the second endpoint is responsible for calculating the value supplied by the "bs" parameter, which is mandatory, in terms of dollars. Like the first endpoint, if an entity to filter is supplied, the API will take care of supplying only the entities that match this parameter.

  1. Also, two functions have been incorporated to perform these conversions from one currency to another. These are:
  • calculateBsToDollar(bs: number) -> This asynchronous function returns a JSON with all the entities handled by the library, making a calculation of the value supplied by the "bs" parameter in terms of dollars.
  • calculateDollarToBs(dollar: number) -> Like the previous function, calculateDollarToBs is an asynchronous function that returns a JSON with all the entities handled, also incorporating an element that provides the calculated value of dollars in bolivars.
  1. On the other hand, four (4) new data types were added, being TDollarCalculated, TBsCalculated, TDollarCalculatedAverage and TBsCalculatedAverage.

At the same time as adding things, some changes were made to the project.:

  1. The most important and notorious is to start implementing the base path of https://venecodollar.vercel.app/api/v2/, since in future updates the API will no longer be used with the endpoints of version v1.

  2. Another change is mainly in the structure of the project, where the dependencies and the implementation of some libraries were reorganized a little more in order to optimize the API.