onebusaway-sdk 0.1.0.pre.alpha.205 → 0.1.0.pre.alpha.207

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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -20
  3. data/lib/onebusaway-sdk/base_client.rb +63 -91
  4. data/lib/onebusaway-sdk/base_model.rb +489 -514
  5. data/lib/onebusaway-sdk/base_page.rb +35 -15
  6. data/lib/onebusaway-sdk/client.rb +1 -3
  7. data/lib/onebusaway-sdk/errors.rb +15 -19
  8. data/lib/onebusaway-sdk/extern.rb +1 -4
  9. data/lib/onebusaway-sdk/models/references.rb +0 -21
  10. data/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rb +0 -21
  11. data/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rb +0 -23
  12. data/lib/onebusaway-sdk/pooled_net_requester.rb +53 -54
  13. data/lib/onebusaway-sdk/request_options.rb +4 -11
  14. data/lib/onebusaway-sdk/resources/agencies_with_coverage.rb +0 -2
  15. data/lib/onebusaway-sdk/resources/agency.rb +0 -2
  16. data/lib/onebusaway-sdk/resources/arrival_and_departure.rb +0 -3
  17. data/lib/onebusaway-sdk/resources/block.rb +0 -2
  18. data/lib/onebusaway-sdk/resources/config.rb +0 -2
  19. data/lib/onebusaway-sdk/resources/current_time.rb +0 -2
  20. data/lib/onebusaway-sdk/resources/report_problem_with_stop.rb +0 -2
  21. data/lib/onebusaway-sdk/resources/report_problem_with_trip.rb +0 -2
  22. data/lib/onebusaway-sdk/resources/route.rb +0 -2
  23. data/lib/onebusaway-sdk/resources/route_ids_for_agency.rb +0 -2
  24. data/lib/onebusaway-sdk/resources/routes_for_agency.rb +0 -2
  25. data/lib/onebusaway-sdk/resources/routes_for_location.rb +0 -2
  26. data/lib/onebusaway-sdk/resources/schedule_for_route.rb +0 -2
  27. data/lib/onebusaway-sdk/resources/schedule_for_stop.rb +0 -2
  28. data/lib/onebusaway-sdk/resources/search_for_route.rb +0 -2
  29. data/lib/onebusaway-sdk/resources/search_for_stop.rb +0 -2
  30. data/lib/onebusaway-sdk/resources/shape.rb +0 -2
  31. data/lib/onebusaway-sdk/resources/stop.rb +0 -2
  32. data/lib/onebusaway-sdk/resources/stop_ids_for_agency.rb +0 -2
  33. data/lib/onebusaway-sdk/resources/stops_for_agency.rb +0 -2
  34. data/lib/onebusaway-sdk/resources/stops_for_location.rb +0 -2
  35. data/lib/onebusaway-sdk/resources/stops_for_route.rb +0 -2
  36. data/lib/onebusaway-sdk/resources/trip.rb +0 -2
  37. data/lib/onebusaway-sdk/resources/trip_details.rb +0 -2
  38. data/lib/onebusaway-sdk/resources/trip_for_vehicle.rb +0 -2
  39. data/lib/onebusaway-sdk/resources/trips_for_location.rb +0 -2
  40. data/lib/onebusaway-sdk/resources/trips_for_route.rb +0 -2
  41. data/lib/onebusaway-sdk/resources/vehicles_for_agency.rb +0 -2
  42. data/lib/onebusaway-sdk/util.rb +297 -96
  43. data/lib/onebusaway-sdk/version.rb +1 -1
  44. data/lib/onebusaway-sdk.rb +1 -0
  45. data/manifest.yaml +1 -0
  46. data/rbi/lib/onebusaway-sdk/base_client.rbi +52 -35
  47. data/rbi/lib/onebusaway-sdk/base_model.rbi +400 -256
  48. data/rbi/lib/onebusaway-sdk/base_page.rbi +3 -4
  49. data/rbi/lib/onebusaway-sdk/client.rbi +7 -2
  50. data/rbi/lib/onebusaway-sdk/errors.rbi +44 -10
  51. data/rbi/lib/onebusaway-sdk/extern.rbi +1 -1
  52. data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rbi +5 -2
  53. data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rbi +9 -6
  54. data/rbi/lib/onebusaway-sdk/models/agency_retrieve_params.rbi +5 -2
  55. data/rbi/lib/onebusaway-sdk/models/agency_retrieve_response.rbi +6 -6
  56. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rbi +5 -2
  57. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rbi +95 -14
  58. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbi +2 -9
  59. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbi +93 -12
  60. data/rbi/lib/onebusaway-sdk/models/block_retrieve_params.rbi +5 -2
  61. data/rbi/lib/onebusaway-sdk/models/block_retrieve_response.rbi +14 -20
  62. data/rbi/lib/onebusaway-sdk/models/config_retrieve_params.rbi +5 -2
  63. data/rbi/lib/onebusaway-sdk/models/config_retrieve_response.rbi +8 -14
  64. data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_params.rbi +5 -2
  65. data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_response.rbi +6 -6
  66. data/rbi/lib/onebusaway-sdk/models/references.rbi +60 -43
  67. data/rbi/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbi +10 -6
  68. data/rbi/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbi +15 -6
  69. data/rbi/lib/onebusaway-sdk/models/response_wrapper.rbi +4 -2
  70. data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rbi +5 -2
  71. data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rbi +4 -4
  72. data/rbi/lib/onebusaway-sdk/models/route_retrieve_params.rbi +5 -2
  73. data/rbi/lib/onebusaway-sdk/models/route_retrieve_response.rbi +6 -6
  74. data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_params.rbi +5 -2
  75. data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_response.rbi +6 -6
  76. data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_params.rbi +2 -2
  77. data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_response.rbi +6 -6
  78. data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbi +5 -8
  79. data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbi +19 -16
  80. data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbi +5 -8
  81. data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbi +14 -14
  82. data/rbi/lib/onebusaway-sdk/models/search_for_route_list_params.rbi +4 -2
  83. data/rbi/lib/onebusaway-sdk/models/search_for_route_list_response.rbi +6 -6
  84. data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_params.rbi +4 -2
  85. data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_response.rbi +6 -6
  86. data/rbi/lib/onebusaway-sdk/models/shape_retrieve_params.rbi +5 -2
  87. data/rbi/lib/onebusaway-sdk/models/shape_retrieve_response.rbi +7 -6
  88. data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbi +5 -2
  89. data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbi +4 -4
  90. data/rbi/lib/onebusaway-sdk/models/stop_retrieve_params.rbi +5 -2
  91. data/rbi/lib/onebusaway-sdk/models/stop_retrieve_response.rbi +6 -6
  92. data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_params.rbi +5 -2
  93. data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_response.rbi +4 -4
  94. data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_params.rbi +6 -2
  95. data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_response.rbi +6 -6
  96. data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_params.rbi +4 -2
  97. data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_response.rbi +14 -14
  98. data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rbi +10 -2
  99. data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rbi +54 -23
  100. data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbi +9 -8
  101. data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbi +54 -23
  102. data/rbi/lib/onebusaway-sdk/models/trip_retrieve_params.rbi +5 -2
  103. data/rbi/lib/onebusaway-sdk/models/trip_retrieve_response.rbi +6 -6
  104. data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_params.rbi +12 -12
  105. data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_response.rbi +56 -16
  106. data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_params.rbi +6 -2
  107. data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_response.rbi +54 -16
  108. data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rbi +3 -2
  109. data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rbi +52 -14
  110. data/rbi/lib/onebusaway-sdk/pooled_net_requester.rbi +28 -13
  111. data/rbi/lib/onebusaway-sdk/request_options.rbi +25 -2
  112. data/rbi/lib/onebusaway-sdk/resources/agencies_with_coverage.rbi +4 -2
  113. data/rbi/lib/onebusaway-sdk/resources/agency.rbi +8 -3
  114. data/rbi/lib/onebusaway-sdk/resources/arrival_and_departure.rbi +14 -3
  115. data/rbi/lib/onebusaway-sdk/resources/block.rbi +8 -3
  116. data/rbi/lib/onebusaway-sdk/resources/config.rbi +3 -2
  117. data/rbi/lib/onebusaway-sdk/resources/current_time.rbi +3 -2
  118. data/rbi/lib/onebusaway-sdk/resources/report_problem_with_stop.rbi +9 -2
  119. data/rbi/lib/onebusaway-sdk/resources/report_problem_with_trip.rbi +14 -2
  120. data/rbi/lib/onebusaway-sdk/resources/route.rbi +8 -3
  121. data/rbi/lib/onebusaway-sdk/resources/route_ids_for_agency.rbi +8 -3
  122. data/rbi/lib/onebusaway-sdk/resources/routes_for_agency.rbi +8 -3
  123. data/rbi/lib/onebusaway-sdk/resources/routes_for_location.rbi +3 -2
  124. data/rbi/lib/onebusaway-sdk/resources/schedule_for_route.rbi +11 -3
  125. data/rbi/lib/onebusaway-sdk/resources/schedule_for_stop.rbi +11 -3
  126. data/rbi/lib/onebusaway-sdk/resources/search_for_route.rbi +10 -3
  127. data/rbi/lib/onebusaway-sdk/resources/search_for_stop.rbi +10 -3
  128. data/rbi/lib/onebusaway-sdk/resources/shape.rbi +8 -3
  129. data/rbi/lib/onebusaway-sdk/resources/stop.rbi +8 -3
  130. data/rbi/lib/onebusaway-sdk/resources/stop_ids_for_agency.rbi +8 -3
  131. data/rbi/lib/onebusaway-sdk/resources/stops_for_agency.rbi +8 -3
  132. data/rbi/lib/onebusaway-sdk/resources/stops_for_location.rbi +16 -3
  133. data/rbi/lib/onebusaway-sdk/resources/stops_for_route.rbi +12 -3
  134. data/rbi/lib/onebusaway-sdk/resources/trip.rbi +8 -3
  135. data/rbi/lib/onebusaway-sdk/resources/trip_details.rbi +12 -2
  136. data/rbi/lib/onebusaway-sdk/resources/trip_for_vehicle.rbi +11 -2
  137. data/rbi/lib/onebusaway-sdk/resources/trips_for_location.rbi +12 -2
  138. data/rbi/lib/onebusaway-sdk/resources/trips_for_route.rbi +15 -3
  139. data/rbi/lib/onebusaway-sdk/resources/vehicles_for_agency.rbi +10 -3
  140. data/rbi/lib/onebusaway-sdk/util.rbi +214 -83
  141. data/rbi/lib/onebusaway-sdk/version.rbi +1 -1
  142. data/sig/onebusaway-sdk/base_client.rbs +9 -8
  143. data/sig/onebusaway-sdk/base_model.rbs +8 -6
  144. data/sig/onebusaway-sdk/base_page.rbs +1 -1
  145. data/sig/onebusaway-sdk/errors.rbs +6 -5
  146. data/sig/onebusaway-sdk/pooled_net_requester.rbs +11 -4
  147. data/sig/onebusaway-sdk/request_options.rbs +4 -0
  148. data/sig/onebusaway-sdk/util.rbs +46 -2
  149. data/sig/onebusaway-sdk/version.rbs +1 -1
  150. metadata +4 -4
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class StopIDsForAgency
6
+ # Get stop IDs for a specific agency
6
7
  sig do
