Giter Club home page Giter Club logo

htapi's Introduction

Htapi

Hotel API

Code of REST-API of The data model:

{
  "hotels": {
    "hotel_id": {
      "name": "",
      "photos_url": ["url1", "url2", "..."],
      "ground": "G+1",
      "city": "",
      "approximate_location": "",
      "google_map_location_url": "",
      "latitude": "",
      "longitude": "",
      "price_range": {
        "min": "",
        "max": ""
      },
      "additional_services": ["service1", "service2", "..."],
      "rooms": [
        {
          "room_id": "",
          "room_type": "",
          "room_area": "",
          "room_pricing": "",
          "room_photos": ["url1", "url2", "..."],
          "additional_services": ["service1", "service2", "..."],
          "other_description": ""
        }
      ],
      "other_description": ""
    }
  }
}

The hotels object includes fields like photos_url, ground, city, approximate_location, google_map_location_url, latitude, longitude, price_range, additional_services, and other_description. The rooms object includes room_type, room_area, room_pricing, room_photos, additional_services & other_description fields.

The endpoints:

  1. GET /hotels - Returns a list of all hotels
  2. GET /hotels/{hotel_id} - Returns details for a specific hotel
  3. POST /hotels - Creates a new hotel with the provided details
  4. PUT /hotels/{hotel_id} - Updates the details for a specific hotel
  5. DELETE /hotels/{hotel_id} - Deletes a specific hotel
  6. GET /hotels/{hotel_id}/rooms - Returns a list of all rooms for a specific hotel
  7. GET /hotels/{hotel_id}/rooms/{room_id} - Returns details for a specific room in a specific hotel
  8. POST /hotels/{hotel_id}/rooms - Creates a new room for a specific hotel with the provided details
  9. PUT /hotels/{hotel_id}/rooms/{room_id} - Updates the details for a specific room in a specific hotel
  10. DELETE /hotels/{hotel_id}/rooms/{room_id} - Deletes a specific room in a specific hotel
  11. GET /hotels/search?query={search_query} - Returns a list of hotels that match the search query.

htapi's People

Contributors

gladsonchala avatar

Stargazers

 avatar

Watchers

 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.