hotelspro-client
Hotelspro Api Client
This Python package is automatically generated by the Swagger Codegen project:
- API version: 2.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import hotelspro_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import hotelspro_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import hotelspro_client
from hotelspro_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
hotelspro_client.configuration.username = 'YOUR_USERNAME'
hotelspro_client.configuration.password = 'YOUR_PASSWORD'
hotelspro_client.configuration.host = '' # test or production url should be set
# create an instance of the API class
api_instance = hotelspro_client.DefaultApi()
product_code = 'product_code_example' # str | product code that returned in Search(or Hotel Availability) Response
try:
# Availability with Product Code
api_response = api_instance.availability_product_code_get(product_code)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->availability_product_code_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://localhost/api/v2
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | availability_product_code_get | GET /availability/{product_code} | Availability with Product Code |
DefaultApi | book_provision_code_post | POST /book/{provision_code} | Book with Provision Code |
DefaultApi | bookings_booking_code_get | GET /bookings/{booking_code} | Get Booking Detail |
DefaultApi | bookings_get | GET /bookings/ | Get Booking List |
DefaultApi | cancel_booking_code_post | POST /cancel/{booking_code} | Cancel Booking with Booking Code |
DefaultApi | hotel_availability_get | GET /hotel-availability/ | Hotel Availability with Hotel Code and Search Code |
DefaultApi | provision_product_code_post | POST /provision/{product_code} | Provision with Product Code |
DefaultApi | search_post | POST /search/ | Search with Hotel Code(Hotel Code List) or Destination Code or Geolocation |
Documentation For Models
- AvailabilityResponse
- BookResponse
- BookResponseConfirmationNumbers
- BookResponseHotelPaymentInfo
- BookResponseRooms
- BookingListResponse
- CancelResponse
- Error
- ErrorDetail
- ErrorDetails
- ErrorDetailsDetail
- HotelAvailabilityResponse
- Pax
- Policy
- Product
- ProvisionResponse
- Results
- Room
- SearchResponse
Documentation For Authorization
basicAuth
- Type: HTTP basic authentication