7
8
  params(
8
9
  agency_id: String,
@@ -10,11 +11,15 @@ module OnebusawaySDK
10
11
  )
11
12
  .returns(OnebusawaySDK::Models::StopIDsForAgencyListResponse)
12
13
  end
13
- def list(agency_id, request_options: {})
14
+ def list(
15
+ # ID of the agency
16
+ agency_id,
17
+ request_options: {}
18
+ )
14
19
  end
15
20
 
16
- sig { params(client: OnebusawaySDK::Client).void }
17
- def initialize(client:)
21
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
22
+ def self.new(client:)
18
23
  end
19
24
  end
20
25
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class StopsForAgency
6
+ # Get stops for a specific agency
6
7
  sig do
7
8
  params(
8
9
  agency_id: String,
@@ -10,11 +11,15 @@ module OnebusawaySDK
10
11
  )
11
12
  .returns(OnebusawaySDK::Models::StopsForAgencyListResponse)
12
13
  end
13
- def list(agency_id, request_options: {})
14
+ def list(
15
+ # ID of the agency
16
+ agency_id,
17
+ request_options: {}
18
+ )
14
19
  end
15
20
 
16
- sig { params(client: OnebusawaySDK::Client).void }
17
- def initialize(client:)
21
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
22
+ def self.new(client:)
18
23
  end
