Class: Peddler::APIs::DataKiosk20231115
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::DataKiosk20231115
- Includes:
- Helpers::DataKiosk20231115
- Defined in:
- lib/peddler/apis/data_kiosk_2023_11_15.rb,
lib/peddler/apis/data_kiosk_2023_11_15/error.rb,
lib/peddler/apis/data_kiosk_2023_11_15/query.rb,
lib/peddler/apis/data_kiosk_2023_11_15/error_list.rb,
lib/peddler/apis/data_kiosk_2023_11_15/query_list.rb,
lib/peddler/apis/data_kiosk_2023_11_15/get_queries_response.rb,
lib/peddler/apis/data_kiosk_2023_11_15/create_query_response.rb,
lib/peddler/apis/data_kiosk_2023_11_15/get_document_response.rb,
lib/peddler/apis/data_kiosk_2023_11_15/create_query_specification.rb,
sig/peddler/apis/data_kiosk_2023_11_15.rbs
Overview
Selling Partner API for Data Kiosk
The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
Defined Under Namespace
Classes: CreateQueryResponse, CreateQuerySpecification, Error, ErrorList, GetDocumentResponse, GetQueriesResponse, Query, QueryList
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#cancel_query(query_id, rate_limit: 0.0222) ⇒ Peddler::Response
Cancels the query specified by the
queryIdparameter. -
#create_query(body, rate_limit: 0.0167) ⇒ Peddler::Response
Creates a Data Kiosk query request.
-
#get_document(document_id, rate_limit: 0.0167) ⇒ Peddler::Response
Returns the information required for retrieving a Data Kiosk document's contents.
-
#get_queries(processing_statuses: nil, page_size: 10, created_since: nil, created_until: nil, pagination_token: nil, rate_limit: 0.0222) ⇒ Peddler::Response
Returns details for the Data Kiosk queries that match the specified filters.
-
#get_query(query_id, rate_limit: 2.0) ⇒ Peddler::Response
Returns query details for the query specified by the
queryIdparameter.
Methods included from Helpers::DataKiosk20231115
#download_query_document, #download_query_document_from_url
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#cancel_query(query_id, rate_limit: 0.0222) ⇒ Peddler::Response
This operation can make a static sandbox call.
Cancels the query specified by the queryId parameter. Only queries with a non-terminal processingStatus
(IN_QUEUE, IN_PROGRESS) can be cancelled. Cancelling a query that already has a processingStatus of
CANCELLED will no-op. Cancelled queries are returned in subsequent calls to the getQuery and getQueries
operations.
74 75 76 77 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 74 def cancel_query(query_id, rate_limit: 0.0222) path = "/dataKiosk/2023-11-15/queries/#{percent_encode(query_id)}" delete(path, rate_limit:) end |
#create_query(body, rate_limit: 0.0167) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a Data Kiosk query request.
Note: The retention of a query varies based on the fields requested. Each field within a schema is annotated
with a @resultRetention directive that defines how long a query containing that field will be retained. When a
query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The
retention of a query's resulting documents always matches the retention of the query.
58 59 60 61 62 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 58 def create_query(body, rate_limit: 0.0167) path = "/dataKiosk/2023-11-15/queries" parser = -> { CreateQueryResponse } post(path, body:, rate_limit:, parser:) end |
#get_document(document_id, rate_limit: 0.0167) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the information required for retrieving a Data Kiosk document's contents. See the createQuery
operation for details about document retention.
99 100 101 102 103 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 99 def get_document(document_id, rate_limit: 0.0167) path = "/dataKiosk/2023-11-15/documents/#{percent_encode(document_id)}" parser = -> { GetDocumentResponse } get(path, rate_limit:, parser:) end |
#get_queries(processing_statuses: nil, page_size: 10, created_since: nil, created_until: nil, pagination_token: nil, rate_limit: 0.0222) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns details for the Data Kiosk queries that match the specified filters. See the createQuery operation for
details about query retention.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 33 def get_queries(processing_statuses: nil, page_size: 10, created_since: nil, created_until: nil, pagination_token: nil, rate_limit: 0.0222) path = "/dataKiosk/2023-11-15/queries" params = { "processingStatuses" => stringify_array(processing_statuses), "pageSize" => page_size, "createdSince" => created_since, "createdUntil" => created_until, "paginationToken" => pagination_token, }.compact parser = -> { GetQueriesResponse } get(path, params:, rate_limit:, parser:) end |
#get_query(query_id, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns query details for the query specified by the queryId parameter. See the createQuery operation for
details about query retention.
86 87 88 89 90 |
# File 'lib/peddler/apis/data_kiosk_2023_11_15.rb', line 86 def get_query(query_id, rate_limit: 2.0) path = "/dataKiosk/2023-11-15/queries/#{percent_encode(query_id)}" parser = -> { Query } get(path, rate_limit:, parser:) end |