Class: NewStoreApi::DatasetsController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::DatasetsController
- Defined in:
- lib/new_store_api/controllers/datasets_controller.rb
Overview
DatasetsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#list_datasets(x_new_store_tenant) ⇒ Object
🚧 BETA: This endpoint is in beta and may change.
- #show_dataset(dataset_id, x_new_store_tenant) ⇒ Object
🚧 BETA: This endpoint is in beta and may change.Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from NewStoreApi::BaseController
Instance Method Details
#list_datasets(x_new_store_tenant) ⇒ Object
🚧 BETA: This endpoint is in beta and may change.List all available datasets
See API Lifecycle Documentation for details.21 22 23 24 25 26 27 28 29 30 31 32
# File 'lib/new_store_api/controllers/datasets_controller.rb', line 21 def list_datasets(x_new_store_tenant) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/data-exports/datasets', Server::API) .header_param(new_parameter(x_new_store_tenant, key: 'X-NewStore-Tenant')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:json_deserialize))) .execute end
#show_dataset(dataset_id, x_new_store_tenant) ⇒ Object
🚧 BETA: This endpoint is in beta and may change.Get details of a specific dataset the dataset
See API Lifecycle Documentation for details.48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
# File 'lib/new_store_api/controllers/datasets_controller.rb', line 48 def show_dataset(dataset_id, x_new_store_tenant) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/data-exports/datasets/{dataset_id}', Server::API) .template_param(new_parameter(dataset_id, key: 'dataset_id') .should_encode(true)) .header_param(new_parameter(x_new_store_tenant, key: 'X-NewStore-Tenant')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:json_deserialize))) .execute end
- #show_dataset(dataset_id, x_new_store_tenant) ⇒ Object