Code Monkey home page Code Monkey logo

gasolinapp's Introduction

gasolinapp ⛽

Description

A backend application created with NestJs and Typescript.

The app will fetch fuel prices of all gas stations from Spain, will map them to a more friendly entity and will store them into a database.

The app will provide fuel stations through an API depending on their location and filter fuel stations by fuel type.

Docs

Every response will have the same format:

{
  "data": [],
  // or
  "data": {},
  // and aditional information like:
  "page": 2
}

GET /stations

Available stations that the client can ask for.

Query Param Type Description
latitude & longitude long
query string text to search for
fuelType int id of the fuel type
page int

This example shows a response with all the available fields in a station:

{
  "data": [
    {
      "id": 53,
      "name": "Repsol",
      "schedule": "L-D: 24H",
      "postalCode": "01240",
      "address": "CL MANISITU, 9",
      "city": "Alegría-Dulantzi",
      "state": "ÁLAVA",
      "latitude": 42.846028,
      "longitude": -2.509361,
      "fuels": [
        {
          "type": {
            "id": 7,
            "name": "Gasoleo A"
          },
          "price": 1.219
        }
      ]
    }
  ]
}

GET /fuelTypes

Available fuel types with which the client can query the stations.

{
  "data": [
    {
      "id": 7,
      "name": "Gasoleo A"
    },
    {
      "id": 8,
      "name": "Gasolina 98"
    }
  ]
}

gasolinapp's People

Contributors

stanete avatar

Watchers

James Cloos avatar

Forkers

boy12371

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.