19
24
  end
20
25
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class StopsForLocation
6
+ # stops-for-location
6
7
  sig do
7
8
  params(
8
9
  lat: Float,
@@ -15,11 +16,23 @@ module OnebusawaySDK
15
16
  )
16
17
  .returns(OnebusawaySDK::Models::StopsForLocationListResponse)
17
18
  end
18
- def list(lat:, lon:, lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {})
19
+ def list(
20
+ lat:,
21
+ lon:,
22
+ # An alternative to radius to set the search bounding box (optional)
23
+ lat_span: nil,
24
+ # An alternative to radius to set the search bounding box (optional)
25
+ lon_span: nil,
26
+ # A search query string to filter the results
27
+ query: nil,
28
+ # The radius in meters to search within
29
+ radius: nil,
30
+ request_options: {}
31
+ )
19
32
  end
20
33
 
21
- sig { params(client: OnebusawaySDK::Client).void }
22
- def initialize(client:)
34
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
35
+ def self.new(client:)
23
36
  end
24
37
  end
25
38
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class StopsForRoute
6
+ # Get stops for a specific route
6
7
  sig do
7
8
  params(
8
9
  route_id: String,
@@ -12,11 +13,19 @@ module OnebusawaySDK
12
13
  )
13
14
  .returns(OnebusawaySDK::Models::StopsForRouteListResponse)
