samsara-api 4.2.0__py3-none-any.whl → 4.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- samsara/__init__.py +69 -9
- samsara/addresses/client.py +7 -14
- samsara/addresses/raw_client.py +7 -11
- samsara/alerts/client.py +2 -10
- samsara/alerts/raw_client.py +180 -180
- samsara/assets/__init__.py +3 -3
- samsara/assets/client.py +14 -45
- samsara/assets/raw_client.py +156 -160
- samsara/assets/types/__init__.py +3 -3
- samsara/assets/types/{assets_list_request_type.py → list_assets_request_type.py} +1 -1
- samsara/attributes/client.py +0 -4
- samsara/beta_ap_is/client.py +137 -187
- samsara/beta_ap_is/raw_client.py +2035 -1702
- samsara/carrier_proposed_assignments/client.py +2 -10
- samsara/client.py +5 -0
- samsara/coaching/client.py +2 -22
- samsara/coaching/raw_client.py +108 -108
- samsara/contacts/client.py +2 -8
- samsara/core/__init__.py +5 -0
- samsara/core/client_wrapper.py +18 -10
- samsara/core/custom_pagination.py +152 -0
- samsara/core/http_client.py +176 -90
- samsara/core/http_sse/__init__.py +42 -0
- samsara/core/http_sse/_api.py +112 -0
- samsara/core/http_sse/_decoders.py +61 -0
- samsara/core/http_sse/_exceptions.py +7 -0
- samsara/core/http_sse/_models.py +17 -0
- samsara/core/pagination.py +14 -14
- samsara/core/pydantic_utilities.py +3 -1
- samsara/documents/client.py +2 -12
- samsara/documents/raw_client.py +180 -180
- samsara/driver_qr_codes/raw_client.py +108 -108
- samsara/driver_vehicle_assignments/client.py +0 -12
- samsara/driver_vehicle_assignments/raw_client.py +144 -144
- samsara/drivers/__init__.py +3 -3
- samsara/drivers/client.py +12 -23
- samsara/drivers/raw_client.py +48 -52
- samsara/drivers/types/__init__.py +3 -3
- samsara/drivers/types/{drivers_list_request_driver_activation_status.py → list_drivers_request_driver_activation_status.py} +1 -1
- samsara/equipment/client.py +6 -22
- samsara/errors/bad_gateway_error.py +1 -1
- samsara/errors/gateway_timeout_error.py +1 -1
- samsara/errors/internal_server_error.py +1 -1
- samsara/errors/method_not_allowed_error.py +1 -1
- samsara/errors/not_found_error.py +1 -1
- samsara/errors/not_implemented_error.py +1 -1
- samsara/errors/service_unavailable_error.py +1 -1
- samsara/errors/too_many_requests_error.py +1 -1
- samsara/errors/unauthorized_error.py +1 -1
- samsara/forms/__init__.py +9 -3
- samsara/forms/client.py +17 -10
- samsara/forms/raw_client.py +265 -254
- samsara/forms/types/__init__.py +6 -2
- samsara/forms/types/form_submissions_post_form_submission_request_body_status.py +5 -0
- samsara/fuel_and_energy/client.py +0 -30
- samsara/fuel_and_energy/raw_client.py +180 -180
- samsara/gateways/client.py +2 -6
- samsara/gateways/raw_client.py +108 -108
- samsara/hours_of_service/__init__.py +6 -3
- samsara/hours_of_service/client.py +13 -52
- samsara/hours_of_service/raw_client.py +77 -76
- samsara/hours_of_service/types/__init__.py +4 -2
- samsara/hours_of_service/types/get_hos_daily_logs_request_expand.py +5 -0
- samsara/hubs/client.py +2 -94
- samsara/hubs/raw_client.py +216 -216
- samsara/idling/client.py +0 -18
- samsara/idling/raw_client.py +36 -36
- samsara/ifta/client.py +4 -34
- samsara/ifta/raw_client.py +144 -144
- samsara/industrial/client.py +12 -56
- samsara/industrial/raw_client.py +40 -48
- samsara/issues/client.py +0 -4
- samsara/issues/raw_client.py +108 -108
- samsara/legacy_ap_is/client.py +4 -56
- samsara/legacy_ap_is/raw_client.py +108 -108
- samsara/live_sharing_links/client.py +2 -10
- samsara/live_sharing_links/raw_client.py +144 -144
- samsara/location_and_speed/client.py +2 -20
- samsara/location_and_speed/raw_client.py +36 -36
- samsara/maintenance/__init__.py +3 -3
- samsara/maintenance/client.py +15 -30
- samsara/maintenance/raw_client.py +191 -182
- samsara/maintenance/types/__init__.py +6 -2
- samsara/maintenance/types/create_dvir_request_type.py +5 -0
- samsara/media/client.py +0 -4
- samsara/media/raw_client.py +108 -108
- samsara/messages/client.py +2 -8
- samsara/plans/client.py +0 -21
- samsara/plans/raw_client.py +72 -72
- samsara/preview_ap_is/client.py +0 -140
- samsara/preview_ap_is/raw_client.py +72 -430
- samsara/route_events/client.py +2 -12
- samsara/route_events/raw_client.py +36 -36
- samsara/routes/__init__.py +30 -0
- samsara/routes/client.py +7 -35
- samsara/routes/raw_client.py +257 -256
- samsara/routes/types/__init__.py +34 -0
- samsara/routes/types/get_routes_feed_request_expand.py +5 -0
- samsara/safety/client.py +2 -10
- samsara/safety/raw_client.py +36 -36
- samsara/settings/raw_client.py +180 -180
- samsara/speeding_intervals/raw_client.py +36 -36
- samsara/tachograph_eu_only/client.py +0 -6
- samsara/tags/client.py +2 -8
- samsara/trailer_assignments/client.py +2 -18
- samsara/trailers/client.py +2 -12
- samsara/trailers/raw_client.py +180 -180
- samsara/types/__init__.py +54 -0
- samsara/types/create_routes_stop_request_object_request_body.py +7 -0
- samsara/types/driver_assignment_object_response_body.py +2 -1
- samsara/types/driver_assignment_object_response_body_assignment_type.py +5 -0
- samsara/types/driver_external_ids.py +1 -1
- samsara/types/forms_approval_config_object_response_body.py +2 -1
- samsara/types/forms_approval_config_object_response_body_type.py +5 -0
- samsara/types/fuel_level_trigger_details_object_request_body.py +2 -1
- samsara/types/fuel_level_trigger_details_object_request_body_operation.py +5 -0
- samsara/types/fuel_level_trigger_details_object_response_body.py +4 -1
- samsara/types/fuel_level_trigger_details_object_response_body_operation.py +5 -0
- samsara/types/idling_event_object_v_20251023_response_body.py +4 -3
- samsara/types/idling_event_object_v_20251023_response_body_pto_state.py +5 -0
- samsara/types/patch_issue_request_body_assigned_to_request_body.py +2 -1
- samsara/types/patch_issue_request_body_assigned_to_request_body_type.py +5 -0
- samsara/types/reading_datapoint_request_body.py +5 -4
- samsara/types/reading_datapoint_request_body_entity_type.py +5 -0
- samsara/types/reading_history_response_body.py +1 -1
- samsara/types/reading_snapshot_response_body.py +1 -1
- samsara/types/resolved_by.py +2 -1
- samsara/types/resolved_by_type.py +5 -0
- samsara/types/route_feed_object_response_body.py +2 -1
- samsara/types/route_feed_object_response_body_type.py +5 -0
- samsara/types/route_settings_request_body.py +8 -0
- samsara/types/route_settings_request_body_sequencing_method.py +7 -0
- samsara/types/route_settings_response_body.py +8 -0
- samsara/types/route_settings_response_body_sequencing_method.py +7 -0
- samsara/types/route_stop_details_object_response_body.py +2 -1
- samsara/types/route_stop_details_object_response_body_type.py +5 -0
- samsara/types/routes_stop_response_object_response_body.py +7 -0
- samsara/types/training_learner_object_response_body.py +2 -1
- samsara/types/training_learner_object_response_body_type.py +5 -0
- samsara/types/update_routes_stop_request_object_request_body.py +7 -0
- samsara/types/vehicle_assignment_object_response_body.py +4 -3
- samsara/types/vehicle_assignment_object_response_body_assignment_type.py +5 -0
- samsara/types/vehicle_external_ids.py +1 -1
- samsara/types/work_order_money_object_request_body.py +2 -1
- samsara/types/work_order_money_object_request_body_currency.py +5 -0
- samsara/types/work_order_money_object_response_body.py +2 -1
- samsara/types/work_order_money_object_response_body_currency.py +5 -0
- samsara/users/client.py +4 -16
- samsara/vehicle_locations/client.py +4 -16
- samsara/vehicles/client.py +7 -22
- samsara/vehicles/raw_client.py +43 -47
- samsara/webhooks/client.py +2 -10
- samsara/webhooks/raw_client.py +180 -180
- samsara/work_orders/client.py +4 -18
- samsara/work_orders/raw_client.py +216 -216
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/METADATA +2 -1
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/RECORD +159 -132
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/LICENSE +0 -0
- {samsara_api-4.2.0.dist-info → samsara_api-4.3.0.dist-info}/WHEEL +0 -0
samsara/route_events/client.py
CHANGED
|
@@ -71,12 +71,7 @@ class RouteEventsClient:
|
|
|
71
71
|
client = Samsara(
|
|
72
72
|
token="YOUR_TOKEN",
|
|
73
73
|
)
|
|
74
|
-
client.route_events.get_route_events_stream(
|
|
75
|
-
after="after",
|
|
76
|
-
start_time="startTime",
|
|
77
|
-
limit=1,
|
|
78
|
-
include_external_ids=True,
|
|
79
|
-
)
|
|
74
|
+
client.route_events.get_route_events_stream()
|
|
80
75
|
"""
|
|
81
76
|
_response = self._raw_client.get_route_events_stream(
|
|
82
77
|
after=after,
|
|
@@ -156,12 +151,7 @@ class AsyncRouteEventsClient:
|
|
|
156
151
|
|
|
157
152
|
|
|
158
153
|
async def main() -> None:
|
|
159
|
-
await client.route_events.get_route_events_stream(
|
|
160
|
-
after="after",
|
|
161
|
-
start_time="startTime",
|
|
162
|
-
limit=1,
|
|
163
|
-
include_external_ids=True,
|
|
164
|
-
)
|
|
154
|
+
await client.route_events.get_route_events_stream()
|
|
165
155
|
|
|
166
156
|
|
|
167
157
|
asyncio.run(main())
|
|
@@ -90,9 +90,9 @@ class RawRouteEventsClient:
|
|
|
90
90
|
raise UnauthorizedError(
|
|
91
91
|
headers=dict(_response.headers),
|
|
92
92
|
body=typing.cast(
|
|
93
|
-
typing.
|
|
93
|
+
typing.Any,
|
|
94
94
|
parse_obj_as(
|
|
95
|
-
type_=typing.
|
|
95
|
+
type_=typing.Any, # type: ignore
|
|
96
96
|
object_=_response.json(),
|
|
97
97
|
),
|
|
98
98
|
),
|
|
@@ -101,9 +101,9 @@ class RawRouteEventsClient:
|
|
|
101
101
|
raise NotFoundError(
|
|
102
102
|
headers=dict(_response.headers),
|
|
103
103
|
body=typing.cast(
|
|
104
|
-
typing.
|
|
104
|
+
typing.Any,
|
|
105
105
|
parse_obj_as(
|
|
106
|
-
type_=typing.
|
|
106
|
+
type_=typing.Any, # type: ignore
|
|
107
107
|
object_=_response.json(),
|
|
108
108
|
),
|
|
109
109
|
),
|
|
@@ -112,9 +112,9 @@ class RawRouteEventsClient:
|
|
|
112
112
|
raise MethodNotAllowedError(
|
|
113
113
|
headers=dict(_response.headers),
|
|
114
114
|
body=typing.cast(
|
|
115
|
-
typing.
|
|
115
|
+
typing.Any,
|
|
116
116
|
parse_obj_as(
|
|
117
|
-
type_=typing.
|
|
117
|
+
type_=typing.Any, # type: ignore
|
|
118
118
|
object_=_response.json(),
|
|
119
119
|
),
|
|
120
120
|
),
|
|
@@ -123,9 +123,9 @@ class RawRouteEventsClient:
|
|
|
123
123
|
raise TooManyRequestsError(
|
|
124
124
|
headers=dict(_response.headers),
|
|
125
125
|
body=typing.cast(
|
|
126
|
-
typing.
|
|
126
|
+
typing.Any,
|
|
127
127
|
parse_obj_as(
|
|
128
|
-
type_=typing.
|
|
128
|
+
type_=typing.Any, # type: ignore
|
|
129
129
|
object_=_response.json(),
|
|
130
130
|
),
|
|
131
131
|
),
|
|
@@ -134,9 +134,9 @@ class RawRouteEventsClient:
|
|
|
134
134
|
raise InternalServerError(
|
|
135
135
|
headers=dict(_response.headers),
|
|
136
136
|
body=typing.cast(
|
|
137
|
-
typing.
|
|
137
|
+
typing.Any,
|
|
138
138
|
parse_obj_as(
|
|
139
|
-
type_=typing.
|
|
139
|
+
type_=typing.Any, # type: ignore
|
|
140
140
|
object_=_response.json(),
|
|
141
141
|
),
|
|
142
142
|
),
|
|
@@ -145,9 +145,9 @@ class RawRouteEventsClient:
|
|
|
145
145
|
raise NotImplementedError(
|
|
146
146
|
headers=dict(_response.headers),
|
|
147
147
|
body=typing.cast(
|
|
148
|
-
typing.
|
|
148
|
+
typing.Any,
|
|
149
149
|
parse_obj_as(
|
|
150
|
-
type_=typing.
|
|
150
|
+
type_=typing.Any, # type: ignore
|
|
151
151
|
object_=_response.json(),
|
|
152
152
|
),
|
|
153
153
|
),
|
|
@@ -156,9 +156,9 @@ class RawRouteEventsClient:
|
|
|
156
156
|
raise BadGatewayError(
|
|
157
157
|
headers=dict(_response.headers),
|
|
158
158
|
body=typing.cast(
|
|
159
|
-
typing.
|
|
159
|
+
typing.Any,
|
|
160
160
|
parse_obj_as(
|
|
161
|
-
type_=typing.
|
|
161
|
+
type_=typing.Any, # type: ignore
|
|
162
162
|
object_=_response.json(),
|
|
163
163
|
),
|
|
164
164
|
),
|
|
@@ -167,9 +167,9 @@ class RawRouteEventsClient:
|
|
|
167
167
|
raise ServiceUnavailableError(
|
|
168
168
|
headers=dict(_response.headers),
|
|
169
169
|
body=typing.cast(
|
|
170
|
-
typing.
|
|
170
|
+
typing.Any,
|
|
171
171
|
parse_obj_as(
|
|
172
|
-
type_=typing.
|
|
172
|
+
type_=typing.Any, # type: ignore
|
|
173
173
|
object_=_response.json(),
|
|
174
174
|
),
|
|
175
175
|
),
|
|
@@ -178,9 +178,9 @@ class RawRouteEventsClient:
|
|
|
178
178
|
raise GatewayTimeoutError(
|
|
179
179
|
headers=dict(_response.headers),
|
|
180
180
|
body=typing.cast(
|
|
181
|
-
typing.
|
|
181
|
+
typing.Any,
|
|
182
182
|
parse_obj_as(
|
|
183
|
-
type_=typing.
|
|
183
|
+
type_=typing.Any, # type: ignore
|
|
184
184
|
object_=_response.json(),
|
|
185
185
|
),
|
|
186
186
|
),
|
|
@@ -261,9 +261,9 @@ class AsyncRawRouteEventsClient:
|
|
|
261
261
|
raise UnauthorizedError(
|
|
262
262
|
headers=dict(_response.headers),
|
|
263
263
|
body=typing.cast(
|
|
264
|
-
typing.
|
|
264
|
+
typing.Any,
|
|
265
265
|
parse_obj_as(
|
|
266
|
-
type_=typing.
|
|
266
|
+
type_=typing.Any, # type: ignore
|
|
267
267
|
object_=_response.json(),
|
|
268
268
|
),
|
|
269
269
|
),
|
|
@@ -272,9 +272,9 @@ class AsyncRawRouteEventsClient:
|
|
|
272
272
|
raise NotFoundError(
|
|
273
273
|
headers=dict(_response.headers),
|
|
274
274
|
body=typing.cast(
|
|
275
|
-
typing.
|
|
275
|
+
typing.Any,
|
|
276
276
|
parse_obj_as(
|
|
277
|
-
type_=typing.
|
|
277
|
+
type_=typing.Any, # type: ignore
|
|
278
278
|
object_=_response.json(),
|
|
279
279
|
),
|
|
280
280
|
),
|
|
@@ -283,9 +283,9 @@ class AsyncRawRouteEventsClient:
|
|
|
283
283
|
raise MethodNotAllowedError(
|
|
284
284
|
headers=dict(_response.headers),
|
|
285
285
|
body=typing.cast(
|
|
286
|
-
typing.
|
|
286
|
+
typing.Any,
|
|
287
287
|
parse_obj_as(
|
|
288
|
-
type_=typing.
|
|
288
|
+
type_=typing.Any, # type: ignore
|
|
289
289
|
object_=_response.json(),
|
|
290
290
|
),
|
|
291
291
|
),
|
|
@@ -294,9 +294,9 @@ class AsyncRawRouteEventsClient:
|
|
|
294
294
|
raise TooManyRequestsError(
|
|
295
295
|
headers=dict(_response.headers),
|
|
296
296
|
body=typing.cast(
|
|
297
|
-
typing.
|
|
297
|
+
typing.Any,
|
|
298
298
|
parse_obj_as(
|
|
299
|
-
type_=typing.
|
|
299
|
+
type_=typing.Any, # type: ignore
|
|
300
300
|
object_=_response.json(),
|
|
301
301
|
),
|
|
302
302
|
),
|
|
@@ -305,9 +305,9 @@ class AsyncRawRouteEventsClient:
|
|
|
305
305
|
raise InternalServerError(
|
|
306
306
|
headers=dict(_response.headers),
|
|
307
307
|
body=typing.cast(
|
|
308
|
-
typing.
|
|
308
|
+
typing.Any,
|
|
309
309
|
parse_obj_as(
|
|
310
|
-
type_=typing.
|
|
310
|
+
type_=typing.Any, # type: ignore
|
|
311
311
|
object_=_response.json(),
|
|
312
312
|
),
|
|
313
313
|
),
|
|
@@ -316,9 +316,9 @@ class AsyncRawRouteEventsClient:
|
|
|
316
316
|
raise NotImplementedError(
|
|
317
317
|
headers=dict(_response.headers),
|
|
318
318
|
body=typing.cast(
|
|
319
|
-
typing.
|
|
319
|
+
typing.Any,
|
|
320
320
|
parse_obj_as(
|
|
321
|
-
type_=typing.
|
|
321
|
+
type_=typing.Any, # type: ignore
|
|
322
322
|
object_=_response.json(),
|
|
323
323
|
),
|
|
324
324
|
),
|
|
@@ -327,9 +327,9 @@ class AsyncRawRouteEventsClient:
|
|
|
327
327
|
raise BadGatewayError(
|
|
328
328
|
headers=dict(_response.headers),
|
|
329
329
|
body=typing.cast(
|
|
330
|
-
typing.
|
|
330
|
+
typing.Any,
|
|
331
331
|
parse_obj_as(
|
|
332
|
-
type_=typing.
|
|
332
|
+
type_=typing.Any, # type: ignore
|
|
333
333
|
object_=_response.json(),
|
|
334
334
|
),
|
|
335
335
|
),
|
|
@@ -338,9 +338,9 @@ class AsyncRawRouteEventsClient:
|
|
|
338
338
|
raise ServiceUnavailableError(
|
|
339
339
|
headers=dict(_response.headers),
|
|
340
340
|
body=typing.cast(
|
|
341
|
-
typing.
|
|
341
|
+
typing.Any,
|
|
342
342
|
parse_obj_as(
|
|
343
|
-
type_=typing.
|
|
343
|
+
type_=typing.Any, # type: ignore
|
|
344
344
|
object_=_response.json(),
|
|
345
345
|
),
|
|
346
346
|
),
|
|
@@ -349,9 +349,9 @@ class AsyncRawRouteEventsClient:
|
|
|
349
349
|
raise GatewayTimeoutError(
|
|
350
350
|
headers=dict(_response.headers),
|
|
351
351
|
body=typing.cast(
|
|
352
|
-
typing.
|
|
352
|
+
typing.Any,
|
|
353
353
|
parse_obj_as(
|
|
354
|
-
type_=typing.
|
|
354
|
+
type_=typing.Any, # type: ignore
|
|
355
355
|
object_=_response.json(),
|
|
356
356
|
),
|
|
357
357
|
),
|
samsara/routes/__init__.py
CHANGED
|
@@ -2,3 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import GetRoutesFeedRequestExpand
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"GetRoutesFeedRequestExpand": ".types"}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
14
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
15
|
+
if module_name is None:
|
|
16
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
17
|
+
try:
|
|
18
|
+
module = import_module(module_name, __package__)
|
|
19
|
+
if module_name == f".{attr_name}":
|
|
20
|
+
return module
|
|
21
|
+
else:
|
|
22
|
+
return getattr(module, attr_name)
|
|
23
|
+
except ImportError as e:
|
|
24
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
25
|
+
except AttributeError as e:
|
|
26
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def __dir__():
|
|
30
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
31
|
+
return sorted(lazy_attrs)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
__all__ = ["GetRoutesFeedRequestExpand"]
|
samsara/routes/client.py
CHANGED
|
@@ -15,6 +15,7 @@ from ..types.routes_get_routes_feed_response_body import RoutesGetRoutesFeedResp
|
|
|
15
15
|
from ..types.routes_patch_route_response_body import RoutesPatchRouteResponseBody
|
|
16
16
|
from ..types.update_routes_stop_request_object_request_body import UpdateRoutesStopRequestObjectRequestBody
|
|
17
17
|
from .raw_client import AsyncRawRoutesClient, RawRoutesClient
|
|
18
|
+
from .types.get_routes_feed_request_expand import GetRoutesFeedRequestExpand
|
|
18
19
|
|
|
19
20
|
# this is used as the default value for optional parameters
|
|
20
21
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -86,8 +87,6 @@ class RoutesClient:
|
|
|
86
87
|
client.routes.fetch_routes(
|
|
87
88
|
start_time="startTime",
|
|
88
89
|
end_time="endTime",
|
|
89
|
-
limit=1,
|
|
90
|
-
after="after",
|
|
91
90
|
)
|
|
92
91
|
"""
|
|
93
92
|
_response = self._raw_client.fetch_routes(
|
|
@@ -185,7 +184,7 @@ class RoutesClient:
|
|
|
185
184
|
self,
|
|
186
185
|
*,
|
|
187
186
|
after: typing.Optional[str] = None,
|
|
188
|
-
expand: typing.Optional[
|
|
187
|
+
expand: typing.Optional[GetRoutesFeedRequestExpand] = None,
|
|
189
188
|
request_options: typing.Optional[RequestOptions] = None,
|
|
190
189
|
) -> RoutesGetRoutesFeedResponseBody:
|
|
191
190
|
"""
|
|
@@ -205,7 +204,7 @@ class RoutesClient:
|
|
|
205
204
|
after : typing.Optional[str]
|
|
206
205
|
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
207
206
|
|
|
208
|
-
expand : typing.Optional[
|
|
207
|
+
expand : typing.Optional[GetRoutesFeedRequestExpand]
|
|
209
208
|
Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list.
|
|
210
209
|
|
|
211
210
|
Valid value: `route` Valid values: `route`
|
|
@@ -225,9 +224,7 @@ class RoutesClient:
|
|
|
225
224
|
client = Samsara(
|
|
226
225
|
token="YOUR_TOKEN",
|
|
227
226
|
)
|
|
228
|
-
client.routes.get_routes_feed(
|
|
229
|
-
after="after",
|
|
230
|
-
)
|
|
227
|
+
client.routes.get_routes_feed()
|
|
231
228
|
"""
|
|
232
229
|
_response = self._raw_client.get_routes_feed(after=after, expand=expand, request_options=request_options)
|
|
233
230
|
return _response.data
|
|
@@ -454,8 +451,6 @@ class RoutesClient:
|
|
|
454
451
|
|
|
455
452
|
Examples
|
|
456
453
|
--------
|
|
457
|
-
import datetime
|
|
458
|
-
|
|
459
454
|
from samsara import Samsara
|
|
460
455
|
|
|
461
456
|
client = Samsara(
|
|
@@ -463,15 +458,6 @@ class RoutesClient:
|
|
|
463
458
|
)
|
|
464
459
|
client.routes.list_hub_plan_routes(
|
|
465
460
|
plan_id="planId",
|
|
466
|
-
route_ids="routeIds",
|
|
467
|
-
start_time=datetime.datetime.fromisoformat(
|
|
468
|
-
"2024-01-15 09:30:00+00:00",
|
|
469
|
-
),
|
|
470
|
-
end_time=datetime.datetime.fromisoformat(
|
|
471
|
-
"2024-01-15 09:30:00+00:00",
|
|
472
|
-
),
|
|
473
|
-
after="after",
|
|
474
|
-
limit=1,
|
|
475
461
|
)
|
|
476
462
|
"""
|
|
477
463
|
_response = self._raw_client.list_hub_plan_routes(
|
|
@@ -609,8 +595,6 @@ class AsyncRoutesClient:
|
|
|
609
595
|
await client.routes.fetch_routes(
|
|
610
596
|
start_time="startTime",
|
|
611
597
|
end_time="endTime",
|
|
612
|
-
limit=1,
|
|
613
|
-
after="after",
|
|
614
598
|
)
|
|
615
599
|
|
|
616
600
|
|
|
@@ -719,7 +703,7 @@ class AsyncRoutesClient:
|
|
|
719
703
|
self,
|
|
720
704
|
*,
|
|
721
705
|
after: typing.Optional[str] = None,
|
|
722
|
-
expand: typing.Optional[
|
|
706
|
+
expand: typing.Optional[GetRoutesFeedRequestExpand] = None,
|
|
723
707
|
request_options: typing.Optional[RequestOptions] = None,
|
|
724
708
|
) -> RoutesGetRoutesFeedResponseBody:
|
|
725
709
|
"""
|
|
@@ -739,7 +723,7 @@ class AsyncRoutesClient:
|
|
|
739
723
|
after : typing.Optional[str]
|
|
740
724
|
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
741
725
|
|
|
742
|
-
expand : typing.Optional[
|
|
726
|
+
expand : typing.Optional[GetRoutesFeedRequestExpand]
|
|
743
727
|
Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list.
|
|
744
728
|
|
|
745
729
|
Valid value: `route` Valid values: `route`
|
|
@@ -764,9 +748,7 @@ class AsyncRoutesClient:
|
|
|
764
748
|
|
|
765
749
|
|
|
766
750
|
async def main() -> None:
|
|
767
|
-
await client.routes.get_routes_feed(
|
|
768
|
-
after="after",
|
|
769
|
-
)
|
|
751
|
+
await client.routes.get_routes_feed()
|
|
770
752
|
|
|
771
753
|
|
|
772
754
|
asyncio.run(main())
|
|
@@ -1021,7 +1003,6 @@ class AsyncRoutesClient:
|
|
|
1021
1003
|
Examples
|
|
1022
1004
|
--------
|
|
1023
1005
|
import asyncio
|
|
1024
|
-
import datetime
|
|
1025
1006
|
|
|
1026
1007
|
from samsara import AsyncSamsara
|
|
1027
1008
|
|
|
@@ -1033,15 +1014,6 @@ class AsyncRoutesClient:
|
|
|
1033
1014
|
async def main() -> None:
|
|
1034
1015
|
await client.routes.list_hub_plan_routes(
|
|
1035
1016
|
plan_id="planId",
|
|
1036
|
-
route_ids="routeIds",
|
|
1037
|
-
start_time=datetime.datetime.fromisoformat(
|
|
1038
|
-
"2024-01-15 09:30:00+00:00",
|
|
1039
|
-
),
|
|
1040
|
-
end_time=datetime.datetime.fromisoformat(
|
|
1041
|
-
"2024-01-15 09:30:00+00:00",
|
|
1042
|
-
),
|
|
1043
|
-
after="after",
|
|
1044
|
-
limit=1,
|
|
1045
1017
|
)
|
|
1046
1018
|
|
|
1047
1019
|
|