-
Notifications
You must be signed in to change notification settings - Fork 1
Plan & Recommendation
Muhammad Azhim Nugroho edited this page Jun 21, 2024
·
6 revisions
This wiki page stores plan & recommendation APIs.
This API was made by machine learning team using python and Flask API framework. The base URL used for this API is different, please ask the cloud computing team for more information.
- Endpoint:
/plan - HTTP Method:
POST - Authentication: Not Required
Query Parameters:
-
city (string): Name of the city with each word capitalized. (e.g.,
Jakarta,New York) -
categories:
-
alam(float): Rating for nature-related places, ranging from 0 to 5. -
belanja(float): Rating for shopping-related places, ranging from 0 to 5. -
budaya(float): Rating for culture-related places, ranging from 0 to 5. -
keluarga(float): Rating for family-related places, ranging from 0 to 5. -
relaksasi(float): Rating for relaxation-related places, ranging from 0 to 5. -
sejarah(float): Rating for historical places, ranging from 0 to 5.
-
- days (integer): Number of days for which the recommendations are needed.
Example Request:
GET /plan?city=Jakarta&categories=alam:1,belanja:1,budaya:3,keluarga:4,relaksasi:5,sejarah:3&days=5 HTTP/1.1
Example Response:
Status Code: 200
{
"day_plans": [
"Day 1:\n - Monumen Nasional\n - Museum Tekstil\n",
"Day 2:\n - Taman Lapangan Banteng\n - Klenteng Jin De Yuan\n",
"Day 3:\n - Museum Sumpah Pemuda\n - Pantai Ancol\n",
"Day 4:\n - Tugu Proklamasi\n - Taman Ayodya\n",
"Day 5:\n - Museum Sasmita Loka Ahmad Yani\n - Taman Legenda Keong Emas\n"
]
}- Endpoint:
/recommend - HTTP Method:
GET - Authentication: Not Required
Query Parameters:
-
city (string): Name of the city with each word capitalized. (e.g.,
Jakarta,New York) -
categories:
-
alam(float): Rating for nature-related places, ranging from 0 to 5. -
belanja(float): Rating for shopping-related places, ranging from 0 to 5. -
budaya(float): Rating for culture-related places, ranging from 0 to 5. -
keluarga(float): Rating for family-related places, ranging from 0 to 5. -
relaksasi(float): Rating for relaxation-related places, ranging from 0 to 5. -
sejarah(float): Rating for historical places, ranging from 0 to 5.
-
- days (integer): Number of days for which the recommendations are needed.
Example Request:
GET /recommend?city=Jakarta&categories=alam:1,belanja:1,budaya:3,keluarga:4,relaksasi:5,sejarah:3&days=5 HTTP/1.1
Example Response:
Status Code: 200[
{
"Category": "Budaya, Keluarga",
"City": "Jakarta",
"Coordinate": "{'lat': -6.1753924, 'lng': 106.8271528}",
"Place_Name": "Monumen Nasional",
"Price": 20000
},
{
"Category": "Budaya",
"City": "Jakarta",
"Coordinate": "{'lat': -6.204630300000001, 'lng': 106.8365324}",
"Place_Name": "Museum Sasmita Loka Ahmad Yani",
"Price": 2000
},
{
"Category": "Hiburan, Keluarga",
"City": "Jakarta",
"Coordinate": "{'lat': -6.303904200000001, 'lng': 106.8936219}",
"Place_Name": "Taman Legenda Keong Emas",
"Price": 30000
},
"___comment": "and so on and so on"
]