Giter Club home page Giter Club logo

hotel's Introduction

hotel

A test application to operate a hotel booking system.
Each response from the server contains hyper links to available actions with the returned resource.

Start: mvn install, spring-boot:run

Application has the following endpoints:

Manipulating rooms

1. Get all available rooms
if parameters like -start-, -end- are not present, then all rooms are displayed

http://localhost:8080/rooms
method: GET
accepts parameters:
start - date in format YYYY-MM-DD (optional)
end - date in format YYYY-MM-DD (optional)
category - SINGLE, DOUBLE, FAMILY, PRESIDENT (optional)

2. Get room by id

http://localhost:8080/rooms/{id}
method: GET
accepts parameters:
{id} - alpha numeric value of room's id (required)

Manipulating user

1. Get information for the registration page

http://localhost:8080/users/register
method GET

2. Register user

http://localhost:8080/users/register
method POST
accepts parameters:
Content-Type - application/json - representation of a user (required)
{ "userName": "username", "password": "password", "firstName": "First", "lastName": "Last" }

3. Get information for the login page

http://localhost:8080/users/login
method GET

4. Login user

http://localhost:8080/users/login
method POST
accepts parameters:
userName - username (required)
password - password (required)

5. Get user by id

http://localhost:8080/users/{id}
method: GET
accepts parameters:
{id} - alpha numeric value of user's id (required)

4. Get bookings for a specified user

http://localhost:8080/users/{id}/bookings
method GET
accepts parameters:
{id} - alpha numeric value of user's id (required)

Manipulating bookings

1. Get a list of all bookings

http://localhost:8080/bookings
method: GET

2. Get information for a new booking page

http://localhost:8080/bookings/new
method: GET

3. Get booking by id

http://localhost:8080/bookings/{id}
method: GET
accepts parameters:
{id} - alpha numeric value of booking's id (required)

4. Get booking price

http://localhost:8080/bookings/price
method: GET
accepts parameters:
start - date in format YYYY-MM-DD (required)
end - date in format YYYY-MM-DD (required)
roomId - alpha numeric value of room's id (required)
services - an array of additional service's ids in format {1,2,...} (optional)

5. Book a room
Booking a room requires login

http://localhost:8080/bookings
method: POST
accepts parameters:
start - date in format YYYY-MM-DD (required)
end - date in format YYYY-MM-DD (required)
roomId - alpha numeric value of room's id (required)
services - an array of additional service's ids in format {1,2,...} (optional)

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.