14
15
  end
15
- def list(route_id, include_polylines: nil, time: nil, request_options: {})
16
+ def list(
17
+ # ID of the route
18
+ route_id,
19
+ # Include polyline elements in the response (default true)
20
+ include_polylines: nil,
21
+ # Specify service date (YYYY-MM-DD or epoch) (default today)
22
+ time: nil,
23
+ request_options: {}
24
+ )
16
25
  end
17
26
 
18
- sig { params(client: OnebusawaySDK::Client).void }
19
- def initialize(client:)
27
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
28
+ def self.new(client:)
20
29
  end
21
30
  end
22
31
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class Trip
6
+ # Get details of a specific trip
6
7
  sig do
7
8
  params(
8
9
  trip_id: String,
@@ -10,11 +11,15 @@ module OnebusawaySDK
10
11
  )
11
12
  .returns(OnebusawaySDK::Models::TripRetrieveResponse)
12
13
  end
13
- def retrieve(trip_id, request_options: {})
14
+ def retrieve(
15
+ # ID of the trip
16
+ trip_id,
17
+ request_options: {}
18
+ )
14
19
  end
15
20
 
16
- sig { params(client: OnebusawaySDK::Client).void }
17
- def initialize(client:)
21
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
22
+ def self.new(client:)
18
23
  end
19
24
  end
20
25
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class TripDetails
6
+ # Retrieve Trip Details
6
7
  sig do
