Coder Social home page Coder Social logo

expenses-tracker's Introduction

Expenses tracker

Technologies

Endpoints

  • GET /api/expense

Endpoint description:

Response type Controller method Description OK code
Expense[] getAllExpenses() Get all expenses 200

Response example:

[
    {
        "id": "64bbe71c5686733de69370b9",
        "name": "Netflix",
        "category": "ENTERTAINMENT",
        "amount": 20
    },
    {
        "id": "64bbf18334eac8418631fc11",
        "name": "Movie Tickets",
        "category": "ENTERTAINMENT",
        "amount": 50
    },
    {
        "id": "64bbf18334eac8418631fc12",
        "name": "Dinner",
        "category": "RESTAURANT",
        "amount": 10
    },
    {
        "id": "64bbf18334eac8418631fc13",
        "name": "Netflix",
        "category": "ENTERTAINMENT",
        "amount": 30
    },
    {
        "id": "64bbf18334eac8418631fc14",
        "name": "Gym",
        "category": "MISC",
        "amount": 70
    },
    {
        "id": "64bbf18334eac8418631fc15",
        "name": "Internet",
        "category": "UTILITIES",
        "amount": 5
    }
]

  • POST /api/expense

Endpoint description:

Controller method Request body Response body Description OK code
addExpense() Expense Empty Add new expense 201

  • PUT /api/expense

Endpoint description:

Controller method Request body Response body Description OK code
updateExpense() Expense Empty Update expense by id in req body 200

  • GET /api/expense/{name}

Path variables:

Name Required Type Description
name required string Name of expense

Endpoint description:

Controller method Response body Description OK code
getExpenseByName() Expense Get expense by id 200

Response example:

GET /api/expense/Internet

{
    "id": "64bbf18334eac8418631fc15",
    "name": "Internet",
    "category": "UTILITIES",
    "amount": 5
}

  • DELETE /api/expense/{id}

Path variables:

Name Required Type Description
id required string Id of expense

Endpoint description:

Controller method Response body Description OK code
deleteExpense() Empty Get expense by id 204

Project types

  • Expense:

Name Required Type Description
id only in response string Id of expense
name required string Name of expense
category required ExpenseCategory Category of expense
amount required BigDecimal Expense amount
  • Enum ExpenseCategory:

Field
ENTERTAINMENT
GROCERIES
RESTAURANT
UTILITIES
MISC

expenses-tracker's People

Contributors

havrydotdev avatar

Stargazers

Anton avatar  avatar  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.