-
Notifications
You must be signed in to change notification settings - Fork 5
/
bc-ferry-api.yaml
138 lines (123 loc) · 3.12 KB
/
bc-ferry-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
openapi: 3.0.0
info:
title: BC Ferries API
description: |
Retrieve current data on BC Ferries sailings.
Here are the codes for locations.
"TSA" -> Tsawwassen
"SWB" -> Swartz Bay
"SGI" -> Southern Gulf Islands
"DUK" -> Duke Point (Nanaimo)
"FUL" -> Fulford Harbour (Salt Spring Island)
"HSB" -> Horseshoe Bay
"NAN" -> Departure Bay (Nanaimo)
"LNG" -> Langford
"BOW" -> Bowen Island
version: 1.0.0
servers:
- url: https://www.bcferriesapi.ca
paths:
/api/{departure}/{destination}/:
get:
summary: Retrieve BC Ferries sailings data
description: |
Retrieve BC Ferries sailings data.
Destination terminal must correspond with departure terminal, for example you can't put tsawwassen to langdale, it will return an error.
"TSA": [
"SWB"
"SGI"
"DUK"
]
"SWB": [
"TSA"
"FUL"
"SGI"
]
"HSB": [
"NAN"
"LNG"
"BOW"
]
"DUK": [
"TSA"
]
"LNG": [
"HSB"
]
"NAN": [
"HSB"
]
"FUL": [
"SWB"
]
"BOW": [
"HSB"
]
operationId: getSailingsDataFromDepartureToDestination
parameters:
- in: path
name: departure
required: true
description: The departure terminal code
schema:
type: string
enum: [TSA, SWB, HSB, DUK, LNG, NAN, FUL, BOW]
- in: path
name: destination
required: true
description: The destination terminal code
schema:
type: string
enum:
- TSA
- SWB
- SGI
- DUK
- FUL
- HSB
- NAN
- LNG
- BOW
responses:
200:
description: OK
400:
description: Invalid input
404:
description: Data not found
500:
description: Internal server error
/api/{departure}/:
get:
summary: Retrieve all BC Ferries sailings data for a departure terminal
description: Retrieve all BC Ferries sailings data for a departure terminal
operationId: getSailingsDataFromDeparture
parameters:
- in: path
name: departure
required: true
description: The departure terminal code
schema:
type: string
enum: [TSA, SWB, HSB, DUK, LNG, NAN, FUL, BOW]
responses:
200:
description: OK
400:
description: Invalid input
404:
description: Data not found
500:
description: Internal server error
/api/:
get:
summary: Retrieve full schedule for all terminals
description: Retrieve full schedule for all terminals
operationId: getSailingsData
responses:
200:
description: OK
404:
description: Data not found
500:
description: Internal server error