7
8
  params(
8
9
  trip_id: String,
@@ -16,18 +17,27 @@ module OnebusawaySDK
16
17
  .returns(OnebusawaySDK::Models::TripDetailRetrieveResponse)
17
18
  end
18
19
  def retrieve(
20
+ # ID of the trip to retrieve details for.
19
21
  trip_id,
22
+ # Whether to include the full schedule element in the tripDetails section
23
+ # (defaults to true).
20
24
  include_schedule: nil,
25
+ # Whether to include the full status element in the tripDetails section (defaults
26
+ # to true).
21
27
  include_status: nil,
28
+ # Whether to include the full trip element in the references section (defaults to
29
+ # true).
22
30
  include_trip: nil,
31
+ # Service date for the trip as Unix time in milliseconds (optional).
23
32
  service_date: nil,
33
+ # Time parameter to query the system at a specific time (optional).
24
34
  time: nil,
25
35
  request_options: {}
26
36
  )
27
37
  end
28
38
 
29
- sig { params(client: OnebusawaySDK::Client).void }
30
- def initialize(client:)
39
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
40
+ def self.new(client:)
31
41
  end
32
42
  end
33
43
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class TripForVehicle
6
+ # Retrieve trip for a specific vehicle
6
7
  sig do
7
8
  params(
8
9
  vehicle_id: String,
@@ -15,17 +16,25 @@ module OnebusawaySDK
15
16
  .returns(OnebusawaySDK::Models::TripForVehicleRetrieveResponse)
16
17
  end
17
18
  def retrieve(
19
+ # ID of the vehicle to retrieve trip details for.
18
20
  vehicle_id,
21
+ # Determines whether full <schedule/> element is included in the <tripDetails/>
22
+ # section. Defaults to false.
19
23
  include_schedule: nil,
24
+ # Determines whether the full <status/> element is included in the <tripDetails/>
25
+ # section. Defaults to true.
20
26
  include_status: nil,
27
+ # Determines whether full <trip/> element is included in the <references/>
28
+ # section. Defaults to false.
21
29
  include_trip: nil,
30
+ # Time parameter to query the system at a specific time (optional).
22
31
  time: nil,
23
32
  request_options: {}
24
33
  )
25
34
  end
26
35
 
27
- sig { params(client: OnebusawaySDK::Client).void }
28
- def initialize(client:)
36
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
37
+ def self.new(client:)
29
38
  end
30
39
  end
31
40
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class TripsForLocation
6
+ # Retrieve trips for a given location
6
7
  sig do
7
8
  params(
8
9
  lat: Float,
@@ -17,19 +18,28 @@ module OnebusawaySDK
17
18
  .returns(OnebusawaySDK::Models::TripsForLocationListResponse)
18
19
  end
19
20
  def list(
21
+ # The latitude coordinate of the search center
20
22
  lat:,
23
+ # Latitude span of the search bounding box
21
24
  lat_span:,
25
+ # The longitude coordinate of the search center
22
26
  lon:,
27
+ # Longitude span of the search bounding box
23
28
  lon_span:,
29
+ # Whether to include full schedule elements in the tripDetails section. Defaults
30
+ # to false.
24
31
  include_schedule: nil,
32
+ # Whether to include full trip elements in the references section. Defaults to
33
+ # false.
25
34
  include_trip: nil,
35
+ # Specific time for the query. Defaults to the current time.
26
36
  time: nil,
27
37
  request_options: {}
28
38
  )
29
39
  end
30
40
 
31
- sig { params(client: OnebusawaySDK::Client).void }
32
- def initialize(client:)
41
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
42
+ def self.new(client:)
33
43
  end
34
44
  end
35
45
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class TripsForRoute
6
+ # Search for active trips for a specific route.
6
7
  sig do
7
8
  params(
8
9
  route_id: String,
@@ -13,11 +14,22 @@ module OnebusawaySDK
13
14
  )
14
15
  .returns(OnebusawaySDK::Models::TripsForRouteListResponse)
15
16
  end
16
- def list(route_id, include_schedule: nil, include_status: nil, time: nil, request_options: {})
17
+ def list(
18
+ # The ID of the route.
19
+ route_id,
20
+ # Determine whether full schedule elements are included. Defaults to false.
21
+ include_schedule: nil,
22
+ # Determine whether full tripStatus elements with real-time information are
23
+ # included. Defaults to false.
24
+ include_status: nil,
25
+ # Query the system at a specific time. Useful for testing.
26
+ time: nil,
27
+ request_options: {}
28
+ )
17
29
  end
18
30
 
19
- sig { params(client: OnebusawaySDK::Client).void }
20
- def initialize(client:)
31
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
32
+ def self.new(client:)
21
33
  end
22
34
  end
23
35
  end
@@ -3,6 +3,7 @@
3
3
  module OnebusawaySDK
4
4
  module Resources
5
5
  class VehiclesForAgency
6
+ # Get vehicles for a specific agency
6
7
  sig do
7
8
  params(
8
9
  agency_id: String,
@@ -11,11 +12,17 @@ module OnebusawaySDK
11
12
  )
12
13
  .returns(OnebusawaySDK::Models::VehiclesForAgencyListResponse)
13
14
  end
14
- def list(agency_id, time: nil, request_options: {})
15
+ def list(
16
+ # ID of the agency
17
+ agency_id,
18
+ # Specific time for querying the status (timestamp format)
19
+ time: nil,
20
+ request_options: {}
21
+ )
15
22
  end
16
23
 
17
- sig { params(client: OnebusawaySDK::Client).void }
18
- def initialize(client:)
24
+ sig { params(client: OnebusawaySDK::Client).returns(T.attached_class) }
25
+ def self.new(client:)
19
26
  end
20
27
  end
21
28
  end
@@ -1,85 +1,121 @@
1
1
  # typed: strong
2
2
 
3
3
  module OnebusawaySDK
4
+ # @api private
4
5
  module Util
6
+ # @api private
5
7
  sig { returns(Float) }
6
8
  def self.monotonic_secs
7
9
  end
8
10
 
9
- sig { returns(String) }
10
- def self.arch
11
- end
11
+ class << self
12
+ # @api private
13
+ sig { returns(String) }
14
+ def arch
15
+ end
12
16
 
13
- sig { returns(String) }
14
- def self.os
17
+ # @api private
18
+ sig { returns(String) }
19
+ def os
20
+ end
15
21
  end
16
22
 
17
- sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) }
18
- def self.primitive?(input)
19
- end
23
+ class << self
24
+ # @api private
25
+ sig { params(input: T.anything).returns(T::Boolean) }
26
+ def primitive?(input)
27
+ end
20
28
 
21
- sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) }
22
- def self.coerce_boolean(input)
23
- end
29
+ # @api private
30
+ sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) }
31
+ def coerce_boolean(input)
32
+ end
24
33
 
