onebusaway-sdk 0.1.0.pre.alpha.203
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.
- checksums.yaml +7 -0
- data/README.md +124 -0
- data/lib/onebusaway-sdk/base_client.rb +483 -0
- data/lib/onebusaway-sdk/base_model.rb +1188 -0
- data/lib/onebusaway-sdk/base_page.rb +40 -0
- data/lib/onebusaway-sdk/client.rb +181 -0
- data/lib/onebusaway-sdk/errors.rb +187 -0
- data/lib/onebusaway-sdk/extern.rb +10 -0
- data/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rb +18 -0
- data/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rb +84 -0
- data/lib/onebusaway-sdk/models/agency_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/agency_retrieve_response.rb +151 -0
- data/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rb +51 -0
- data/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rb +767 -0
- data/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rb +60 -0
- data/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rb +751 -0
- data/lib/onebusaway-sdk/models/block_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/block_retrieve_response.rb +205 -0
- data/lib/onebusaway-sdk/models/config_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/config_retrieve_response.rb +331 -0
- data/lib/onebusaway-sdk/models/current_time_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/current_time_retrieve_response.rb +67 -0
- data/lib/onebusaway-sdk/models/references.rb +1071 -0
- data/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rb +117 -0
- data/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rb +180 -0
- data/lib/onebusaway-sdk/models/response_wrapper.rb +37 -0
- data/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rb +18 -0
- data/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rb +45 -0
- data/lib/onebusaway-sdk/models/route_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/route_retrieve_response.rb +149 -0
- data/lib/onebusaway-sdk/models/routes_for_agency_list_params.rb +18 -0
- data/lib/onebusaway-sdk/models/routes_for_agency_list_response.rb +156 -0
- data/lib/onebusaway-sdk/models/routes_for_location_list_params.rb +70 -0
- data/lib/onebusaway-sdk/models/routes_for_location_list_response.rb +162 -0
- data/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rb +30 -0
- data/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rb +453 -0
- data/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rb +30 -0
- data/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rb +244 -0
- data/lib/onebusaway-sdk/models/search_for_route_list_params.rb +36 -0
- data/lib/onebusaway-sdk/models/search_for_route_list_response.rb +166 -0
- data/lib/onebusaway-sdk/models/search_for_stop_list_params.rb +36 -0
- data/lib/onebusaway-sdk/models/search_for_stop_list_response.rb +161 -0
- data/lib/onebusaway-sdk/models/shape_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/shape_retrieve_response.rb +70 -0
- data/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rb +18 -0
- data/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rb +45 -0
- data/lib/onebusaway-sdk/models/stop_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/stop_retrieve_response.rb +144 -0
- data/lib/onebusaway-sdk/models/stops_for_agency_list_params.rb +18 -0
- data/lib/onebusaway-sdk/models/stops_for_agency_list_response.rb +146 -0
- data/lib/onebusaway-sdk/models/stops_for_location_list_params.rb +74 -0
- data/lib/onebusaway-sdk/models/stops_for_location_list_response.rb +161 -0
- data/lib/onebusaway-sdk/models/stops_for_route_list_params.rb +40 -0
- data/lib/onebusaway-sdk/models/stops_for_route_list_response.rb +253 -0
- data/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rb +86 -0
- data/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rb +561 -0
- data/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rb +65 -0
- data/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rb +561 -0
- data/lib/onebusaway-sdk/models/trip_retrieve_params.rb +18 -0
- data/lib/onebusaway-sdk/models/trip_retrieve_response.rb +160 -0
- data/lib/onebusaway-sdk/models/trips_for_location_list_params.rb +93 -0
- data/lib/onebusaway-sdk/models/trips_for_location_list_response.rb +572 -0
- data/lib/onebusaway-sdk/models/trips_for_route_list_params.rb +52 -0
- data/lib/onebusaway-sdk/models/trips_for_route_list_response.rb +559 -0
- data/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rb +29 -0
- data/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rb +529 -0
- data/lib/onebusaway-sdk/pooled_net_requester.rb +170 -0
- data/lib/onebusaway-sdk/request_options.rb +115 -0
- data/lib/onebusaway-sdk/resources/agencies_with_coverage.rb +31 -0
- data/lib/onebusaway-sdk/resources/agency.rb +32 -0
- data/lib/onebusaway-sdk/resources/arrival_and_departure.rb +71 -0
- data/lib/onebusaway-sdk/resources/block.rb +32 -0
- data/lib/onebusaway-sdk/resources/config.rb +30 -0
- data/lib/onebusaway-sdk/resources/current_time.rb +30 -0
- data/lib/onebusaway-sdk/resources/report_problem_with_stop.rb +44 -0
- data/lib/onebusaway-sdk/resources/report_problem_with_trip.rb +54 -0
- data/lib/onebusaway-sdk/resources/route.rb +32 -0
- data/lib/onebusaway-sdk/resources/route_ids_for_agency.rb +32 -0
- data/lib/onebusaway-sdk/resources/routes_for_agency.rb +32 -0
- data/lib/onebusaway-sdk/resources/routes_for_location.rb +44 -0
- data/lib/onebusaway-sdk/resources/schedule_for_route.rb +37 -0
- data/lib/onebusaway-sdk/resources/schedule_for_stop.rb +37 -0
- data/lib/onebusaway-sdk/resources/search_for_route.rb +36 -0
- data/lib/onebusaway-sdk/resources/search_for_stop.rb +36 -0
- data/lib/onebusaway-sdk/resources/shape.rb +32 -0
- data/lib/onebusaway-sdk/resources/stop.rb +32 -0
- data/lib/onebusaway-sdk/resources/stop_ids_for_agency.rb +32 -0
- data/lib/onebusaway-sdk/resources/stops_for_agency.rb +32 -0
- data/lib/onebusaway-sdk/resources/stops_for_location.rb +44 -0
- data/lib/onebusaway-sdk/resources/stops_for_route.rb +38 -0
- data/lib/onebusaway-sdk/resources/trip.rb +32 -0
- data/lib/onebusaway-sdk/resources/trip_details.rb +47 -0
- data/lib/onebusaway-sdk/resources/trip_for_vehicle.rb +45 -0
- data/lib/onebusaway-sdk/resources/trips_for_location.rb +48 -0
- data/lib/onebusaway-sdk/resources/trips_for_route.rb +41 -0
- data/lib/onebusaway-sdk/resources/vehicles_for_agency.rb +36 -0
- data/lib/onebusaway-sdk/util.rb +512 -0
- data/lib/onebusaway-sdk/version.rb +5 -0
- data/lib/onebusaway-sdk.rb +116 -0
- data/manifest.yaml +13 -0
- data/rbi/lib/onebusaway-sdk/base_client.rbi +162 -0
- data/rbi/lib/onebusaway-sdk/base_model.rbi +478 -0
- data/rbi/lib/onebusaway-sdk/base_page.rbi +39 -0
- data/rbi/lib/onebusaway-sdk/client.rbi +154 -0
- data/rbi/lib/onebusaway-sdk/errors.rbi +145 -0
- data/rbi/lib/onebusaway-sdk/extern.rbi +7 -0
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rbi +131 -0
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_response.rbi +210 -0
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rbi +60 -0
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rbi +914 -0
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbi +87 -0
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbi +857 -0
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_response.rbi +383 -0
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_response.rbi +389 -0
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_response.rbi +95 -0
- data/rbi/lib/onebusaway-sdk/models/references.rbi +1265 -0
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbi +101 -0
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbi +157 -0
- data/rbi/lib/onebusaway-sdk/models/response_wrapper.rbi +47 -0
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rbi +68 -0
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_response.rbi +200 -0
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_response.rbi +210 -0
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_params.rbi +90 -0
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_response.rbi +220 -0
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbi +34 -0
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbi +675 -0
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbi +34 -0
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbi +457 -0
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_params.rbi +43 -0
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_response.rbi +220 -0
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_params.rbi +43 -0
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_response.rbi +231 -0
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_response.rbi +103 -0
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbi +68 -0
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_response.rbi +211 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_response.rbi +210 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_params.rbi +90 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_response.rbi +231 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_params.rbi +48 -0
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_response.rbi +307 -0
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rbi +87 -0
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rbi +702 -0
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbi +76 -0
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbi +704 -0
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_params.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_response.rbi +211 -0
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_params.rbi +109 -0
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_response.rbi +715 -0
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_params.rbi +60 -0
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_response.rbi +705 -0
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rbi +35 -0
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rbi +633 -0
- data/rbi/lib/onebusaway-sdk/pooled_net_requester.rbi +36 -0
- data/rbi/lib/onebusaway-sdk/request_options.rbi +84 -0
- data/rbi/lib/onebusaway-sdk/resources/agencies_with_coverage.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/resources/agency.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/arrival_and_departure.rbi +47 -0
- data/rbi/lib/onebusaway-sdk/resources/block.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/config.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/resources/current_time.rbi +18 -0
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_stop.rbi +34 -0
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_trip.rbi +44 -0
- data/rbi/lib/onebusaway-sdk/resources/route.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/route_ids_for_agency.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/routes_for_agency.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/routes_for_location.rbi +26 -0
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_route.rbi +22 -0
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_stop.rbi +22 -0
- data/rbi/lib/onebusaway-sdk/resources/search_for_route.rbi +22 -0
- data/rbi/lib/onebusaway-sdk/resources/search_for_stop.rbi +22 -0
- data/rbi/lib/onebusaway-sdk/resources/shape.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/stop.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/stop_ids_for_agency.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/stops_for_agency.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/stops_for_location.rbi +26 -0
- data/rbi/lib/onebusaway-sdk/resources/stops_for_route.rbi +23 -0
- data/rbi/lib/onebusaway-sdk/resources/trip.rbi +21 -0
- data/rbi/lib/onebusaway-sdk/resources/trip_details.rbi +34 -0
- data/rbi/lib/onebusaway-sdk/resources/trip_for_vehicle.rbi +32 -0
- data/rbi/lib/onebusaway-sdk/resources/trips_for_location.rbi +36 -0
- data/rbi/lib/onebusaway-sdk/resources/trips_for_route.rbi +24 -0
- data/rbi/lib/onebusaway-sdk/resources/vehicles_for_agency.rbi +22 -0
- data/rbi/lib/onebusaway-sdk/util.rbi +136 -0
- data/rbi/lib/onebusaway-sdk/version.rbi +5 -0
- data/sig/onebusaway-sdk/base_client.rbs +101 -0
- data/sig/onebusaway-sdk/base_model.rbs +244 -0
- data/sig/onebusaway-sdk/base_page.rbs +20 -0
- data/sig/onebusaway-sdk/client.rbs +80 -0
- data/sig/onebusaway-sdk/errors.rbs +98 -0
- data/sig/onebusaway-sdk/extern.rbs +4 -0
- data/sig/onebusaway-sdk/models/agencies_with_coverage_list_params.rbs +20 -0
- data/sig/onebusaway-sdk/models/agencies_with_coverage_list_response.rbs +85 -0
- data/sig/onebusaway-sdk/models/agency_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/agency_retrieve_response.rbs +115 -0
- data/sig/onebusaway-sdk/models/arrival_and_departure_list_params.rbs +38 -0
- data/sig/onebusaway-sdk/models/arrival_and_departure_list_response.rbs +447 -0
- data/sig/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbs +50 -0
- data/sig/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbs +427 -0
- data/sig/onebusaway-sdk/models/block_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/block_retrieve_response.rbs +201 -0
- data/sig/onebusaway-sdk/models/config_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/config_retrieve_response.rbs +227 -0
- data/sig/onebusaway-sdk/models/current_time_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/current_time_retrieve_response.rbs +64 -0
- data/sig/onebusaway-sdk/models/references.rbs +732 -0
- data/sig/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbs +73 -0
- data/sig/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbs +105 -0
- data/sig/onebusaway-sdk/models/response_wrapper.rbs +30 -0
- data/sig/onebusaway-sdk/models/route_ids_for_agency_list_params.rbs +20 -0
- data/sig/onebusaway-sdk/models/route_ids_for_agency_list_response.rbs +49 -0
- data/sig/onebusaway-sdk/models/route_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/route_retrieve_response.rbs +113 -0
- data/sig/onebusaway-sdk/models/routes_for_agency_list_params.rbs +20 -0
- data/sig/onebusaway-sdk/models/routes_for_agency_list_response.rbs +117 -0
- data/sig/onebusaway-sdk/models/routes_for_location_list_params.rbs +56 -0
- data/sig/onebusaway-sdk/models/routes_for_location_list_response.rbs +123 -0
- data/sig/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbs +24 -0
- data/sig/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbs +341 -0
- data/sig/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbs +24 -0
- data/sig/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbs +215 -0
- data/sig/onebusaway-sdk/models/search_for_route_list_params.rbs +30 -0
- data/sig/onebusaway-sdk/models/search_for_route_list_response.rbs +125 -0
- data/sig/onebusaway-sdk/models/search_for_stop_list_params.rbs +30 -0
- data/sig/onebusaway-sdk/models/search_for_stop_list_response.rbs +123 -0
- data/sig/onebusaway-sdk/models/shape_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/shape_retrieve_response.rbs +64 -0
- data/sig/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbs +20 -0
- data/sig/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbs +49 -0
- data/sig/onebusaway-sdk/models/stop_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/stop_retrieve_response.rbs +111 -0
- data/sig/onebusaway-sdk/models/stops_for_agency_list_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/stops_for_agency_list_response.rbs +105 -0
- data/sig/onebusaway-sdk/models/stops_for_location_list_params.rbs +56 -0
- data/sig/onebusaway-sdk/models/stops_for_location_list_response.rbs +123 -0
- data/sig/onebusaway-sdk/models/stops_for_route_list_params.rbs +33 -0
- data/sig/onebusaway-sdk/models/stops_for_route_list_response.rbs +206 -0
- data/sig/onebusaway-sdk/models/trip_detail_retrieve_params.rbs +54 -0
- data/sig/onebusaway-sdk/models/trip_detail_retrieve_response.rbs +375 -0
- data/sig/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbs +48 -0
- data/sig/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbs +377 -0
- data/sig/onebusaway-sdk/models/trip_retrieve_params.rbs +19 -0
- data/sig/onebusaway-sdk/models/trip_retrieve_response.rbs +119 -0
- data/sig/onebusaway-sdk/models/trips_for_location_list_params.rbs +58 -0
- data/sig/onebusaway-sdk/models/trips_for_location_list_response.rbs +379 -0
- data/sig/onebusaway-sdk/models/trips_for_route_list_params.rbs +38 -0
- data/sig/onebusaway-sdk/models/trips_for_route_list_response.rbs +371 -0
- data/sig/onebusaway-sdk/models/vehicles_for_agency_list_params.rbs +24 -0
- data/sig/onebusaway-sdk/models/vehicles_for_agency_list_response.rbs +332 -0
- data/sig/onebusaway-sdk/pooled_net_requester.rbs +28 -0
- data/sig/onebusaway-sdk/request_options.rbs +42 -0
- data/sig/onebusaway-sdk/resources/agencies_with_coverage.rbs +16 -0
- data/sig/onebusaway-sdk/resources/agency.rbs +18 -0
- data/sig/onebusaway-sdk/resources/arrival_and_departure.rbs +37 -0
- data/sig/onebusaway-sdk/resources/block.rbs +18 -0
- data/sig/onebusaway-sdk/resources/config.rbs +16 -0
- data/sig/onebusaway-sdk/resources/current_time.rbs +16 -0
- data/sig/onebusaway-sdk/resources/report_problem_with_stop.rbs +23 -0
- data/sig/onebusaway-sdk/resources/report_problem_with_trip.rbs +28 -0
- data/sig/onebusaway-sdk/resources/route.rbs +18 -0
- data/sig/onebusaway-sdk/resources/route_ids_for_agency.rbs +18 -0
- data/sig/onebusaway-sdk/resources/routes_for_agency.rbs +18 -0
- data/sig/onebusaway-sdk/resources/routes_for_location.rbs +22 -0
- data/sig/onebusaway-sdk/resources/schedule_for_route.rbs +19 -0
- data/sig/onebusaway-sdk/resources/schedule_for_stop.rbs +19 -0
- data/sig/onebusaway-sdk/resources/search_for_route.rbs +18 -0
- data/sig/onebusaway-sdk/resources/search_for_stop.rbs +18 -0
- data/sig/onebusaway-sdk/resources/shape.rbs +18 -0
- data/sig/onebusaway-sdk/resources/stop.rbs +18 -0
- data/sig/onebusaway-sdk/resources/stop_ids_for_agency.rbs +18 -0
- data/sig/onebusaway-sdk/resources/stops_for_agency.rbs +18 -0
- data/sig/onebusaway-sdk/resources/stops_for_location.rbs +22 -0
- data/sig/onebusaway-sdk/resources/stops_for_route.rbs +20 -0
- data/sig/onebusaway-sdk/resources/trip.rbs +18 -0
- data/sig/onebusaway-sdk/resources/trip_details.rbs +23 -0
- data/sig/onebusaway-sdk/resources/trip_for_vehicle.rbs +22 -0
- data/sig/onebusaway-sdk/resources/trips_for_location.rbs +23 -0
- data/sig/onebusaway-sdk/resources/trips_for_route.rbs +21 -0
- data/sig/onebusaway-sdk/resources/vehicles_for_agency.rbs +19 -0
- data/sig/onebusaway-sdk/util.rbs +90 -0
- data/sig/onebusaway-sdk/version.rbs +3 -0
- metadata +350 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
# @private
|
5
|
+
#
|
6
|
+
# @abstract
|
7
|
+
#
|
8
|
+
module BasePage
|
9
|
+
# @return [Boolean]
|
10
|
+
#
|
11
|
+
def next_page? = (raise NotImplementedError)
|
12
|
+
|
13
|
+
# @raise [OnebusawaySDK::APIError]
|
14
|
+
# @return [OnebusawaySDK::BasePage]
|
15
|
+
#
|
16
|
+
def next_page = (raise NotImplementedError)
|
17
|
+
|
18
|
+
# @param blk [Proc]
|
19
|
+
#
|
20
|
+
# @return [void]
|
21
|
+
#
|
22
|
+
def auto_paging_each(&) = (raise NotImplementedError)
|
23
|
+
|
24
|
+
# @return [Enumerable]
|
25
|
+
#
|
26
|
+
def to_enum = super(:auto_paging_each)
|
27
|
+
|
28
|
+
alias_method :enum_for, :to_enum
|
29
|
+
|
30
|
+
# @!parse
|
31
|
+
# # @private
|
32
|
+
# #
|
33
|
+
# # @param client [OnebusawaySDK::BaseClient]
|
34
|
+
# # @param req [Hash{Symbol=>Object}]
|
35
|
+
# # @param headers [Hash{String=>String}, Net::HTTPHeader]
|
36
|
+
# # @param unwrapped [Object]
|
37
|
+
# #
|
38
|
+
# def initialize(client:, req:, headers:, unwrapped:); end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
class Client < OnebusawaySDK::BaseClient
|
5
|
+
# Default max number of retries to attempt after a failed retryable request.
|
6
|
+
DEFAULT_MAX_RETRIES = 2
|
7
|
+
|
8
|
+
# Default per-request timeout.
|
9
|
+
DEFAULT_TIMEOUT_IN_SECONDS = 60.0
|
10
|
+
|
11
|
+
# Default initial retry delay in seconds.
|
12
|
+
# Overall delay is calculated using exponential backoff + jitter.
|
13
|
+
DEFAULT_INITIAL_RETRY_DELAY = 0.5
|
14
|
+
|
15
|
+
# Default max retry delay in seconds.
|
16
|
+
DEFAULT_MAX_RETRY_DELAY = 8.0
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :api_key
|
20
|
+
|
21
|
+
# @return [OnebusawaySDK::Resources::AgenciesWithCoverage]
|
22
|
+
attr_reader :agencies_with_coverage
|
23
|
+
|
24
|
+
# @return [OnebusawaySDK::Resources::Agency]
|
25
|
+
attr_reader :agency
|
26
|
+
|
27
|
+
# @return [OnebusawaySDK::Resources::VehiclesForAgency]
|
28
|
+
attr_reader :vehicles_for_agency
|
29
|
+
|
30
|
+
# @return [OnebusawaySDK::Resources::Config]
|
31
|
+
attr_reader :config
|
32
|
+
|
33
|
+
# @return [OnebusawaySDK::Resources::CurrentTime]
|
34
|
+
attr_reader :current_time
|
35
|
+
|
36
|
+
# @return [OnebusawaySDK::Resources::StopsForLocation]
|
37
|
+
attr_reader :stops_for_location
|
38
|
+
|
39
|
+
# @return [OnebusawaySDK::Resources::StopsForRoute]
|
40
|
+
attr_reader :stops_for_route
|
41
|
+
|
42
|
+
# @return [OnebusawaySDK::Resources::StopsForAgency]
|
43
|
+
attr_reader :stops_for_agency
|
44
|
+
|
45
|
+
# @return [OnebusawaySDK::Resources::Stop]
|
46
|
+
attr_reader :stop
|
47
|
+
|
48
|
+
# @return [OnebusawaySDK::Resources::StopIDsForAgency]
|
49
|
+
attr_reader :stop_ids_for_agency
|
50
|
+
|
51
|
+
# @return [OnebusawaySDK::Resources::ScheduleForStop]
|
52
|
+
attr_reader :schedule_for_stop
|
53
|
+
|
54
|
+
# @return [OnebusawaySDK::Resources::Route]
|
55
|
+
attr_reader :route
|
56
|
+
|
57
|
+
# @return [OnebusawaySDK::Resources::RouteIDsForAgency]
|
58
|
+
attr_reader :route_ids_for_agency
|
59
|
+
|
60
|
+
# @return [OnebusawaySDK::Resources::RoutesForLocation]
|
61
|
+
attr_reader :routes_for_location
|
62
|
+
|
63
|
+
# @return [OnebusawaySDK::Resources::RoutesForAgency]
|
64
|
+
attr_reader :routes_for_agency
|
65
|
+
|
66
|
+
# @return [OnebusawaySDK::Resources::ScheduleForRoute]
|
67
|
+
attr_reader :schedule_for_route
|
68
|
+
|
69
|
+
# @return [OnebusawaySDK::Resources::ArrivalAndDeparture]
|
70
|
+
attr_reader :arrival_and_departure
|
71
|
+
|
72
|
+
# @return [OnebusawaySDK::Resources::Trip]
|
73
|
+
attr_reader :trip
|
74
|
+
|
75
|
+
# @return [OnebusawaySDK::Resources::TripsForLocation]
|
76
|
+
attr_reader :trips_for_location
|
77
|
+
|
78
|
+
# @return [OnebusawaySDK::Resources::TripDetails]
|
79
|
+
attr_reader :trip_details
|
80
|
+
|
81
|
+
# @return [OnebusawaySDK::Resources::TripForVehicle]
|
82
|
+
attr_reader :trip_for_vehicle
|
83
|
+
|
84
|
+
# @return [OnebusawaySDK::Resources::TripsForRoute]
|
85
|
+
attr_reader :trips_for_route
|
86
|
+
|
87
|
+
# @return [OnebusawaySDK::Resources::ReportProblemWithStop]
|
88
|
+
attr_reader :report_problem_with_stop
|
89
|
+
|
90
|
+
# @return [OnebusawaySDK::Resources::ReportProblemWithTrip]
|
91
|
+
attr_reader :report_problem_with_trip
|
92
|
+
|
93
|
+
# @return [OnebusawaySDK::Resources::SearchForStop]
|
94
|
+
attr_reader :search_for_stop
|
95
|
+
|
96
|
+
# @return [OnebusawaySDK::Resources::SearchForRoute]
|
97
|
+
attr_reader :search_for_route
|
98
|
+
|
99
|
+
# @return [OnebusawaySDK::Resources::Block]
|
100
|
+
attr_reader :block
|
101
|
+
|
102
|
+
# @return [OnebusawaySDK::Resources::Shape]
|
103
|
+
attr_reader :shape
|
104
|
+
|
105
|
+
# @private
|
106
|
+
#
|
107
|
+
# @return [Hash{String=>String}]
|
108
|
+
#
|
109
|
+
private def auth_query
|
110
|
+
{"key" => @api_key}
|
111
|
+
end
|
112
|
+
|
113
|
+
# Creates and returns a new client for interacting with the API.
|
114
|
+
#
|
115
|
+
# @param base_url [String, nil] Override the default base URL for the API, e.g., `"https://api.example.com/v2/"`
|
116
|
+
#
|
117
|
+
# @param api_key [String, nil] Defaults to `ENV["ONEBUSAWAY_API_KEY"]`
|
118
|
+
#
|
119
|
+
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
120
|
+
#
|
121
|
+
# @param timeout [Float]
|
122
|
+
#
|
123
|
+
# @param initial_retry_delay [Float]
|
124
|
+
#
|
125
|
+
# @param max_retry_delay [Float]
|
126
|
+
#
|
127
|
+
def initialize(
|
128
|
+
base_url: nil,
|
129
|
+
api_key: ENV["ONEBUSAWAY_API_KEY"],
|
130
|
+
max_retries: DEFAULT_MAX_RETRIES,
|
131
|
+
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
|
132
|
+
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
|
133
|
+
max_retry_delay: DEFAULT_MAX_RETRY_DELAY
|
134
|
+
)
|
135
|
+
base_url ||= "https://api.pugetsound.onebusaway.org"
|
136
|
+
|
137
|
+
if api_key.nil?
|
138
|
+
raise ArgumentError.new("api_key is required")
|
139
|
+
end
|
140
|
+
|
141
|
+
@api_key = api_key.to_s
|
142
|
+
|
143
|
+
super(
|
144
|
+
base_url: base_url,
|
145
|
+
timeout: timeout,
|
146
|
+
max_retries: max_retries,
|
147
|
+
initial_retry_delay: initial_retry_delay,
|
148
|
+
max_retry_delay: max_retry_delay
|
149
|
+
)
|
150
|
+
|
151
|
+
@agencies_with_coverage = OnebusawaySDK::Resources::AgenciesWithCoverage.new(client: self)
|
152
|
+
@agency = OnebusawaySDK::Resources::Agency.new(client: self)
|
153
|
+
@vehicles_for_agency = OnebusawaySDK::Resources::VehiclesForAgency.new(client: self)
|
154
|
+
@config = OnebusawaySDK::Resources::Config.new(client: self)
|
155
|
+
@current_time = OnebusawaySDK::Resources::CurrentTime.new(client: self)
|
156
|
+
@stops_for_location = OnebusawaySDK::Resources::StopsForLocation.new(client: self)
|
157
|
+
@stops_for_route = OnebusawaySDK::Resources::StopsForRoute.new(client: self)
|
158
|
+
@stops_for_agency = OnebusawaySDK::Resources::StopsForAgency.new(client: self)
|
159
|
+
@stop = OnebusawaySDK::Resources::Stop.new(client: self)
|
160
|
+
@stop_ids_for_agency = OnebusawaySDK::Resources::StopIDsForAgency.new(client: self)
|
161
|
+
@schedule_for_stop = OnebusawaySDK::Resources::ScheduleForStop.new(client: self)
|
162
|
+
@route = OnebusawaySDK::Resources::Route.new(client: self)
|
163
|
+
@route_ids_for_agency = OnebusawaySDK::Resources::RouteIDsForAgency.new(client: self)
|
164
|
+
@routes_for_location = OnebusawaySDK::Resources::RoutesForLocation.new(client: self)
|
165
|
+
@routes_for_agency = OnebusawaySDK::Resources::RoutesForAgency.new(client: self)
|
166
|
+
@schedule_for_route = OnebusawaySDK::Resources::ScheduleForRoute.new(client: self)
|
167
|
+
@arrival_and_departure = OnebusawaySDK::Resources::ArrivalAndDeparture.new(client: self)
|
168
|
+
@trip = OnebusawaySDK::Resources::Trip.new(client: self)
|
169
|
+
@trips_for_location = OnebusawaySDK::Resources::TripsForLocation.new(client: self)
|
170
|
+
@trip_details = OnebusawaySDK::Resources::TripDetails.new(client: self)
|
171
|
+
@trip_for_vehicle = OnebusawaySDK::Resources::TripForVehicle.new(client: self)
|
172
|
+
@trips_for_route = OnebusawaySDK::Resources::TripsForRoute.new(client: self)
|
173
|
+
@report_problem_with_stop = OnebusawaySDK::Resources::ReportProblemWithStop.new(client: self)
|
174
|
+
@report_problem_with_trip = OnebusawaySDK::Resources::ReportProblemWithTrip.new(client: self)
|
175
|
+
@search_for_stop = OnebusawaySDK::Resources::SearchForStop.new(client: self)
|
176
|
+
@search_for_route = OnebusawaySDK::Resources::SearchForRoute.new(client: self)
|
177
|
+
@block = OnebusawaySDK::Resources::Block.new(client: self)
|
178
|
+
@shape = OnebusawaySDK::Resources::Shape.new(client: self)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,187 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
class Error < StandardError
|
5
|
+
# @!parse
|
6
|
+
# # @return [StandardError, nil]
|
7
|
+
# attr_reader :cause
|
8
|
+
end
|
9
|
+
|
10
|
+
class ConversionError < OnebusawaySDK::Error
|
11
|
+
end
|
12
|
+
|
13
|
+
class APIError < OnebusawaySDK::Error
|
14
|
+
# @return [URI::Generic]
|
15
|
+
attr_reader :url
|
16
|
+
|
17
|
+
# @return [Integer, nil]
|
18
|
+
attr_reader :status
|
19
|
+
|
20
|
+
# @return [Object, nil]
|
21
|
+
attr_reader :body
|
22
|
+
|
23
|
+
# @private
|
24
|
+
#
|
25
|
+
# @param url [URI::Generic]
|
26
|
+
# @param status [Integer, nil]
|
27
|
+
# @param body [Object, nil]
|
28
|
+
# @param request [nil]
|
29
|
+
# @param response [nil]
|
30
|
+
# @param message [String, nil]
|
31
|
+
#
|
32
|
+
def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
|
33
|
+
@url = url
|
34
|
+
@status = status
|
35
|
+
@body = body
|
36
|
+
@request = request
|
37
|
+
@response = response
|
38
|
+
super(message)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class APIConnectionError < OnebusawaySDK::APIError
|
43
|
+
# @!parse
|
44
|
+
# # @return [nil]
|
45
|
+
# attr_reader :status
|
46
|
+
|
47
|
+
# @!parse
|
48
|
+
# # @return [nil]
|
49
|
+
# attr_reader :body
|
50
|
+
|
51
|
+
# @private
|
52
|
+
#
|
53
|
+
# @param url [URI::Generic]
|
54
|
+
# @param status [nil]
|
55
|
+
# @param body [nil]
|
56
|
+
# @param request [nil]
|
57
|
+
# @param response [nil]
|
58
|
+
# @param message [String, nil]
|
59
|
+
#
|
60
|
+
def initialize(
|
61
|
+
url:,
|
62
|
+
status: nil,
|
63
|
+
body: nil,
|
64
|
+
request: nil,
|
65
|
+
response: nil,
|
66
|
+
message: "Connection error."
|
67
|
+
)
|
68
|
+
super
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class APITimeoutError < OnebusawaySDK::APIConnectionError
|
73
|
+
# @private
|
74
|
+
#
|
75
|
+
# @param url [URI::Generic]
|
76
|
+
# @param status [nil]
|
77
|
+
# @param body [nil]
|
78
|
+
# @param request [nil]
|
79
|
+
# @param response [nil]
|
80
|
+
# @param message [String, nil]
|
81
|
+
#
|
82
|
+
def initialize(
|
83
|
+
url:,
|
84
|
+
status: nil,
|
85
|
+
body: nil,
|
86
|
+
request: nil,
|
87
|
+
response: nil,
|
88
|
+
message: "Request timed out."
|
89
|
+
)
|
90
|
+
super
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
class APIStatusError < OnebusawaySDK::APIError
|
95
|
+
# @private
|
96
|
+
#
|
97
|
+
# @param url [URI::Generic]
|
98
|
+
# @param status [Integer]
|
99
|
+
# @param body [Object, nil]
|
100
|
+
# @param request [nil]
|
101
|
+
# @param response [nil]
|
102
|
+
#
|
103
|
+
# @return [OnebusawaySDK::APIStatusError]
|
104
|
+
#
|
105
|
+
def self.for(url:, status:, body:, request:, response:)
|
106
|
+
kwargs = {url: url, status: status, body: body, request: request, response: response}
|
107
|
+
|
108
|
+
case status
|
109
|
+
in 400
|
110
|
+
OnebusawaySDK::BadRequestError.new(**kwargs)
|
111
|
+
in 401
|
112
|
+
OnebusawaySDK::AuthenticationError.new(**kwargs)
|
113
|
+
in 403
|
114
|
+
OnebusawaySDK::PermissionDeniedError.new(**kwargs)
|
115
|
+
in 404
|
116
|
+
OnebusawaySDK::NotFoundError.new(**kwargs)
|
117
|
+
in 409
|
118
|
+
OnebusawaySDK::ConflictError.new(**kwargs)
|
119
|
+
in 422
|
120
|
+
OnebusawaySDK::UnprocessableEntityError.new(**kwargs)
|
121
|
+
in 429
|
122
|
+
OnebusawaySDK::RateLimitError.new(**kwargs)
|
123
|
+
in (500..)
|
124
|
+
OnebusawaySDK::InternalServerError.new(**kwargs)
|
125
|
+
else
|
126
|
+
OnebusawaySDK::APIStatusError.new(**kwargs)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# @!parse
|
131
|
+
# # @return [Integer]
|
132
|
+
# attr_reader :status
|
133
|
+
|
134
|
+
# @private
|
135
|
+
#
|
136
|
+
# @param url [URI::Generic]
|
137
|
+
# @param status [Integer]
|
138
|
+
# @param body [Object, nil]
|
139
|
+
# @param request [nil]
|
140
|
+
# @param response [nil]
|
141
|
+
# @param message [String, nil]
|
142
|
+
#
|
143
|
+
def initialize(url:, status:, body:, request:, response:, message: nil)
|
144
|
+
message ||= {url: url.to_s, status: status, body: body}
|
145
|
+
super(
|
146
|
+
url: url,
|
147
|
+
status: status,
|
148
|
+
body: body,
|
149
|
+
request: request,
|
150
|
+
response: response,
|
151
|
+
message: message&.to_s
|
152
|
+
)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class BadRequestError < OnebusawaySDK::APIStatusError
|
157
|
+
HTTP_STATUS = 400
|
158
|
+
end
|
159
|
+
|
160
|
+
class AuthenticationError < OnebusawaySDK::APIStatusError
|
161
|
+
HTTP_STATUS = 401
|
162
|
+
end
|
163
|
+
|
164
|
+
class PermissionDeniedError < OnebusawaySDK::APIStatusError
|
165
|
+
HTTP_STATUS = 403
|
166
|
+
end
|
167
|
+
|
168
|
+
class NotFoundError < OnebusawaySDK::APIStatusError
|
169
|
+
HTTP_STATUS = 404
|
170
|
+
end
|
171
|
+
|
172
|
+
class ConflictError < OnebusawaySDK::APIStatusError
|
173
|
+
HTTP_STATUS = 409
|
174
|
+
end
|
175
|
+
|
176
|
+
class UnprocessableEntityError < OnebusawaySDK::APIStatusError
|
177
|
+
HTTP_STATUS = 422
|
178
|
+
end
|
179
|
+
|
180
|
+
class RateLimitError < OnebusawaySDK::APIStatusError
|
181
|
+
HTTP_STATUS = 429
|
182
|
+
end
|
183
|
+
|
184
|
+
class InternalServerError < OnebusawaySDK::APIStatusError
|
185
|
+
HTTP_STATUS = (500..)
|
186
|
+
end
|
187
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
module Models
|
5
|
+
class AgenciesWithCoverageListParams < OnebusawaySDK::BaseModel
|
6
|
+
# @!parse
|
7
|
+
# extend OnebusawaySDK::RequestParameters::Converter
|
8
|
+
include OnebusawaySDK::RequestParameters
|
9
|
+
|
10
|
+
# @!parse
|
11
|
+
# # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}]
|
12
|
+
# #
|
13
|
+
# def initialize(request_options: {}, **) = super
|
14
|
+
|
15
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
module Models
|
5
|
+
class AgenciesWithCoverageListResponse < OnebusawaySDK::Models::ResponseWrapper
|
6
|
+
# @!attribute data
|
7
|
+
#
|
8
|
+
# @return [OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data]
|
9
|
+
required :data, -> { OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data }
|
10
|
+
|
11
|
+
# @!parse
|
12
|
+
# # @param data [OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data]
|
13
|
+
# #
|
14
|
+
# def initialize(data:, **) = super
|
15
|
+
|
16
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
17
|
+
|
18
|
+
class Data < OnebusawaySDK::BaseModel
|
19
|
+
# @!attribute limit_exceeded
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
required :limit_exceeded, OnebusawaySDK::BooleanModel, api_name: :limitExceeded
|
23
|
+
|
24
|
+
# @!attribute list
|
25
|
+
#
|
26
|
+
# @return [Array<OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data::List>]
|
27
|
+
required :list,
|
28
|
+
-> { OnebusawaySDK::ArrayOf[OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data::List] }
|
29
|
+
|
30
|
+
# @!attribute references
|
31
|
+
#
|
32
|
+
# @return [OnebusawaySDK::Models::References]
|
33
|
+
required :references, -> { OnebusawaySDK::Models::References }
|
34
|
+
|
35
|
+
# @!parse
|
36
|
+
# # @param limit_exceeded [Boolean]
|
37
|
+
# # @param list [Array<OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data::List>]
|
38
|
+
# # @param references [OnebusawaySDK::Models::References]
|
39
|
+
# #
|
40
|
+
# def initialize(limit_exceeded:, list:, references:, **) = super
|
41
|
+
|
42
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
43
|
+
|
44
|
+
class List < OnebusawaySDK::BaseModel
|
45
|
+
# @!attribute agency_id
|
46
|
+
#
|
47
|
+
# @return [String]
|
48
|
+
required :agency_id, String, api_name: :agencyId
|
49
|
+
|
50
|
+
# @!attribute lat
|
51
|
+
#
|
52
|
+
# @return [Float]
|
53
|
+
required :lat, Float
|
54
|
+
|
55
|
+
# @!attribute lat_span
|
56
|
+
#
|
57
|
+
# @return [Float]
|
58
|
+
required :lat_span, Float, api_name: :latSpan
|
59
|
+
|
60
|
+
# @!attribute lon
|
61
|
+
#
|
62
|
+
# @return [Float]
|
63
|
+
required :lon, Float
|
64
|
+
|
65
|
+
# @!attribute lon_span
|
66
|
+
#
|
67
|
+
# @return [Float]
|
68
|
+
required :lon_span, Float, api_name: :lonSpan
|
69
|
+
|
70
|
+
# @!parse
|
71
|
+
# # @param agency_id [String]
|
72
|
+
# # @param lat [Float]
|
73
|
+
# # @param lat_span [Float]
|
74
|
+
# # @param lon [Float]
|
75
|
+
# # @param lon_span [Float]
|
76
|
+
# #
|
77
|
+
# def initialize(agency_id:, lat:, lat_span:, lon:, lon_span:, **) = super
|
78
|
+
|
79
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
module Models
|
5
|
+
class AgencyRetrieveParams < OnebusawaySDK::BaseModel
|
6
|
+
# @!parse
|
7
|
+
# extend OnebusawaySDK::RequestParameters::Converter
|
8
|
+
include OnebusawaySDK::RequestParameters
|
9
|
+
|
10
|
+
# @!parse
|
11
|
+
# # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}]
|
12
|
+
# #
|
13
|
+
# def initialize(request_options: {}, **) = super
|
14
|
+
|
15
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,151 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnebusawaySDK
|
4
|
+
module Models
|
5
|
+
class AgencyRetrieveResponse < OnebusawaySDK::Models::ResponseWrapper
|
6
|
+
# @!attribute data
|
7
|
+
#
|
8
|
+
# @return [OnebusawaySDK::Models::AgencyRetrieveResponse::Data]
|
9
|
+
required :data, -> { OnebusawaySDK::Models::AgencyRetrieveResponse::Data }
|
10
|
+
|
11
|
+
# @!parse
|
12
|
+
# # @param data [OnebusawaySDK::Models::AgencyRetrieveResponse::Data]
|
13
|
+
# #
|
14
|
+
# def initialize(data:, **) = super
|
15
|
+
|
16
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
17
|
+
|
18
|
+
class Data < OnebusawaySDK::BaseModel
|
19
|
+
# @!attribute entry
|
20
|
+
#
|
21
|
+
# @return [OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry]
|
22
|
+
required :entry, -> { OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry }
|
23
|
+
|
24
|
+
# @!attribute limit_exceeded
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
required :limit_exceeded, OnebusawaySDK::BooleanModel, api_name: :limitExceeded
|
28
|
+
|
29
|
+
# @!attribute references
|
30
|
+
#
|
31
|
+
# @return [OnebusawaySDK::Models::References]
|
32
|
+
required :references, -> { OnebusawaySDK::Models::References }
|
33
|
+
|
34
|
+
# @!parse
|
35
|
+
# # @param entry [OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry]
|
36
|
+
# # @param limit_exceeded [Boolean]
|
37
|
+
# # @param references [OnebusawaySDK::Models::References]
|
38
|
+
# #
|
39
|
+
# def initialize(entry:, limit_exceeded:, references:, **) = super
|
40
|
+
|
41
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
42
|
+
|
43
|
+
class Entry < OnebusawaySDK::BaseModel
|
44
|
+
# @!attribute id
|
45
|
+
#
|
46
|
+
# @return [String]
|
47
|
+
required :id, String
|
48
|
+
|
49
|
+
# @!attribute name
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
required :name, String
|
53
|
+
|
54
|
+
# @!attribute timezone
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
required :timezone, String
|
58
|
+
|
59
|
+
# @!attribute url
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
required :url, String
|
63
|
+
|
64
|
+
# @!attribute [r] disclaimer
|
65
|
+
#
|
66
|
+
# @return [String, nil]
|
67
|
+
optional :disclaimer, String
|
68
|
+
|
69
|
+
# @!parse
|
70
|
+
# # @return [String]
|
71
|
+
# attr_writer :disclaimer
|
72
|
+
|
73
|
+
# @!attribute [r] email
|
74
|
+
#
|
75
|
+
# @return [String, nil]
|
76
|
+
optional :email, String
|
77
|
+
|
78
|
+
# @!parse
|
79
|
+
# # @return [String]
|
80
|
+
# attr_writer :email
|
81
|
+
|
82
|
+
# @!attribute [r] fare_url
|
83
|
+
#
|
84
|
+
# @return [String, nil]
|
85
|
+
optional :fare_url, String, api_name: :fareUrl
|
86
|
+
|
87
|
+
# @!parse
|
88
|
+
# # @return [String]
|
89
|
+
# attr_writer :fare_url
|
90
|
+
|
91
|
+
# @!attribute [r] lang
|
92
|
+
#
|
93
|
+
# @return [String, nil]
|
94
|
+
optional :lang, String
|
95
|
+
|
96
|
+
# @!parse
|
97
|
+
# # @return [String]
|
98
|
+
# attr_writer :lang
|
99
|
+
|
100
|
+
# @!attribute [r] phone
|
101
|
+
#
|
102
|
+
# @return [String, nil]
|
103
|
+
optional :phone, String
|
104
|
+
|
105
|
+
# @!parse
|
106
|
+
# # @return [String]
|
107
|
+
# attr_writer :phone
|
108
|
+
|
109
|
+
# @!attribute [r] private_service
|
110
|
+
#
|
111
|
+
# @return [Boolean, nil]
|
112
|
+
optional :private_service, OnebusawaySDK::BooleanModel, api_name: :privateService
|
113
|
+
|
114
|
+
# @!parse
|
115
|
+
# # @return [Boolean]
|
116
|
+
# attr_writer :private_service
|
117
|
+
|
118
|
+
# @!parse
|
119
|
+
# # @param id [String]
|
120
|
+
# # @param name [String]
|
121
|
+
# # @param timezone [String]
|
122
|
+
# # @param url [String]
|
123
|
+
# # @param disclaimer [String]
|
124
|
+
# # @param email [String]
|
125
|
+
# # @param fare_url [String]
|
126
|
+
# # @param lang [String]
|
127
|
+
# # @param phone [String]
|
128
|
+
# # @param private_service [Boolean]
|
129
|
+
# #
|
130
|
+
# def initialize(
|
131
|
+
# id:,
|
132
|
+
# name:,
|
133
|
+
# timezone:,
|
134
|
+
# url:,
|
135
|
+
# disclaimer: nil,
|
136
|
+
# email: nil,
|
137
|
+
# fare_url: nil,
|
138
|
+
# lang: nil,
|
139
|
+
# phone: nil,
|
140
|
+
# private_service: nil,
|
141
|
+
# **
|
142
|
+
# )
|
143
|
+
# super
|
144
|
+
# end
|
145
|
+
|
146
|
+
# def initialize: (Hash | OnebusawaySDK::BaseModel) -> void
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|