Giter Site home page Giter Site logo

berat_badan_go's Introduction

POST COLLECTION

    #you can import post collection with this link
    https://www.getpostman.com/collections/ff501dfdf0a0997f939a

Cara Menggunakan unit testing

    - Jalankan Terlebih dahulu main.go
    - Masuk kedalam folder test 
    - kemudian Ketikan perintah berikut :
        - go test -v -run=TestTambahBerat
        - go test -v -run=TestUpdateBerat
        - go test -v -run=TestDetailBerat
        - go test -v -run=TestIndexBerat
        - go test -v -run=TestHapusBerat

Api Spesification

Tambah Berat

Request :

  • Method : POST
  • Endpoint : /tambah_berat
  • Body : Form-Data
{
    params[tanggal]:2019-08-06
    params[max_berat]:50
    params[min_berat]:48
}

Response :

{
    {
    "message": "Berhasil Disimpan",
    "response": {
        "Tanggal": "2019-08-06",
        "Max": 50,
        "Min": 48,
        "Perbedaan": 2
    },
    "status": 200
    }
}

Update Berat

Request :

  • Method : POST
  • Endpoint : /update_berat
  • Body : Form-Data
{
    params[tanggal]:2019-08-06
    params[max_berat]:55
    params[min_berat]:48
}

Response :

{
    {
    "message": "Berhasil Di ubah",
    "response": {
        "Tanggal": "2019-08-05",
        "Max": 55,
        "Min": 48,
        "Perbedaan": 7
    },
    "status": 200
    }
}

Detail Berat

Request :

  • Method : POST
  • Endpoint : /detail_berat
  • Body : Form-Data
{
    params[tanggal]:2019-08-06
}

Response :

{
    {
    "response": [
        {
            "Tanggal": "2019-08-06",
            "Max": 50,
            "Min": 48,
            "Perbedaan": 2
        }
    ],
    "status": 200
    }
}

Index Berat

Request :

  • Method : POST
  • Endpoint : /index_berat
  • Body :

Response :

{
    {
    "response": {
        "BeratBadan": [
            {
                "Tanggal": "2019-08-23",
                "Max": 50,
                "Min": 49,
                "Perbedaan": 1
            },
            {
                "Tanggal": "2019-08-06",
                "Max": 50,
                "Min": 48,
                "Perbedaan": 2
            },
            {
                "Tanggal": "2019-08-05",
                "Max": 55,
                "Min": 48,
                "Perbedaan": 7
            }
        ],
        "RataRataBerat": {
            "Max": 51,
            "Min": 48,
            "Perbedaan": 3
        }
    },
    "status": 200
    }
}

Hapus Berat

Request :

  • Method : POST
  • Endpoint : /hapus_berat
  • Body : Form-Data
{
    params[tanggal]:2019-08-06
}

Response :

{
    {
    "message": "Berhasil Di hapus",
    "response": {
        "Tanggal": "2019-08-06"
    },
    "status": 200
    }
}

berat_badan_go's People

Contributors

pray123 avatar

Watchers

James Cloos avatar Fandy avatar Prayugo Dwi 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.