25
- sig { params(input: T.anything).returns(T.nilable(T::Boolean)) }
26
- def self.coerce_boolean!(input)
27
- end
34
+ # @api private
35
+ sig { params(input: T.anything).returns(T.nilable(T::Boolean)) }
36
+ def coerce_boolean!(input)
37
+ end
28
38
 
29
- sig { params(input: T.anything).returns(T.any(Integer, T.anything)) }
30
- def self.coerce_integer(input)
31
- end
39
+ # @api private
40
+ sig { params(input: T.anything).returns(T.any(Integer, T.anything)) }
41
+ def coerce_integer(input)
42
+ end
32
43
 
33
- sig { params(input: T.anything).returns(T.any(Float, T.anything)) }
34
- def self.coerce_float(input)
35
- end
44
+ # @api private
45
+ sig { params(input: T.anything).returns(T.any(Float, T.anything)) }
46
+ def coerce_float(input)
47
+ end
36
48
 
37
- sig { params(input: T.anything).returns(T.any(T::Hash[T.anything, T.anything], T.anything)) }
38
- def self.coerce_hash(input)
49
+ # @api private
50
+ sig { params(input: T.anything).returns(T.any(T::Hash[T.anything, T.anything], T.anything)) }
51
+ def coerce_hash(input)
52
+ end
39
53
  end
40
54
 
41
55
  OMIT = T.let(T.anything, T.anything)
42
56
 
43
- sig { params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(T.anything) }
44
- private_class_method def self.deep_merge_lr(lhs, rhs, concat: false)
45
- end
57
+ class << self
58
+ # @api private
59
+ sig { params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(T.anything) }
60
+ private def deep_merge_lr(lhs, rhs, concat: false)
61
+ end
46
62
 
