Skip to content

TemirlanBasitov/Dynatrace-task-2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynatrace 2023 internship task for backend

1. Introduction

This API provides requested data from http://api.nbp.pl/. Before returning data to user. Application does some manipulation with fetched data. Then provides user by the given instructions.


2. Installation

In order to install this app please click "Code" button and copy link. Then open any IDE which supports Java. Choose clone and put the given link. project folder will be initialzed. Then open "com.dynatrace\com.dynatrace\src\main\java\com\dynatrace" folder and run Application.java file. Before running it make sure that JDK installed on given machine. After successful running you will see this nformatin on the terminal, see below: Снимок экрана (3)


3. Usage

Above java file will run local server on Tomcat, and by default it runs on port:8080. Base url of this api is "/api/exchange". With port number it is "http://localhost:8080/api/exchange".


4. Endpoints

Below on the schema you can see all methods and endpoints with exampels. -{code} is code of currency in international format; -{number} is number of quataion das. For example ../GBP/last/3 means getting GBP currency rates fro last 3 working days Снимок экрана (4)


4. Error handling

Applcation checks correctness of path, currency code, date, table and number of quotations. Below on the table you can see incorrect input and error messages. It checks date provided, its format, also check if it is weekend day or future day. On the next two methods it checks quotation number, it expects 0<N<256 integer number. Снимок экрана (5)

5. Query examples

  1. Get average max and min rates of GBP for last 30 days http://localhost:8080/api/exchange/a/gbp/last/30

  2. Get average rate of CZK for 21 April 2023. http://localhost:8080/api/exchange/a/gbp/2023-04-21

  3. Get major difference in selling and buying prices of AUD for last 2 weeks http://localhost:8080/api/exchange/c/AUD/last/14

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages