Class: OnebusawaySDK::Resources::Block
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::Block
- Defined in:
- lib/onebusaway_sdk/resources/block.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Block
constructor
private
A new instance of Block.
-
#retrieve(block_id, request_options: {}) ⇒ OnebusawaySDK::Models::BlockRetrieveResponse
Get details of a specific block by ID.
Constructor Details
#initialize(client:) ⇒ Block
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Block.
29 30 31 |
# File 'lib/onebusaway_sdk/resources/block.rb', line 29 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(block_id, request_options: {}) ⇒ OnebusawaySDK::Models::BlockRetrieveResponse
Get details of a specific block by ID
17 18 19 20 21 22 23 24 |
# File 'lib/onebusaway_sdk/resources/block.rb', line 17 def retrieve(block_id, params = {}) @client.request( method: :get, path: ["api/where/block/%1$s.json", block_id], model: OnebusawaySDK::Models::BlockRetrieveResponse, options: params[:request_options] ) end |