47
- sig do
48
- params(values: T::Array[T.anything], sentinel: T.nilable(T.anything), concat: T::Boolean)
49
- .returns(T.anything)
50
- end
51
- def self.deep_merge(*values, sentinel: nil, concat: false)
52
- end
53
-
54
- sig do
55
- params(
56
- data: T.any(T::Hash[Symbol, T.anything], T::Array[T.anything], T.anything),
57
- pick: T.nilable(T.any(Symbol, Integer, T::Array[T.any(Symbol, Integer)])),
58
- sentinel: T.nilable(T.anything),
59
- blk: T.nilable(T.proc.returns(T.anything))
63
+ # @api private
64
+ #
65
+ # Recursively merge one hash with another. If the values at a given key are not
66
+ # both hashes, just take the new value.
67
+ sig do
68
+ params(values: T::Array[T.anything], sentinel: T.nilable(T.anything), concat: T::Boolean)
69
+ .returns(T.anything)
70
+ end
71
+ def deep_merge(
72
+ *values,
73
+ # the value to return if no values are provided.
74
+ sentinel: nil,
75
+ # whether to merge sequences by concatenation.
76
+ concat: false
60
77
  )
61
- .returns(T.nilable(T.anything))
62
- end
63
- def self.dig(data, pick, sentinel = nil, &blk)
64
- end
78
+ end
65
79
 
66
- sig { params(uri: URI::Generic).returns(String) }
67
- def self.uri_origin(uri)
80
+ # @api private
81
+ sig do
82
+ params(
83
+ data: T.any(T::Hash[Symbol, T.anything], T::Array[T.anything], T.anything),
84
+ pick: T.nilable(T.any(Symbol, Integer, T::Array[T.any(Symbol, Integer)])),
85
+ sentinel: T.nilable(T.anything),
86
+ blk: T.nilable(T.proc.returns(T.anything))
87
+ )
88
+ .returns(T.nilable(T.anything))
89
+ end
90
+ def dig(data, pick, sentinel = nil, &blk)
91
+ end
68
92
  end
69
93
 
70
- sig { params(path: T.any(String, T::Array[String])).returns(String) }
71
- def self.interpolate_path(path)
72
- end
94
+ class << self
95
+ # @api private
96
+ sig { params(uri: URI::Generic).returns(String) }
97
+ def uri_origin(uri)
98
+ end
73
99
 
74
- sig { params(query: T.nilable(String)).returns(T::Hash[String, T::Array[String]]) }
75
- def self.decode_query(query)
100
+ # @api private
101
+ sig { params(path: T.any(String, T::Array[String])).returns(String) }
102
+ def interpolate_path(path)
103
+ end
76
104
  end
77
105
 
78
- sig do
79
- params(query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
80
- .returns(T.nilable(String))
81
- end
82
- def self.encode_query(query)
106
+ class << self
107
+ # @api private
108
+ sig { params(query: T.nilable(String)).returns(T::Hash[String, T::Array[String]]) }
109
+ def decode_query(query)
110
+ end
111
+
112
+ # @api private
113
+ sig do
114
+ params(query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
115
+ .returns(T.nilable(String))
116
+ end
117
+ def encode_query(query)
118
+ end
83
119
  end
84
120
 
85
121
  ParsedUriShape = T.type_alias do
@@ -92,48 +128,143 @@ module OnebusawaySDK
92
128
  }
93
129
  end
94
130
 
95
- sig { params(url: T.any(URI::Generic, String)).returns(OnebusawaySDK::Util::ParsedUriShape) }
96
- def self.parse_uri(url)
97
- end
131
+ class << self
132
+ # @api private
133
+ sig { params(url: T.any(URI::Generic, String)).returns(OnebusawaySDK::Util::ParsedUriShape) }
134
+ def parse_uri(url)
135
+ end
98
136
 
99
- sig { params(parsed: OnebusawaySDK::Util::ParsedUriShape).returns(URI::Generic) }
100
- def self.unparse_uri(parsed)
101
- end
137
+ # @api private
138
+ sig { params(parsed: OnebusawaySDK::Util::ParsedUriShape).returns(URI::Generic) }
139
+ def unparse_uri(parsed)
140
+ end
102
141
 
103
- sig do
104
- params(lhs: OnebusawaySDK::Util::ParsedUriShape, rhs: OnebusawaySDK::Util::ParsedUriShape)
105
- .returns(URI::Generic)
142
+ # @api private
143
+ sig do
144
+ params(lhs: OnebusawaySDK::Util::ParsedUriShape, rhs: OnebusawaySDK::Util::ParsedUriShape)
145
+ .returns(URI::Generic)
146
+ end
147
+ def join_parsed_uri(lhs, rhs)
148
+ end
106
149
  end
107
- def self.join_parsed_uri(lhs, rhs)
150
+
151
+ class << self
152
+ # @api private
153
+ sig do
154
+ params(
155
+ headers: T::Hash[String,
156
+ T.nilable(T.any(String, Integer, T::Array[T.nilable(T.any(String, Integer))]))]
157
+ )
158
+ .returns(T::Hash[String, String])
159
+ end
160
+ def normalized_headers(*headers)
161
+ end
108
162
  end
109
163
 
110
- sig do
111
- params(
112
- headers: T::Hash[String,
113
- T.nilable(T.any(String, Integer, T::Array[T.nilable(T.any(String, Integer))]))]
114
- )
115
- .returns(T::Hash[String, String])
164
+ # @api private
165
+ #
166
+ # An adapter that satisfies the IO interface required by `::IO.copy_stream`
167
+ class ReadIOAdapter
168
+ # @api private
169
+ sig { params(max_len: T.nilable(Integer)).returns(String) }
170
+ private def read_enum(max_len)
171
+ end
172
+
173
+ # @api private
174
+ sig { params(max_len: T.nilable(Integer), out_string: T.nilable(String)).returns(T.nilable(String)) }
175
+ def read(max_len = nil, out_string = nil)
176
+ end
177
+
178
+ # @api private
179
+ sig do
180
+ params(
181
+ stream: T.any(String, IO, StringIO, T::Enumerable[String]),
182
+ blk: T.proc.params(arg0: String).void
183
+ )
184
+ .returns(T.attached_class)
185
+ end
186
+ def self.new(stream, &blk)
187
+ end
116
188
  end
117
- def self.normalized_headers(*headers)
189
+
190
+ class << self
191
+ sig { params(blk: T.proc.params(y: Enumerator::Yielder).void).returns(T::Enumerable[String]) }
192
+ def string_io(&blk)
193
+ end
118
194
  end
119
195
 
120
- sig { params(io: StringIO, boundary: String, key: T.any(Symbol, String), val: T.anything).void }
121
- private_class_method def self.encode_multipart_formdata(io, boundary:, key:, val:)
196
+ class << self
197
+ # @api private
198
+ sig do
199
+ params(y: Enumerator::Yielder, boundary: String, key: T.any(Symbol, String), val: T.anything).void
200
+ end
201
+ private def encode_multipart_formdata(y, boundary:, key:, val:)
202
+ end
203
+
204
+ # @api private
205
+ sig { params(body: T.anything).returns([String, T::Enumerable[String]]) }
206
+ private def encode_multipart_streaming(body)
207
+ end
208
+
209
+ # @api private
210
+ sig { params(headers: T::Hash[String, String], body: T.anything).returns(T.anything) }
211
+ def encode_content(headers, body)
212
+ end
213
+
214
+ # @api private
215
+ sig do
216
+ params(
217
+ headers: T.any(T::Hash[String, String], Net::HTTPHeader),
218
+ stream: T::Enumerable[String],
219
+ suppress_error: T::Boolean
220
+ )
221
+ .returns(T.anything)
222
+ end
223
+ def decode_content(headers, stream:, suppress_error: false)
224
+ end
122
225
  end
123
226
 
124
- sig { params(headers: T::Hash[String, String], body: T.anything).returns(T.anything) }
125
- def self.encode_content(headers, body)
227
+ class << self
228
+ # @api private
229
+ #
230
+ # https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
231
+ sig do
232
+ params(enum: T::Enumerable[T.anything], external: T::Boolean, close: T.proc.void)
233
+ .returns(T::Enumerable[T.anything])
234
+ end
235
+ def fused_enum(enum, external: false, &close)
236
+ end
237
+
238
+ # @api private
239
+ sig { params(enum: T.nilable(T::Enumerable[T.anything])).void }
240
+ def close_fused!(enum)
241
+ end
242
+
243
+ # @api private
244
+ sig do
245
+ params(enum: T.nilable(T::Enumerable[T.anything]), blk: T.proc.params(arg0: Enumerator::Yielder).void)
246
+ .returns(T::Enumerable[T.anything])
247
+ end
248
+ def chain_fused(enum, &blk)
249
+ end
126
250
  end
127
251
 
128
- sig do
129
- params(
130
- headers: T.any(T::Hash[String, String], Net::HTTPHeader),
131
- stream: T::Enumerable[String],
132
- suppress_error: T::Boolean
133
- )
134
- .returns(T.anything)
252
+ ServerSentEvent = T.type_alias do
253
+ {event: T.nilable(String), data: T.nilable(String), id: T.nilable(String), retry: T.nilable(Integer)}
135
254
  end
136
- def self.decode_content(headers, stream:, suppress_error: false)
255
+
256
+ class << self
257
+ # @api private
258
+ sig { params(enum: T::Enumerable[String]).returns(T::Enumerable[String]) }
259
+ def decode_lines(enum)
260
+ end
261
+
262
+ # @api private
263
+ #
264
+ # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream
265
+ sig { params(lines: T::Enumerable[String]).returns(OnebusawaySDK::Util::ServerSentEvent) }
266
+ def decode_sse(lines)
267
+ end
137
268
  end
138
269
  end
139
270
  end
@@ -1,5 +1,5 @@
1
1
  # typed: strong
2
2
 
3
3
  module OnebusawaySDK
4
- VERSION = "0.1.0-alpha.205"
4
+ VERSION = "0.1.0-alpha.207"
5
5
  end