Code Monkey home page Code Monkey logo

currency-aggregator's Introduction

Create DB: {project-dir}/scripts/create_database.sh NOTE: to launch a working DB - docker is a must! If you have a specific address for a database, past it into application.yml into the property of url.

Requests cases:

1)Get specific currency: URL LIKE: http://localhost:8080/currency?type=USD&buying=true&ascend=false METHOD: GET params: type - currency type (from NationalCurrencies names) buying - boolean, if false - will be selling ascend - sort by values(ascend or false - descend)

2)Upload files: URL: http://localhost:8080/files Must be send as a multipart/form-data with file in the parameter with name: "file". METHOD: POST Filetypes allowed: CSV, JSON, XML File must have a name from bank, like: "Bank 1.json" Data in the files must be interpreted as an array. Examples are located in the "data" folder of the project.

3)Change operation allowance or delete any currency by bank: LIKE URL: http://localhost:8080/currency?delete=false METHOD: PUT Content-Type: application/json Body like: {"name":"GBP","action":"SELLING","bank":"Bank 1","allowed":true} Comments: if name is not stated, then all currencies will be targeted, if action is not stated, then all types of action will be targeted, bank must be always present and allowed parameter can be not stated if delete parameter in url is true. Delete parameter is for disabling(alike deletion) of the currencies. If you do not want to state some parameters, just don't write them in the json, like: {"bank":"Bank 1","allowed":false} - in this case all currencies with all actions will be marked as non-operational for Bank 1.

4)Get best prices for all currencies: URL: http://localhost:8080/files METHOD: GET It's better to load via the browser.

5)Change or upload a new data(one per time): URL: http://localhost:8080/currency METHOD: POST DATA LIKE: { "name": "USD", "bank": "Bank 3", "action": "BUYING", "value": "18.05", "allowed": true }

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.