Code Monkey home page Code Monkey logo

bytebank-api's Introduction

Bytebank web API

Web API feita com json-server para consumo do App em Flutter do Bytebank

Funcionalidades

A Web API oferece as seguintes funcionalidades:

  • Listagem e cadastro de transações.

Como executar

Abra o terminal ou prompt e acesse o diretório do projeto, então execute o seguinte comando:

json-server --watch db.json --delay=500 --host=<your_host_ip>

Obs: para saber seu IP, no linux, rode o seguinte comando:

hostname -I | cut -d' ' -f1

Ou você pode juntar em um único comando:

json-server --watch db.json --delay=500 --host=$(hostname -I | cut -d' ' -f1)

Mapeamento de end-points

Para acessar as funcionalidades foram disponibilizados os seguintes end-points:

  • /transactions:

    • GET: Listagem:
    // response example
    [
      {
        "id": 1,
        "value": 200.0,
        "contact": {
          "name": "Yago",
          "accountNumber": 1000
        }
      },
      {
        "id": 2,
        "value": 200.0,
        "contact": {
          "name": "Yago",
          "accountNumber": 1500
        }
      }
    ]
    
    • POST: Inserção:
    // request body example
    {
      "value": 200.0,
      "contact": {
        "name": "Yago",
        "accountNumber": 1000
      }
    }
    
    // response example
    {
      "id": 3,
      "value": 200.0,
      "contact": {
        "name": "Yago",
        "accountNumber": 1000
      }
    }
    

bytebank-api's People

Contributors

yagopessoa avatar

Stargazers

 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.