Code Monkey home page Code Monkey logo

exp-recorder's Introduction

exp-recorder

簡易的な家計簿アプリ

API 設計

Django REST framework を使って実装.

出費情報の一覧を取得

  • Request
GET /api/money_record
  • Response
[
    {
        "id": 22,
        "name": "フランクロール",
        "price": 165.0,
        "created_at": "2019/06/22 11:20:55",
        "category": "食費"
    },
    {
        "id": 20,
        "name": "電気代",
        "price": 5731.0,
        "created_at": "2019/06/22 01:53:34",
        "category": "公共料金"
    },
    {
        "id": 19,
        "name": "カツとじ定食",
        "price": 1000.0,
        "created_at": "2019/06/21 23:39:55",
        "category": "食費"
    },
    {
        "id": 8,
        "name": "9番小辛",
        "price": 590.0,
        "created_at": "2019/06/19 20:06:14",
        "category": "飲食料"
    },
    {
        "id": 2,
        "name": "ファミチキ",
        "price": 180.0,
        "created_at": "2019/06/19 00:31:35",
        "category": "飲食料"
    }
]

出費情報の追加

  • Request
POST /api/money_record
Content-type: application/json

{"name":"debug", "price":"100", "category": "debug"}
  • Response
{"id":10,"name":"debug","price":100.0,"created_at":"2019-06-21T06:34:01.561747Z","category":"debug"}

出費情報の詳細の取得

  • Request
GET /api/detail/20
  • Response
{
    "id": 20,
    "name": "電気代",
    "price": 5731.0,
    "created_at": "2019/06/22 01:53:34",
    "category": "公共料金"
}

出費情報の削除

  • Request
DELETE /api/detail/7
  • Response
HTTP 204 No Content
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

出費情報の更新

  • Request
PUT /api/detail/29
Content-type: application/json

{
    "name": "hoge",
    "price": 0,
    "category": "other"
}
  • Response
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 29,
    "name": "hoge",
    "price": 0.0,
    "created_at": "2019/06/22",
    "category": "other"
}

CLI

React を使って実装.

React UI Component Library は Material-UI を採用.

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.