Class: NewStoreApi::InsightsController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::InsightsController
- Defined in:
- lib/new_store_api/controllers/insights_controller.rb
Overview
InsightsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#create_insights_token(body) ⇒ ExternalTokenResponse
🚧 BETA: This endpoint is in beta and may change.
- #show_insights_activities_schema ⇒ InsightsActivitiesSchemaResponse
🚧 BETA: This endpoint is in beta and may change.- #show_insights_token ⇒ TokenResponse
🚧 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
#create_insights_token(body) ⇒ ExternalTokenResponse
🚧 BETA: This endpoint is in beta and may change.Get login token to authenticate against ThoughtSpot
See API Lifecycle Documentation for details.69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
# File 'lib/new_store_api/controllers/insights_controller.rb', line 69 def create_insights_token(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/insights/token', Server::API) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ExternalTokenResponse.method(:from_hash))) .execute end
#show_insights_activities_schema ⇒ InsightsActivitiesSchemaResponse
🚧 BETA: This endpoint is in beta and may change.Get schema for TS Activities worksheet
See API Lifecycle Documentation for details.20 21 22 23 24 25 26 27 28 29 30 31
# File 'lib/new_store_api/controllers/insights_controller.rb', line 20 def show_insights_activities_schema @api_call .request(new_request_builder(HttpMethodEnum::GET, '/insights/activities-schema', Server::API) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(InsightsActivitiesSchemaResponse.method(:from_hash))) .execute end
#show_insights_token ⇒ TokenResponse
🚧 BETA: This endpoint is in beta and may change.Get login token to authenticate against ThoughtSpot
See API Lifecycle Documentation for details.44 45 46 47 48 49 50 51 52 53 54 55
# File 'lib/new_store_api/controllers/insights_controller.rb', line 44 def show_insights_token @api_call .request(new_request_builder(HttpMethodEnum::GET, '/insights/token', Server::API) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(TokenResponse.method(:from_hash))) .execute end
- #show_insights_activities_schema ⇒ InsightsActivitiesSchemaResponse