UNIST νλ΄ κ΅¬μ±μλ€μ λ²μ€ μ΄μ© μ΄λ €μμ ν΄μνκΈ° μν΄, κΈ°μ‘΄μ 볡μ‘ν μΈμ° λ²μ€μ 보λ₯Ό κ°νΈν μ΄μ©ν μ μλ λ²μ€ μ νΈλ¦¬ν° μλΉμ€μ λλ€.
This feature provides several functionalities related to bus information.
- Route number-based bus information search
- Bus information search based on route number and departure time
- Bus information search based on route number and direction
- Bus information search based on route number, direction, and departure time
This feature provides several functionalities related to bus arrival information.
- Search bus arrival information based on destination
- Search bus arrival information based on destination and departure time
- Search bus arrival information based on destination and desired arrival time
- Search bus arrival information based on destination, desired arrival time, and departure time
This feature provides several functionalities for bus bookmarking.
- Create a bookmark
- Retrieve bookmarks
- Delete a bookmark
-
GET /buses/{routeNumber}
Retrieves bus information based on the route number.
-
GET /buses/{routeNumber}?departureTime={departureTime}
Retrieves bus information based on the route number and departure time.
-
GET /buses/{routeNumber}/{routeDirection}
Retrieves bus information based on the route number and direction.
-
GET /buses/{routeNumber}/{routeDirection}?departureTime={departureTime}
Retrieves bus information based on the route number, direction, and departure time.
-
GET /destinationInfo/{destination}
Retrieves bus arrival information based on the destination.
-
GET /destinationInfo/{destination}?departureTime={departureTime}
Retrieves bus arrival information based on the destination and departure time.
-
GET /destinationInfo/{destination}/until/{arrivalTime}
Retrieves bus arrival information based on the destination and desired arrival time.
-
GET /destinationInfo/{destination}/until/{arrivalTime}?departureTime={departureTime}
Retrieves bus arrival information based on the destination, desired arrival time, and departure time.
-
GET /bookmarks/{userName}
Retrieves bookmarks for the specified user.
-
POST /bookmarks
Creates a new bookmark. (Requires a JSON payload containing
busId
,userName
, anddays
) -
DELETE /bookmarks/{bookmarkId}
Deletes the specified bookmark.
GET /buses/{routeNumber}
curl -X GET "http://localhost:8080/buses/133"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "05:00",
"destinations":["GUYEONG_RI", "ULSAN_TERMINAL"]
}, ...
]
GET /buses/{routeNumber}?departureTime={departureTime}
curl -X GET "http://localhost:8080/buses/133?departureTime=12:00"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "12:15",
"destinations":["GUYEONG_RI", "ULSAN_TERMINAL"]
}, ...
]
GET /buses/{routeNumber}/{routeDirection}
curl -X GET "http://localhost:8080/buses/133/KKOTBAWI"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "05:00",
"destinations":["GUYEONG_RI", "ULSAN_TERMINAL"]
}, ...
]
GET /buses/{routeNumber}/{routeDirection}?departureTime={departureTime}
curl -X GET "http://localhost:8080/buses/133/KKOTBAWI?departureTime=12:00"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "12:15",
"destinations":["GUYEONG_RI", "ULSAN_TERMINAL"]
}, ...
]
GET /destinationInfo/{destination}
curl -X GET "http://localhost:8080/destinationInfos/GUYEONG_RI"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "05:00",
"destination": "GUYEONG_RI",
"arrivalTime": "05:10"
}, ...
]
GET /destinationInfo/{destination}?departureTime={departureTime}
curl -X GET "http://localhost:8080/destinationInfos/GUYEONG_RI?departureTime=12:00"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "12:15",
"destination": "GUYEONG_RI",
"arrivalTime": "12:25"
}, ...
]
GET /destinationInfo/{destination}/until/{arrivalTime}
curl -X GET "http://localhost:8080/destinationInfos/GUYEONG_RI/until/12:16"
Expected output:
[
{
"routeNumber": "133",
"routeDirection": "KKOTBAWI",
"departureTime": "05:00",
"destination": "GUYEONG_RI",
"arrivalTime": "05:10"
}, ...
]
GET /destinationInfo/{destination}/until/{arrivalTime}?departureTime={departureTime}
curl -X GET "http://localhost:8080/destinationInfos/GUYEONG_RI/until/12:16?departureTime=12:00"
Expected output:
[
{
"routeNumber": "733",
"routeDirection": "DEOKHA_GARAGE",
"departureTime": "12:00",
"destination": "GUYEONG_RI",
"arrivalTime": "12:10"
},
{
"routeNumber": "337",
"routeDirection": "TAEWHA_RIVER",
"departureTime": "12:00",
"destination": "GUYEONG_RI",
"arrivalTime": "12:10"
}
]
GET /bookmarks/{userName}
curl -X GET "http://localhost:8080/bookmarks/Gibeom"
Expected output: (If the target bookmark exists. i. e. After run example of POST method)
[
{
"userName": "Gibeom",
"days":["SUN"],
"busInfo": {
"routeNumber": "733",
"routeDirection": "DEOKHA_GARAGE",
"departureTime": "19:30",
"destinations": [
"GUYEONG_RI", "ULSAN_UNIVERSITY","SINBOK_ROTARY",
"SEONGNAM",
"SAMSAN"
]
}
}
]
If bookmark not exists, return status 404.
POST /bookmarks
curl -X POST "http://localhost:8080/bookmarks" \
-H "Content-Type: application/json" \
-d '{"busId": 124, "userName": "Gibeom", "days": ["SUN"]}'
Expected output:
{
"userName": "Gibeom",
"days":["SUN"],
"busInfo": {
"routeNumber": "733",
"routeDirection": "DEOKHA_GARAGE",
"departureTime": "19:30",
"destinations": [
"GUYEONG_RI",
"ULSAN_UNIVERSITY",
"SINBOK_ROTARY",
"SEONGNAM",
"SAMSAN"
]
}
}
DELETE /bookmarks/{bookmarkId}
curl -X DELETE "http://localhost:8080/bookmarks/0"
Expected output:
- No content. If the bookmark is successfully deleted, return status 204.