Skip to content

CC22-HO01-TravelokaSigapore-HotelRanks/Hotel-Ranking-Calculation-Endpoint

Repository files navigation

Hotel Ranking Calculation API

This is an endpoint for api for all our hotel ranking scripts.

Information Value
Docker Image kaenova/traveloka-hotel-ranking
Port Open 8001

Environment Variables

Variables Description
DB_USER Database Username
DB_PASSWORD Database Password
DB_HOST Database IP Address or Host name
DB_PORT Database Port
DB_NAME Database Name
DB_CON_STRING Database Connection String (if used, will ignore all DB ENV above)

APIs

Hotel Similarity API

Hotel similarity endpoint based on almost all columns except "name", "neighborhood", "type_nearby_destination", "image_links", "id".

Endpoint Input Output
POST /hotel-similarity/{hotel_id} - List of Hotel ID (Currently hardcoded to give 10 recommendation)

Example: If Success:
image

If Hotel Ids is not cached in ML Endpoint or Cannot be Processed for Hotel Similarity:
image

Collaborative Sentiment Filtering API

A recommendation system based on weighted similarity sentiment reivews

Endpoint Input Output
POST /sentiment-similarity/{user_id} - List of Hotel ID with number hotel recommendation ranged from 0 to 10

Please Be Aware that the recommendation is not always give 10 ids of hotels.
Example:
If Success:
image

If Success but No Recommendation Because of all hotels is been reviewed by the user:
image

IF User IDs not Found:
image

Trending Recommendation API

Trending Recommendation endpoint is based on the number of reviews and its average rating with the formulation of then end score: number of reviews * (average rating * 1.2), the output would be a list of Hotel ID sorted from having the best to the worst score

Endpoint Input Output
POST /trending_system/ - -

Example: If Success:
image

Near You API

Near You API endpoint is based on user's position, and it will show several hotels that are near the user's location.

Endpoint Input Output
POST /trending_system/ - -

Example: If Success:
image

Force Caching API

If you want to force caching in the ML endpoint, just hit this method.

Endpoint Input Output
POST /re-cached/ - Text

Example:
image

Check Rows Cached

If you want to check how many rows cached

Endpoint Input Output
GET /rows-cached/ - Dictionary

Example:
image

Notes

All system error on ML sides will give you a 500: Internal Server Error status.

CC22-HO01 ML Teams.

About

A stateless endpoint of our system to calculate and filter hotel rankings

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •