Giter Club home page Giter Club logo

currencyconverterapi's Introduction

API is intended to Convert Currencies

The purpose of this project is to meet the challenge of the company JAYA

This WEB API was developed in .NET 5 using the IDE Microsoft Visual Studio Community 2019, with the in-memory database and EntityFramework to save all transactions performed, the unit and integration tests, xUnit was used with FluentAssertions and Mock, as it was a challenge for the company and for me, I decided to use frameworks I wasn't familiar with, like .NET 5, Swagger, xUnit, FluentAssertions and Serilog

The features are :

CreateTransaction : Creates a new currency conversion transaction according to source currency to destination currency

GetAllTransactionsByUserId : Fetch all transactions for a given user

How to Run?

You will need .NET 5 and Visual Studio Community 2019

Inside the IDE

Select the CurrencyConverterAPI project and run it as CurrencyConverterAPI, it will automatically open the browser according to the port marked in Properties/launchSettings.json

Alt text

Alt text

https://localhost:5001/swagger/index.html

It can also be run by IIS, it will also automatically open the browser according to the port marked in Properties/launchSettings.json

Alt text

Alt text

https://localhost:44339/swagger/index.html

External API

As this project needs an External API to fetch currency quotes, where you can easily create a free account and get the access token at https://exchangeratesapi.io/

Alt text

Once the account is created on the External API website, change the configuration in appsettings.json/appsettings.Development.json

Alt text

Change the value of the "ACCESS_KEY" property to your new access token as shown in the image above

Currency Converter API

CurrencyConverterAPI requires currencies to be passed with ISO 4217 standard code at ISO_2417 and may return some fault codes such as:

  • 1001 - User does not exist
  • 1002 - Exchangeratesapi API error (used to fetch factors)
  • 1003 - Field {field} must be greater than 0
  • 1004 - Need to inform a currency of origin/destination
  • 1005 - Invalid currency(s) for conversion {currency}

Alt text

currencyconverterapi's People

Contributors

danielfilippo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.