Skip to content

Commit 3be6a5f

Browse files
committed
feat(pagination): add missing parameters
Changelog: * Update Arrivals API * Update Departures API * Update Stop Schedules API * Update Route Schedules API * Update Terminus Schedules API
1 parent ccc1c08 commit 3be6a5f

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

navitia_client/client/apis/arrival_apis.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def list_arrivals_by_region_id_and_path(
8080
from_datetime: datetime = datetime.now(),
8181
duration: int = 86400,
8282
depth: int = 1,
83+
count: int = 10,
8384
forbidden_uris: Optional[Sequence[str]] = None,
8485
data_freshness: str = "realtime",
8586
disable_geojson: bool = False,
@@ -100,6 +101,8 @@ def list_arrivals_by_region_id_and_path(
100101
The duration in seconds for which to fetch arrivals (default is 86400 seconds).
101102
depth : int, optional
102103
The depth of the search (default is 1).
104+
count : int, optional
105+
Maximum number of results (default is 10).
103106
forbidden_uris : Optional[Sequence[str]], optional
104107
A list of URIs to exclude from the search (default is None).
105108
data_freshness : str, optional
@@ -120,6 +123,7 @@ def list_arrivals_by_region_id_and_path(
120123
"from_datetime": from_datetime,
121124
"duration": duration,
122125
"depth": depth,
126+
"count": count,
123127
"disable_geojson": disable_geojson,
124128
"forbidden_uris[]": forbidden_uris,
125129
"data_freshness": data_freshness,
@@ -137,6 +141,7 @@ def list_arrivals_by_coordinates(
137141
from_datetime: datetime = datetime.now(),
138142
duration: int = 86400,
139143
depth: int = 1,
144+
count: int = 10,
140145
forbidden_uris: Optional[Sequence[str]] = None,
141146
data_freshness: str = "realtime",
142147
disable_geojson: bool = False,
@@ -161,6 +166,8 @@ def list_arrivals_by_coordinates(
161166
The duration in seconds for which to fetch arrivals (default is 86400 seconds).
162167
depth : int, optional
163168
The depth of the search (default is 1).
169+
count : int, optional
170+
Maximum number of results (default is 10).
164171
forbidden_uris : Optional[Sequence[str]], optional
165172
A list of URIs to exclude from the search (default is None).
166173
data_freshness : str, optional
@@ -182,6 +189,7 @@ def list_arrivals_by_coordinates(
182189
"from_datetime": from_datetime,
183190
"duration": duration,
184191
"depth": depth,
192+
"count": count,
185193
"disable_geojson": disable_geojson,
186194
"forbidden_uris[]": forbidden_uris,
187195
"data_freshness": data_freshness,

navitia_client/client/apis/departure_apis.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def list_departures_by_region_id_and_path(
101101
from_datetime: datetime = datetime.now(),
102102
duration: int = 86400,
103103
depth: int = 1,
104+
count: int = 10,
104105
forbidden_uris: Optional[Sequence[str]] = None,
105106
data_freshness: str = "realtime",
106107
disable_geojson: bool = False,
@@ -121,6 +122,8 @@ def list_departures_by_region_id_and_path(
121122
The duration for which to fetch departures, in seconds (default is 86400 seconds, i.e., 1 day).
122123
depth : int, optional
123124
The depth of the search (default is 1).
125+
count : int, optional
126+
Maximum number of results (default is 10).
124127
forbidden_uris : Optional[Sequence[str]], optional
125128
A list of URIs to exclude from the search (default is None).
126129
data_freshness : str, optional
@@ -141,6 +144,7 @@ def list_departures_by_region_id_and_path(
141144
"from_datetime": from_datetime,
142145
"duration": duration,
143146
"depth": depth,
147+
"count": count,
144148
"disable_geojson": disable_geojson,
145149
"forbidden_uris[]": forbidden_uris,
146150
"data_freshness": data_freshness,
@@ -158,6 +162,7 @@ def list_departures_by_coordinates(
158162
from_datetime: datetime = datetime.now(),
159163
duration: int = 86400,
160164
depth: int = 1,
165+
count: int = 10,
161166
forbidden_uris: Optional[Sequence[str]] = None,
162167
data_freshness: str = "realtime",
163168
disable_geojson: bool = False,
@@ -182,6 +187,8 @@ def list_departures_by_coordinates(
182187
The duration for which to fetch departures, in seconds (default is 86400 seconds, i.e., 1 day).
183188
depth : int, optional
184189
The depth of the search (default is 1).
190+
count : int, optional
191+
Maximum number of results (default is 10).
185192
forbidden_uris : Optional[Sequence[str]], optional
186193
A list of URIs to exclude from the search (default is None).
187194
data_freshness : str, optional
@@ -202,6 +209,7 @@ def list_departures_by_coordinates(
202209
"from_datetime": from_datetime,
203210
"duration": duration,
204211
"depth": depth,
212+
"count": count,
205213
"disable_geojson": disable_geojson,
206214
"forbidden_uris[]": forbidden_uris,
207215
"data_freshness": data_freshness,

navitia_client/client/apis/route_schedules_apis.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def list_route_schedules_by_region_id_and_path(
8787
from_datetime: datetime = datetime.now(),
8888
duration: int = 86400,
8989
depth: int = 1,
90+
count: int = 10,
91+
start_page: int = 0,
9092
items_per_schedule: int = 1,
9193
forbidden_uris: Optional[Sequence[str]] = None,
9294
data_freshness: str = "base_schedule",
@@ -102,6 +104,8 @@ def list_route_schedules_by_region_id_and_path(
102104
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
103105
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
104106
depth (int, optional): The depth of data to retrieve. Defaults to 1.
107+
count (int, optional): Maximum number of results. Defaults to 10.
108+
start_page (int, optional): The page number to start from. Defaults to 0.
105109
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
106110
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
107111
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "base_schedule".
@@ -117,6 +121,8 @@ def list_route_schedules_by_region_id_and_path(
117121
"from_datetime": from_datetime,
118122
"duration": duration,
119123
"depth": depth,
124+
"count": count,
125+
"start_page": start_page,
120126
"items_per_schedule": items_per_schedule,
121127
"disable_geojson": disable_geojson,
122128
"forbidden_uris[]": forbidden_uris,
@@ -135,6 +141,8 @@ def list_route_schedules_by_coordinates(
135141
from_datetime: datetime = datetime.now(),
136142
duration: int = 86400,
137143
depth: int = 1,
144+
count: int = 10,
145+
start_page: int = 0,
138146
items_per_schedule: int = 1,
139147
forbidden_uris: Optional[Sequence[str]] = None,
140148
data_freshness: str = "base_schedule",
@@ -152,6 +160,8 @@ def list_route_schedules_by_coordinates(
152160
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
153161
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
154162
depth (int, optional): The depth of data to retrieve. Defaults to 1.
163+
count (int, optional): Maximum number of results. Defaults to 10.
164+
start_page (int, optional): The page number to start from. Defaults to 0.
155165
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
156166
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
157167
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "base_schedule".
@@ -167,6 +177,8 @@ def list_route_schedules_by_coordinates(
167177
"from_datetime": from_datetime,
168178
"duration": duration,
169179
"depth": depth,
180+
"count": count,
181+
"start_page": start_page,
170182
"items_per_schedule": items_per_schedule,
171183
"disable_geojson": disable_geojson,
172184
"forbidden_uris[]": forbidden_uris,

navitia_client/client/apis/stop_schedules_apis.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def list_stop_schedules_by_coordinates(
9393
from_datetime: datetime = datetime.now(),
9494
duration: int = 86400,
9595
depth: int = 1,
96+
count: int = 10,
97+
start_page: int = 0,
9698
items_per_schedule: int = 1,
9799
forbidden_uris: Optional[Sequence[str]] = None,
98100
data_freshness: str = "realtime",
@@ -110,6 +112,8 @@ def list_stop_schedules_by_coordinates(
110112
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
111113
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
112114
depth (int, optional): The depth of data to retrieve. Defaults to 1.
115+
count (int, optional): Maximum number of results. Defaults to 10.
116+
start_page (int, optional): The page number to start from. Defaults to 0.
113117
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
114118
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
115119
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "realtime".
@@ -125,6 +129,8 @@ def list_stop_schedules_by_coordinates(
125129
"from_datetime": from_datetime,
126130
"duration": duration,
127131
"depth": depth,
132+
"count": count,
133+
"start_page": start_page,
128134
"items_per_schedule": items_per_schedule,
129135
"disable_geojson": disable_geojson,
130136
"forbidden_uris[]": forbidden_uris,
@@ -141,6 +147,8 @@ def list_stop_schedules_by_region_id_and_path(
141147
from_datetime: datetime = datetime.now(),
142148
duration: int = 86400,
143149
depth: int = 1,
150+
count: int = 10,
151+
start_page: int = 0,
144152
items_per_schedule: int = 1,
145153
forbidden_uris: Optional[Sequence[str]] = None,
146154
data_freshness: str = "realtime",
@@ -156,6 +164,8 @@ def list_stop_schedules_by_region_id_and_path(
156164
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
157165
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
158166
depth (int, optional): The depth of data to retrieve. Defaults to 1.
167+
count (int, optional): Maximum number of results. Defaults to 10.
168+
start_page (int, optional): The page number to start from. Defaults to 0.
159169
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
160170
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
161171
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "realtime".
@@ -171,6 +181,8 @@ def list_stop_schedules_by_region_id_and_path(
171181
"from_datetime": from_datetime,
172182
"duration": duration,
173183
"depth": depth,
184+
"count": count,
185+
"start_page": start_page,
174186
"items_per_schedule": items_per_schedule,
175187
"disable_geojson": disable_geojson,
176188
"forbidden_uris[]": forbidden_uris,

navitia_client/client/apis/terminus_schedules_apis.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def list_terminus_schedules_by_region_id_and_path(
9595
from_datetime: datetime = datetime.now(),
9696
duration: int = 86400,
9797
depth: int = 1,
98+
count: int = 10,
99+
start_page: int = 0,
98100
items_per_schedule: int = 1,
99101
forbidden_uris: Optional[Sequence[str]] = None,
100102
data_freshness: str = "realtime",
@@ -110,6 +112,8 @@ def list_terminus_schedules_by_region_id_and_path(
110112
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
111113
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
112114
depth (int, optional): The depth of data to retrieve. Defaults to 1.
115+
count (int, optional): Maximum number of results. Defaults to 10.
116+
start_page (int, optional): The page number to start from. Defaults to 0.
113117
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
114118
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
115119
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "realtime".
@@ -125,6 +129,8 @@ def list_terminus_schedules_by_region_id_and_path(
125129
"from_datetime": from_datetime,
126130
"duration": duration,
127131
"depth": depth,
132+
"count": count,
133+
"start_page": start_page,
128134
"items_per_schedule": items_per_schedule,
129135
"disable_geojson": disable_geojson,
130136
"forbidden_uris[]": forbidden_uris,
@@ -143,6 +149,8 @@ def list_terminus_schedules_by_coordinates(
143149
from_datetime: datetime = datetime.now(),
144150
duration: int = 86400,
145151
depth: int = 1,
152+
count: int = 10,
153+
start_page: int = 0,
146154
items_per_schedule: int = 1,
147155
forbidden_uris: Optional[Sequence[str]] = None,
148156
data_freshness: str = "realtime",
@@ -160,6 +168,8 @@ def list_terminus_schedules_by_coordinates(
160168
from_datetime (datetime, optional): The start datetime for the schedule. Defaults to datetime.now().
161169
duration (int, optional): The duration of the schedule in seconds. Defaults to 86400.
162170
depth (int, optional): The depth of data to retrieve. Defaults to 1.
171+
count (int, optional): Maximum number of results. Defaults to 10.
172+
start_page (int, optional): The page number to start from. Defaults to 0.
163173
items_per_schedule (int, optional): The number of items per schedule. Defaults to 1.
164174
forbidden_uris (Optional[Sequence[str]], optional): Forbidden URIs. Defaults to None.
165175
data_freshness (str, optional): The freshness of data to retrieve. Defaults to "realtime".
@@ -176,6 +186,8 @@ def list_terminus_schedules_by_coordinates(
176186
"from_datetime": from_datetime,
177187
"duration": duration,
178188
"depth": depth,
189+
"count": count,
190+
"start_page": start_page,
179191
"items_per_schedule": items_per_schedule,
180192
"disable_geojson": disable_geojson,
181193
"forbidden_uris[]": forbidden_uris,

0 commit comments

Comments
 (0)