lfnascimento / valkyrie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT GitHub release (latest by date)

Valkyrie - Best Available Seats

Screen Shot 2020-08-02 at 19 03 17

To run this project you need to have:

  • Docker

Setup the project locally

$ git clone https://github.com/lfnascimento/valkyrie.git
$ cd valkyrie
$ docker-compose up
$ docker-compose run vk-api bin/setup

Running the project

Using API

To find the best open seat should be sent a POST request to /api/v1/venue/lookup_best_available_seats with a list of available seats, number of rows and columns of a venue as json

Example:

{
  "venue": {
    "layout": {
      "rows": 7,
      "columns": 10
    }
  },
  "seats": [
    {
      "id": "a1",
      "row": "a",
      "column": 1,
      "status": "AVAILABLE"
    },
    {
      "id": "b4",
      "row": "b",
      "column": 4,
      "status": "AVAILABLE"
    },
    {
      "id": "g7",
      "row": "g",
      "column": 7,
      "status": "AVAILABLE"
    }
  ]
}

If a group of seats is requested, the request needs the party_of param

Please check the examples out

About


Languages

Language:Ruby 60.0%Language:TypeScript 16.4%Language:JavaScript 11.0%Language:HTML 7.7%Language:CSS 3.9%Language:Dockerfile 1.1%