Coder Social home page Coder Social logo

coinbank's Introduction

Java coding test

A Java coding skill test.

Requirements

docker docker-compose

How to build

  • Close previous running container: -> docker-compose down
  • Build jar file: -> mvn clean install
  • Build and execute docker image: -> docker-compose up --build -d

I/Fs specification:

1. {{end-point}}/coin/deposit

Request

curl --location --request POST 'localhost:8080/coin/deposit' \
--header 'Content-Type: application/json' \
--data-raw '{
    "datetime": "2019-10-05T15:40:01+05:30",
    "amount": 1001
}'

Response

{
    "amount": 1001.0,
    "datetime": "2019-10-05T15:40:01+05:30"
}

2. {{end-point}}/coin/list

Request

curl --location --request POST 'localhost:8080/coin/list' \
--header 'Content-Type: application/json' \
--data-raw '{
   "startDatetime": "2019-10-05T07:40:00+04:00",
   "endDatetime": "2019-10-05T09:40:04+01:00"
}'

Response

{
    "content": [
        {
            "balance": 1264.0,
            "datetime": "2019-10-05T08:00:00Z"
        },
        {
            "balance": 4414.0,
            "datetime": "2019-10-05T09:00:00Z"
        }
    ],
    "pageable": {
        "sort": {
            "sorted": false,
            "unsorted": true,
            "empty": true
        },
        "pageNumber": 0,
        "pageSize": 20,
        "offset": 0,
        "paged": true,
        "unpaged": false
    },
    "last": true,
    "totalPages": 1,
    "totalElements": 2,
    "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
    },
    "first": true,
    "number": 0,
    "numberOfElements": 2,
    "size": 20,
    "empty": false
}

coinbank's People

Contributors

samirjha123 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.