Class: Algolia::IngestionClient
- Inherits:
-
Object
- Object
- Algolia::IngestionClient
- Defined in:
- lib/algolia/api/ingestion_client.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#create_authentication(authentication_create, request_options = {}) ⇒ AuthenticationCreateResponse
Creates a new authentication resource.
-
#create_authentication_with_http_info(authentication_create, request_options = {}) ⇒ Http::Response
Creates a new authentication resource.
-
#create_destination(destination_create, request_options = {}) ⇒ DestinationCreateResponse
Creates a new destination.
-
#create_destination_with_http_info(destination_create, request_options = {}) ⇒ Http::Response
Creates a new destination.
-
#create_source(source_create, request_options = {}) ⇒ SourceCreateResponse
Creates a new source.
-
#create_source_with_http_info(source_create, request_options = {}) ⇒ Http::Response
Creates a new source.
- #create_task(task_create, request_options = {}) ⇒ TaskCreateResponse
-
#create_task_with_http_info(task_create, request_options = {}) ⇒ Http::Response
The response.
- #create_transformation(transformation_create, request_options = {}) ⇒ TransformationCreateResponse
-
#create_transformation_with_http_info(transformation_create, request_options = {}) ⇒ Http::Response
The response.
- #custom_delete(path, parameters = nil, request_options = {}) ⇒ Object
-
#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
The response.
- #custom_get(path, parameters = nil, request_options = {}) ⇒ Object
-
#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
The response.
- #custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
-
#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
The response.
- #custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
-
#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
The response.
-
#delete_authentication(authentication_id, request_options = {}) ⇒ DeleteResponse
Deletes an authentication resource.
-
#delete_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response
Deletes an authentication resource.
-
#delete_destination(destination_id, request_options = {}) ⇒ DeleteResponse
Deletes a destination by its ID.
-
#delete_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response
Deletes a destination by its ID.
-
#delete_source(source_id, request_options = {}) ⇒ DeleteResponse
Deletes a source by its ID.
-
#delete_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Deletes a source by its ID.
- #delete_task(task_id, request_options = {}) ⇒ DeleteResponse
-
#delete_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
The response.
- #delete_transformation(transformation_id, request_options = {}) ⇒ DeleteResponse
-
#delete_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response
The response.
-
#disable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse
Disables a task.
-
#disable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Disables a task.
-
#enable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse
Enables a task.
-
#enable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Enables a task.
-
#get_authentication(authentication_id, request_options = {}) ⇒ Authentication
Retrieves an authentication resource by its ID.
-
#get_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response
Retrieves an authentication resource by its ID.
-
#get_authentications(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ ListAuthenticationsResponse
Retrieves a list of all authentication resources.
-
#get_authentications_with_http_info(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of all authentication resources.
-
#get_destination(destination_id, request_options = {}) ⇒ Destination
Retrieves a destination by its ID.
-
#get_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response
Retrieves a destination by its ID.
-
#get_destinations(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListDestinationsResponse
Retrieves a list of destinations.
-
#get_destinations_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of destinations.
-
#get_event(run_id, event_id, request_options = {}) ⇒ Event
Retrieves a single task run event by its ID.
-
#get_event_with_http_info(run_id, event_id, request_options = {}) ⇒ Http::Response
Retrieves a single task run event by its ID.
-
#get_events(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ ListEventsResponse
Retrieves a list of events for a task run, identified by it’s ID.
-
#get_events_with_http_info(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of events for a task run, identified by it's ID.
-
#get_run(run_id, request_options = {}) ⇒ Run
Retrieve a single task run by its ID.
-
#get_run_with_http_info(run_id, request_options = {}) ⇒ Http::Response
Retrieve a single task run by its ID.
-
#get_runs(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ RunListResponse
Retrieve a list of task runs.
-
#get_runs_with_http_info(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response
Retrieve a list of task runs.
-
#get_source(source_id, request_options = {}) ⇒ Source
Retrieve a source by its ID.
-
#get_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Retrieve a source by its ID.
-
#get_sources(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListSourcesResponse
Retrieves a list of sources.
-
#get_sources_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of sources.
-
#get_task(task_id, request_options = {}) ⇒ Task
Retrieves a task by its ID.
-
#get_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Retrieves a task by its ID.
-
#get_tasks(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ ListTasksResponse
Retrieves a list of tasks.
-
#get_tasks_with_http_info(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of tasks.
-
#get_transformation(transformation_id, request_options = {}) ⇒ Transformation
Retrieves a transformation by its ID.
-
#get_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response
Retrieves a transformation by its ID.
-
#get_transformations(sort = nil, order = nil, request_options = {}) ⇒ ListTransformationsResponse
Retrieves a list of transformations.
-
#get_transformations_with_http_info(sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of transformations.
-
#initialize(config = nil) ⇒ IngestionClient
constructor
A new instance of IngestionClient.
-
#run_task(task_id, request_options = {}) ⇒ RunResponse
Runs a task.
-
#run_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Runs a task.
-
#search_authentications(authentication_search, request_options = {}) ⇒ Array<Authentication>
Searches for authentication resources.
-
#search_authentications_with_http_info(authentication_search, request_options = {}) ⇒ Http::Response
Searches for authentication resources.
-
#search_destinations(destination_search, request_options = {}) ⇒ Array<Destination>
Searches for destinations.
-
#search_destinations_with_http_info(destination_search, request_options = {}) ⇒ Http::Response
Searches for destinations.
-
#search_sources(source_search, request_options = {}) ⇒ Array<Source>
Searches for sources.
-
#search_sources_with_http_info(source_search, request_options = {}) ⇒ Http::Response
Searches for sources.
-
#search_tasks(task_search, request_options = {}) ⇒ Array<Task>
Searches for tasks.
-
#search_tasks_with_http_info(task_search, request_options = {}) ⇒ Http::Response
Searches for tasks.
-
#search_transformations(transformation_search, request_options = {}) ⇒ Array<Transformation>
Searches for transformations.
-
#search_transformations_with_http_info(transformation_search, request_options = {}) ⇒ Http::Response
Searches for transformations.
-
#trigger_docker_source_discover(source_id, request_options = {}) ⇒ SourceWatchResponse
Triggers a stream-listing request for a source.
-
#trigger_docker_source_discover_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Triggers a stream-listing request for a source.
-
#try_transformations(transformation_try, request_options = {}) ⇒ TransformationTryResponse
Try a transformation.
-
#try_transformations_with_http_info(transformation_try, request_options = {}) ⇒ Http::Response
Try a transformation.
-
#update_authentication(authentication_id, authentication_update, request_options = {}) ⇒ AuthenticationUpdateResponse
Updates an authentication resource.
-
#update_authentication_with_http_info(authentication_id, authentication_update, request_options = {}) ⇒ Http::Response
Updates an authentication resource.
-
#update_destination(destination_id, destination_update, request_options = {}) ⇒ DestinationUpdateResponse
Updates the destination by its ID.
-
#update_destination_with_http_info(destination_id, destination_update, request_options = {}) ⇒ Http::Response
Updates the destination by its ID.
-
#update_source(source_id, source_update, request_options = {}) ⇒ SourceUpdateResponse
Updates a source by its ID.
-
#update_source_with_http_info(source_id, source_update, request_options = {}) ⇒ Http::Response
Updates a source by its ID.
- #update_task(task_id, task_update, request_options = {}) ⇒ TaskUpdateResponse
-
#update_task_with_http_info(task_id, task_update, request_options = {}) ⇒ Http::Response
The response.
- #update_transformation(transformation_id, transformation_create, request_options = {}) ⇒ TransformationUpdateResponse
-
#update_transformation_with_http_info(transformation_id, transformation_create, request_options = {}) ⇒ Http::Response
The response.
-
#validate_source(source_create = nil, request_options = {}) ⇒ SourceWatchResponse
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
-
#validate_source_before_update(source_id, source_update, request_options = {}) ⇒ SourceWatchResponse
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
-
#validate_source_before_update_with_http_info(source_id, source_update, request_options = {}) ⇒ Http::Response
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
-
#validate_source_with_http_info(source_create = nil, request_options = {}) ⇒ Http::Response
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
Constructor Details
#initialize(config = nil) ⇒ IngestionClient
Returns a new instance of IngestionClient.
7 8 9 10 11 12 13 |
# File 'lib/algolia/api/ingestion_client.rb', line 7 def initialize(config = nil) raise "`config` is missing." if config.nil? raise "`app_id` is missing." if config.app_id.nil? || config.app_id == "" raise "`api_key` is missing." if config.api_key.nil? || config.api_key == "" @api_client = Algolia::ApiClient.new(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/algolia/api/ingestion_client.rb', line 5 def api_client @api_client end |
Class Method Details
.create(app_id, api_key, region = nil, opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/algolia/api/ingestion_client.rb', line 15 def self.create(app_id, api_key, region = nil, opts = {}) hosts = [] regions = ["eu", "us"] if region.is_a?(Hash) && (opts.nil? || opts.empty?) opts = region region = nil end if region.nil? || !region.is_a?(String) || !regions.include?(region) raise "`region` is required and must be one of the following: #{regions.join(", ")}" end hosts << Transport::StatefulHost.new( "data.{region}.algolia.com".sub!("{region}", region), accept: CallType::READ | CallType::WRITE ) config = Algolia::Configuration.new(app_id, api_key, hosts, "Ingestion", opts) create_with_config(config) end |
.create_with_config(config) ⇒ Object
38 39 40 |
# File 'lib/algolia/api/ingestion_client.rb', line 38 def self.create_with_config(config) new(config) end |
Instance Method Details
#create_authentication(authentication_create, request_options = {}) ⇒ AuthenticationCreateResponse
Creates a new authentication resource.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
85 86 87 88 89 90 91 |
# File 'lib/algolia/api/ingestion_client.rb', line 85 def create_authentication(authentication_create, = {}) response = create_authentication_with_http_info(authentication_create, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::AuthenticationCreateResponse" ) end |
#create_authentication_with_http_info(authentication_create, request_options = {}) ⇒ Http::Response
Creates a new authentication resource.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/algolia/api/ingestion_client.rb', line 51 def create_authentication_with_http_info(authentication_create, = {}) # verify the required parameter 'authentication_create' is set if @api_client.config.client_side_validation && authentication_create.nil? raise ArgumentError, "Parameter `authentication_create` is required when calling `create_authentication`." end path = "/1/authentications" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(authentication_create) = .merge( :operation => :"IngestionClient.create_authentication", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#create_destination(destination_create, request_options = {}) ⇒ DestinationCreateResponse
Creates a new destination.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
136 137 138 139 140 141 142 |
# File 'lib/algolia/api/ingestion_client.rb', line 136 def create_destination(destination_create, = {}) response = create_destination_with_http_info(destination_create, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::DestinationCreateResponse" ) end |
#create_destination_with_http_info(destination_create, request_options = {}) ⇒ Http::Response
Creates a new destination.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/algolia/api/ingestion_client.rb', line 102 def create_destination_with_http_info(destination_create, = {}) # verify the required parameter 'destination_create' is set if @api_client.config.client_side_validation && destination_create.nil? raise ArgumentError, "Parameter `destination_create` is required when calling `create_destination`." end path = "/1/destinations" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(destination_create) = .merge( :operation => :"IngestionClient.create_destination", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#create_source(source_create, request_options = {}) ⇒ SourceCreateResponse
Creates a new source.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
187 188 189 190 |
# File 'lib/algolia/api/ingestion_client.rb', line 187 def create_source(source_create, = {}) response = create_source_with_http_info(source_create, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::SourceCreateResponse") end |
#create_source_with_http_info(source_create, request_options = {}) ⇒ Http::Response
Creates a new source.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/algolia/api/ingestion_client.rb', line 153 def create_source_with_http_info(source_create, = {}) # verify the required parameter 'source_create' is set if @api_client.config.client_side_validation && source_create.nil? raise ArgumentError, "Parameter `source_create` is required when calling `create_source`." end path = "/1/sources" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(source_create) = .merge( :operation => :"IngestionClient.create_source", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#create_task(task_create, request_options = {}) ⇒ TaskCreateResponse
227 228 229 230 |
# File 'lib/algolia/api/ingestion_client.rb', line 227 def create_task(task_create, = {}) response = create_task_with_http_info(task_create, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::TaskCreateResponse") end |
#create_task_with_http_info(task_create, request_options = {}) ⇒ Http::Response
Returns the response.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/algolia/api/ingestion_client.rb', line 197 def create_task_with_http_info(task_create, = {}) # verify the required parameter 'task_create' is set if @api_client.config.client_side_validation && task_create.nil? raise ArgumentError, "Parameter `task_create` is required when calling `create_task`." end path = "/1/tasks" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(task_create) = .merge( :operation => :"IngestionClient.create_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#create_transformation(transformation_create, request_options = {}) ⇒ TransformationCreateResponse
267 268 269 270 271 272 273 |
# File 'lib/algolia/api/ingestion_client.rb', line 267 def create_transformation(transformation_create, = {}) response = create_transformation_with_http_info(transformation_create, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::TransformationCreateResponse" ) end |
#create_transformation_with_http_info(transformation_create, request_options = {}) ⇒ Http::Response
Returns the response.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/algolia/api/ingestion_client.rb', line 237 def create_transformation_with_http_info(transformation_create, = {}) # verify the required parameter 'transformation_create' is set if @api_client.config.client_side_validation && transformation_create.nil? raise ArgumentError, "Parameter `transformation_create` is required when calling `create_transformation`." end path = "/1/transformations" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(transformation_create) = .merge( :operation => :"IngestionClient.create_transformation", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#custom_delete(path, parameters = nil, request_options = {}) ⇒ Object
313 314 315 316 |
# File 'lib/algolia/api/ingestion_client.rb', line 313 def custom_delete(path, parameters = nil, = {}) response = custom_delete_with_http_info(path, parameters, ) @api_client.deserialize(response.body, [:debug_return_type] || "Object") end |
#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Returns the response.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/algolia/api/ingestion_client.rb', line 281 def custom_delete_with_http_info(path, parameters = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_delete`." end path = "/{path}".sub("{" + "path" + "}", path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.custom_delete", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#custom_get(path, parameters = nil, request_options = {}) ⇒ Object
356 357 358 359 |
# File 'lib/algolia/api/ingestion_client.rb', line 356 def custom_get(path, parameters = nil, = {}) response = custom_get_with_http_info(path, parameters, ) @api_client.deserialize(response.body, [:debug_return_type] || "Object") end |
#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Returns the response.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/algolia/api/ingestion_client.rb', line 324 def custom_get_with_http_info(path, parameters = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_get`." end path = "/{path}".sub("{" + "path" + "}", path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.custom_get", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
401 402 403 404 |
# File 'lib/algolia/api/ingestion_client.rb', line 401 def custom_post(path, parameters = nil, body = nil, = {}) response = custom_post_with_http_info(path, parameters, body, ) @api_client.deserialize(response.body, [:debug_return_type] || "Object") end |
#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Returns the response.
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/algolia/api/ingestion_client.rb', line 368 def custom_post_with_http_info(path, parameters = nil, body = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_post`." end path = "/{path}".sub("{" + "path" + "}", path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(body) = .merge( :operation => :"IngestionClient.custom_post", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
446 447 448 449 |
# File 'lib/algolia/api/ingestion_client.rb', line 446 def custom_put(path, parameters = nil, body = nil, = {}) response = custom_put_with_http_info(path, parameters, body, ) @api_client.deserialize(response.body, [:debug_return_type] || "Object") end |
#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Returns the response.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/algolia/api/ingestion_client.rb', line 413 def custom_put_with_http_info(path, parameters = nil, body = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_put`." end path = "/{path}".sub("{" + "path" + "}", path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(body) = .merge( :operation => :"IngestionClient.custom_put", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, ) end |
#delete_authentication(authentication_id, request_options = {}) ⇒ DeleteResponse
Deletes an authentication resource. You can’t delete authentication resources that are used by a source or a destination.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
497 498 499 500 |
# File 'lib/algolia/api/ingestion_client.rb', line 497 def delete_authentication(authentication_id, = {}) response = delete_authentication_with_http_info(authentication_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::DeleteResponse") end |
#delete_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response
Deletes an authentication resource. You can't delete authentication resources that are used by a source or a destination.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/algolia/api/ingestion_client.rb', line 460 def delete_authentication_with_http_info(authentication_id, = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `delete_authentication`." end path = "/1/authentications/{authenticationID}".sub( "{" + "authenticationID" + "}", Transport.encode_uri(authentication_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.delete_authentication", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#delete_destination(destination_id, request_options = {}) ⇒ DeleteResponse
Deletes a destination by its ID. You can’t delete destinations that are referenced in tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
548 549 550 551 |
# File 'lib/algolia/api/ingestion_client.rb', line 548 def delete_destination(destination_id, = {}) response = delete_destination_with_http_info(destination_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::DeleteResponse") end |
#delete_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response
Deletes a destination by its ID. You can't delete destinations that are referenced in tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/algolia/api/ingestion_client.rb', line 511 def delete_destination_with_http_info(destination_id, = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `delete_destination`." end path = "/1/destinations/{destinationID}".sub( "{" + "destinationID" + "}", Transport.encode_uri(destination_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.delete_destination", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#delete_source(source_id, request_options = {}) ⇒ DeleteResponse
Deletes a source by its ID. You can’t delete sources that are referenced in tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
596 597 598 599 |
# File 'lib/algolia/api/ingestion_client.rb', line 596 def delete_source(source_id, = {}) response = delete_source_with_http_info(source_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::DeleteResponse") end |
#delete_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Deletes a source by its ID. You can't delete sources that are referenced in tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/algolia/api/ingestion_client.rb', line 562 def delete_source_with_http_info(source_id, = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `delete_source`." end path = "/1/sources/{sourceID}".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.delete_source", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#delete_task(task_id, request_options = {}) ⇒ DeleteResponse
636 637 638 639 |
# File 'lib/algolia/api/ingestion_client.rb', line 636 def delete_task(task_id, = {}) response = delete_task_with_http_info(task_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::DeleteResponse") end |
#delete_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Returns the response.
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/algolia/api/ingestion_client.rb', line 606 def delete_task_with_http_info(task_id, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `delete_task`." end path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.delete_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#delete_transformation(transformation_id, request_options = {}) ⇒ DeleteResponse
679 680 681 682 |
# File 'lib/algolia/api/ingestion_client.rb', line 679 def delete_transformation(transformation_id, = {}) response = delete_transformation_with_http_info(transformation_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::DeleteResponse") end |
#delete_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response
Returns the response.
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'lib/algolia/api/ingestion_client.rb', line 646 def delete_transformation_with_http_info(transformation_id, = {}) # verify the required parameter 'transformation_id' is set if @api_client.config.client_side_validation && transformation_id.nil? raise ArgumentError, "Parameter `transformation_id` is required when calling `delete_transformation`." end path = "/1/transformations/{transformationID}".sub( "{" + "transformationID" + "}", Transport.encode_uri(transformation_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.delete_transformation", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#disable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse
Disables a task.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
727 728 729 730 |
# File 'lib/algolia/api/ingestion_client.rb', line 727 def disable_task(task_id, = {}) response = disable_task_with_http_info(task_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::TaskUpdateResponse") end |
#disable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Disables a task.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/algolia/api/ingestion_client.rb', line 693 def disable_task_with_http_info(task_id, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `disable_task`." end path = "/1/tasks/{taskID}/disable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.disable_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, ) end |
#enable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse
Enables a task.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
775 776 777 778 |
# File 'lib/algolia/api/ingestion_client.rb', line 775 def enable_task(task_id, = {}) response = enable_task_with_http_info(task_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::TaskUpdateResponse") end |
#enable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Enables a task.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/algolia/api/ingestion_client.rb', line 741 def enable_task_with_http_info(task_id, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `enable_task`." end path = "/1/tasks/{taskID}/enable".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.enable_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, ) end |
#get_authentication(authentication_id, request_options = {}) ⇒ Authentication
Retrieves an authentication resource by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
826 827 828 829 |
# File 'lib/algolia/api/ingestion_client.rb', line 826 def get_authentication(authentication_id, = {}) response = get_authentication_with_http_info(authentication_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Authentication") end |
#get_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response
Retrieves an authentication resource by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 |
# File 'lib/algolia/api/ingestion_client.rb', line 789 def get_authentication_with_http_info(authentication_id, = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `get_authentication`." end path = "/1/authentications/{authenticationID}".sub( "{" + "authenticationID" + "}", Transport.encode_uri(authentication_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_authentication", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_authentications(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ ListAuthenticationsResponse
Retrieves a list of all authentication resources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 |
# File 'lib/algolia/api/ingestion_client.rb', line 914 def get_authentications( items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, = {} ) response = get_authentications_with_http_info(items_per_page, page, type, platform, sort, order, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::ListAuthenticationsResponse" ) end |
#get_authentications_with_http_info(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of all authentication resources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 |
# File 'lib/algolia/api/ingestion_client.rb', line 845 def get_authentications_with_http_info( items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, = {} ) if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_authentications, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_authentications, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_authentications, must be greater than or equal to 1." ) end path = "/1/authentications" query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? query_params[:platform] = @api_client.build_collection_param(platform, :csv) unless platform.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_authentications", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_destination(destination_id, request_options = {}) ⇒ Destination
Retrieves a destination by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
976 977 978 979 |
# File 'lib/algolia/api/ingestion_client.rb', line 976 def get_destination(destination_id, = {}) response = get_destination_with_http_info(destination_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Destination") end |
#get_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response
Retrieves a destination by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'lib/algolia/api/ingestion_client.rb', line 939 def get_destination_with_http_info(destination_id, = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `get_destination`." end path = "/1/destinations/{destinationID}".sub( "{" + "destinationID" + "}", Transport.encode_uri(destination_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_destination", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_destinations(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListDestinationsResponse
Retrieves a list of destinations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'lib/algolia/api/ingestion_client.rb', line 1067 def get_destinations( items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, = {} ) response = get_destinations_with_http_info( items_per_page, page, type, authentication_id, sort, order, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::ListDestinationsResponse" ) end |
#get_destinations_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of destinations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 |
# File 'lib/algolia/api/ingestion_client.rb', line 995 def get_destinations_with_http_info( items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, = {} ) if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_destinations, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_destinations, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_destinations, must be greater than or equal to 1." ) end path = "/1/destinations" query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? unless authentication_id.nil? query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) end query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_destinations", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_event(run_id, event_id, request_options = {}) ⇒ Event
Retrieves a single task run event by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1143 1144 1145 1146 |
# File 'lib/algolia/api/ingestion_client.rb', line 1143 def get_event(run_id, event_id, = {}) response = get_event_with_http_info(run_id, event_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Event") end |
#get_event_with_http_info(run_id, event_id, request_options = {}) ⇒ Http::Response
Retrieves a single task run event by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/algolia/api/ingestion_client.rb', line 1101 def get_event_with_http_info(run_id, event_id, = {}) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_event`." end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? raise ArgumentError, "Parameter `event_id` is required when calling `get_event`." end path = "/1/runs/{runID}/events/{eventID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s)).sub( "{" + "eventID" + "}", Transport.encode_uri(event_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_event", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_events(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ ListEventsResponse
Retrieves a list of events for a task run, identified by it’s ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/algolia/api/ingestion_client.rb', line 1247 def get_events( run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, = {} ) response = get_events_with_http_info( run_id, items_per_page, page, status, type, sort, order, start_date, end_date, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::ListEventsResponse") end |
#get_events_with_http_info(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of events for a task run, identified by it's ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 |
# File 'lib/algolia/api/ingestion_client.rb', line 1165 def get_events_with_http_info( run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, = {} ) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_events`." end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_events, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_events, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_events, must be greater than or equal to 1." ) end path = "/1/runs/{runID}/events".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s)) query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil? query_params[:type] = @api_client.build_collection_param(type, :multi) unless type.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params[:startDate] = start_date unless start_date.nil? query_params[:endDate] = end_date unless end_date.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_events", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_run(run_id, request_options = {}) ⇒ Run
Retrieve a single task run by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1317 1318 1319 1320 |
# File 'lib/algolia/api/ingestion_client.rb', line 1317 def get_run(run_id, = {}) response = get_run_with_http_info(run_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Run") end |
#get_run_with_http_info(run_id, request_options = {}) ⇒ Http::Response
Retrieve a single task run by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 |
# File 'lib/algolia/api/ingestion_client.rb', line 1283 def get_run_with_http_info(run_id, = {}) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_run`." end path = "/1/runs/{runID}".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_run", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_runs(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ RunListResponse
Retrieve a list of task runs.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 |
# File 'lib/algolia/api/ingestion_client.rb', line 1413 def get_runs( items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, = {} ) response = get_runs_with_http_info( items_per_page, page, status, task_id, sort, order, start_date, end_date, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::RunListResponse") end |
#get_runs_with_http_info(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response
Retrieve a list of task runs.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'lib/algolia/api/ingestion_client.rb', line 1338 def get_runs_with_http_info( items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, = {} ) if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_runs, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_runs, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_runs, must be greater than or equal to 1." ) end path = "/1/runs" query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil? query_params[:taskID] = task_id unless task_id.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params[:startDate] = start_date unless start_date.nil? query_params[:endDate] = end_date unless end_date.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_runs", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_source(source_id, request_options = {}) ⇒ Source
Retrieve a source by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1481 1482 1483 1484 |
# File 'lib/algolia/api/ingestion_client.rb', line 1481 def get_source(source_id, = {}) response = get_source_with_http_info(source_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Source") end |
#get_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Retrieve a source by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 |
# File 'lib/algolia/api/ingestion_client.rb', line 1447 def get_source_with_http_info(source_id, = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `get_source`." end path = "/1/sources/{sourceID}".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_source", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_sources(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListSourcesResponse
Retrieves a list of sources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 |
# File 'lib/algolia/api/ingestion_client.rb', line 1572 def get_sources( items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, = {} ) response = get_sources_with_http_info(items_per_page, page, type, authentication_id, sort, order, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::ListSourcesResponse") end |
#get_sources_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of sources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 |
# File 'lib/algolia/api/ingestion_client.rb', line 1500 def get_sources_with_http_info( items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, = {} ) if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_sources, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_sources, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_sources, must be greater than or equal to 1." ) end path = "/1/sources" query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? unless authentication_id.nil? query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) end query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_sources", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_task(task_id, request_options = {}) ⇒ Task
Retrieves a task by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1628 1629 1630 1631 |
# File 'lib/algolia/api/ingestion_client.rb', line 1628 def get_task(task_id, = {}) response = get_task_with_http_info(task_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Task") end |
#get_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Retrieves a task by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 |
# File 'lib/algolia/api/ingestion_client.rb', line 1594 def get_task_with_http_info(task_id, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `get_task`." end path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_tasks(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ ListTasksResponse
Retrieves a list of tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 |
# File 'lib/algolia/api/ingestion_client.rb', line 1731 def get_tasks( items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, = {} ) response = get_tasks_with_http_info( items_per_page, page, action, enabled, source_id, destination_id, trigger_type, sort, order, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::ListTasksResponse") end |
#get_tasks_with_http_info(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'lib/algolia/api/ingestion_client.rb', line 1650 def get_tasks_with_http_info( items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, = {} ) if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_tasks, must be smaller than or equal to 100." ) end if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1 raise( ArgumentError, "invalid value for \"\"items_per_page\"\" when calling IngestionClient.get_tasks, must be greater than or equal to 1." ) end if @api_client.config.client_side_validation && !page.nil? && page < 1 raise( ArgumentError, "invalid value for \"\"page\"\" when calling IngestionClient.get_tasks, must be greater than or equal to 1." ) end path = "/1/tasks" query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:action] = @api_client.build_collection_param(action, :csv) unless action.nil? query_params[:enabled] = enabled unless enabled.nil? query_params[:sourceID] = @api_client.build_collection_param(source_id, :csv) unless source_id.nil? unless destination_id.nil? query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv) end query_params[:triggerType] = @api_client.build_collection_param(trigger_type, :csv) unless trigger_type.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_tasks", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_transformation(transformation_id, request_options = {}) ⇒ Transformation
Retrieves a transformation by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1804 1805 1806 1807 |
# File 'lib/algolia/api/ingestion_client.rb', line 1804 def get_transformation(transformation_id, = {}) response = get_transformation_with_http_info(transformation_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::Transformation") end |
#get_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response
Retrieves a transformation by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 |
# File 'lib/algolia/api/ingestion_client.rb', line 1767 def get_transformation_with_http_info(transformation_id, = {}) # verify the required parameter 'transformation_id' is set if @api_client.config.client_side_validation && transformation_id.nil? raise ArgumentError, "Parameter `transformation_id` is required when calling `get_transformation`." end path = "/1/transformations/{transformationID}".sub( "{" + "transformationID" + "}", Transport.encode_uri(transformation_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_transformation", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_transformations(sort = nil, order = nil, request_options = {}) ⇒ ListTransformationsResponse
Retrieves a list of transformations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1851 1852 1853 1854 1855 1856 1857 |
# File 'lib/algolia/api/ingestion_client.rb', line 1851 def get_transformations(sort = nil, order = nil, = {}) response = get_transformations_with_http_info(sort, order, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::ListTransformationsResponse" ) end |
#get_transformations_with_http_info(sort = nil, order = nil, request_options = {}) ⇒ Http::Response
Retrieves a list of transformations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 |
# File 'lib/algolia/api/ingestion_client.rb', line 1819 def get_transformations_with_http_info(sort = nil, order = nil, = {}) path = "/1/transformations" query_params = {} query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.get_transformations", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#run_task(task_id, request_options = {}) ⇒ RunResponse
Runs a task. You can check the status of task runs with the observability endpoints.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1902 1903 1904 1905 |
# File 'lib/algolia/api/ingestion_client.rb', line 1902 def run_task(task_id, = {}) response = run_task_with_http_info(task_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::RunResponse") end |
#run_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response
Runs a task. You can check the status of task runs with the observability endpoints.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 |
# File 'lib/algolia/api/ingestion_client.rb', line 1868 def run_task_with_http_info(task_id, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `run_task`." end path = "/1/tasks/{taskID}/run".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.run_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#search_authentications(authentication_search, request_options = {}) ⇒ Array<Authentication>
Searches for authentication resources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1950 1951 1952 1953 |
# File 'lib/algolia/api/ingestion_client.rb', line 1950 def search_authentications(authentication_search, = {}) response = search_authentications_with_http_info(authentication_search, ) @api_client.deserialize(response.body, [:debug_return_type] || "Array<Ingestion::Authentication>") end |
#search_authentications_with_http_info(authentication_search, request_options = {}) ⇒ Http::Response
Searches for authentication resources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 |
# File 'lib/algolia/api/ingestion_client.rb', line 1916 def search_authentications_with_http_info(authentication_search, = {}) # verify the required parameter 'authentication_search' is set if @api_client.config.client_side_validation && authentication_search.nil? raise ArgumentError, "Parameter `authentication_search` is required when calling `search_authentications`." end path = "/1/authentications/search" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(authentication_search) = .merge( :operation => :"IngestionClient.search_authentications", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#search_destinations(destination_search, request_options = {}) ⇒ Array<Destination>
Searches for destinations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1998 1999 2000 2001 |
# File 'lib/algolia/api/ingestion_client.rb', line 1998 def search_destinations(destination_search, = {}) response = search_destinations_with_http_info(destination_search, ) @api_client.deserialize(response.body, [:debug_return_type] || "Array<Ingestion::Destination>") end |
#search_destinations_with_http_info(destination_search, request_options = {}) ⇒ Http::Response
Searches for destinations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 |
# File 'lib/algolia/api/ingestion_client.rb', line 1964 def search_destinations_with_http_info(destination_search, = {}) # verify the required parameter 'destination_search' is set if @api_client.config.client_side_validation && destination_search.nil? raise ArgumentError, "Parameter `destination_search` is required when calling `search_destinations`." end path = "/1/destinations/search" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(destination_search) = .merge( :operation => :"IngestionClient.search_destinations", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#search_sources(source_search, request_options = {}) ⇒ Array<Source>
Searches for sources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2046 2047 2048 2049 |
# File 'lib/algolia/api/ingestion_client.rb', line 2046 def search_sources(source_search, = {}) response = search_sources_with_http_info(source_search, ) @api_client.deserialize(response.body, [:debug_return_type] || "Array<Ingestion::Source>") end |
#search_sources_with_http_info(source_search, request_options = {}) ⇒ Http::Response
Searches for sources.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 |
# File 'lib/algolia/api/ingestion_client.rb', line 2012 def search_sources_with_http_info(source_search, = {}) # verify the required parameter 'source_search' is set if @api_client.config.client_side_validation && source_search.nil? raise ArgumentError, "Parameter `source_search` is required when calling `search_sources`." end path = "/1/sources/search" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(source_search) = .merge( :operation => :"IngestionClient.search_sources", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#search_tasks(task_search, request_options = {}) ⇒ Array<Task>
Searches for tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2094 2095 2096 2097 |
# File 'lib/algolia/api/ingestion_client.rb', line 2094 def search_tasks(task_search, = {}) response = search_tasks_with_http_info(task_search, ) @api_client.deserialize(response.body, [:debug_return_type] || "Array<Ingestion::Task>") end |
#search_tasks_with_http_info(task_search, request_options = {}) ⇒ Http::Response
Searches for tasks.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 |
# File 'lib/algolia/api/ingestion_client.rb', line 2060 def search_tasks_with_http_info(task_search, = {}) # verify the required parameter 'task_search' is set if @api_client.config.client_side_validation && task_search.nil? raise ArgumentError, "Parameter `task_search` is required when calling `search_tasks`." end path = "/1/tasks/search" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(task_search) = .merge( :operation => :"IngestionClient.search_tasks", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#search_transformations(transformation_search, request_options = {}) ⇒ Array<Transformation>
Searches for transformations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2142 2143 2144 2145 |
# File 'lib/algolia/api/ingestion_client.rb', line 2142 def search_transformations(transformation_search, = {}) response = search_transformations_with_http_info(transformation_search, ) @api_client.deserialize(response.body, [:debug_return_type] || "Array<Ingestion::Transformation>") end |
#search_transformations_with_http_info(transformation_search, request_options = {}) ⇒ Http::Response
Searches for transformations.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 |
# File 'lib/algolia/api/ingestion_client.rb', line 2108 def search_transformations_with_http_info(transformation_search, = {}) # verify the required parameter 'transformation_search' is set if @api_client.config.client_side_validation && transformation_search.nil? raise ArgumentError, "Parameter `transformation_search` is required when calling `search_transformations`." end path = "/1/transformations/search" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(transformation_search) = .merge( :operation => :"IngestionClient.search_transformations", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#trigger_docker_source_discover(source_id, request_options = {}) ⇒ SourceWatchResponse
Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with ‘type: docker` and `imageType: singer`.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2190 2191 2192 2193 |
# File 'lib/algolia/api/ingestion_client.rb', line 2190 def trigger_docker_source_discover(source_id, = {}) response = trigger_docker_source_discover_with_http_info(source_id, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::SourceWatchResponse") end |
#trigger_docker_source_discover_with_http_info(source_id, request_options = {}) ⇒ Http::Response
Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 |
# File 'lib/algolia/api/ingestion_client.rb', line 2156 def trigger_docker_source_discover_with_http_info(source_id, = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `trigger_docker_source_discover`." end path = "/1/sources/{sourceID}/discover".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"IngestionClient.trigger_docker_source_discover", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#try_transformations(transformation_try, request_options = {}) ⇒ TransformationTryResponse
Try a transformation.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2238 2239 2240 2241 2242 2243 2244 |
# File 'lib/algolia/api/ingestion_client.rb', line 2238 def try_transformations(transformation_try, = {}) response = try_transformations_with_http_info(transformation_try, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::TransformationTryResponse" ) end |
#try_transformations_with_http_info(transformation_try, request_options = {}) ⇒ Http::Response
Try a transformation.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 |
# File 'lib/algolia/api/ingestion_client.rb', line 2204 def try_transformations_with_http_info(transformation_try, = {}) # verify the required parameter 'transformation_try' is set if @api_client.config.client_side_validation && transformation_try.nil? raise ArgumentError, "Parameter `transformation_try` is required when calling `try_transformations`." end path = "/1/transformations/try" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(transformation_try) = .merge( :operation => :"IngestionClient.try_transformations", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#update_authentication(authentication_id, authentication_update, request_options = {}) ⇒ AuthenticationUpdateResponse
Updates an authentication resource.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2298 2299 2300 2301 2302 2303 2304 |
# File 'lib/algolia/api/ingestion_client.rb', line 2298 def update_authentication(authentication_id, authentication_update, = {}) response = update_authentication_with_http_info(authentication_id, authentication_update, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::AuthenticationUpdateResponse" ) end |
#update_authentication_with_http_info(authentication_id, authentication_update, request_options = {}) ⇒ Http::Response
Updates an authentication resource.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'lib/algolia/api/ingestion_client.rb', line 2256 def update_authentication_with_http_info(authentication_id, authentication_update, = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `update_authentication`." end # verify the required parameter 'authentication_update' is set if @api_client.config.client_side_validation && authentication_update.nil? raise ArgumentError, "Parameter `authentication_update` is required when calling `update_authentication`." end path = "/1/authentications/{authenticationID}".sub( "{" + "authenticationID" + "}", Transport.encode_uri(authentication_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(authentication_update) = .merge( :operation => :"IngestionClient.update_authentication", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, ) end |
#update_destination(destination_id, destination_update, request_options = {}) ⇒ DestinationUpdateResponse
Updates the destination by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2358 2359 2360 2361 2362 2363 2364 |
# File 'lib/algolia/api/ingestion_client.rb', line 2358 def update_destination(destination_id, destination_update, = {}) response = update_destination_with_http_info(destination_id, destination_update, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::DestinationUpdateResponse" ) end |
#update_destination_with_http_info(destination_id, destination_update, request_options = {}) ⇒ Http::Response
Updates the destination by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 |
# File 'lib/algolia/api/ingestion_client.rb', line 2316 def update_destination_with_http_info(destination_id, destination_update, = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `update_destination`." end # verify the required parameter 'destination_update' is set if @api_client.config.client_side_validation && destination_update.nil? raise ArgumentError, "Parameter `destination_update` is required when calling `update_destination`." end path = "/1/destinations/{destinationID}".sub( "{" + "destinationID" + "}", Transport.encode_uri(destination_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(destination_update) = .merge( :operation => :"IngestionClient.update_destination", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, ) end |
#update_source(source_id, source_update, request_options = {}) ⇒ SourceUpdateResponse
Updates a source by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2415 2416 2417 2418 |
# File 'lib/algolia/api/ingestion_client.rb', line 2415 def update_source(source_id, source_update, = {}) response = update_source_with_http_info(source_id, source_update, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::SourceUpdateResponse") end |
#update_source_with_http_info(source_id, source_update, request_options = {}) ⇒ Http::Response
Updates a source by its ID.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 |
# File 'lib/algolia/api/ingestion_client.rb', line 2376 def update_source_with_http_info(source_id, source_update, = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `update_source`." end # verify the required parameter 'source_update' is set if @api_client.config.client_side_validation && source_update.nil? raise ArgumentError, "Parameter `source_update` is required when calling `update_source`." end path = "/1/sources/{sourceID}".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(source_update) = .merge( :operation => :"IngestionClient.update_source", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, ) end |
#update_task(task_id, task_update, request_options = {}) ⇒ TaskUpdateResponse
2461 2462 2463 2464 |
# File 'lib/algolia/api/ingestion_client.rb', line 2461 def update_task(task_id, task_update, = {}) response = update_task_with_http_info(task_id, task_update, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::TaskUpdateResponse") end |
#update_task_with_http_info(task_id, task_update, request_options = {}) ⇒ Http::Response
Returns the response.
2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 |
# File 'lib/algolia/api/ingestion_client.rb', line 2426 def update_task_with_http_info(task_id, task_update, = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `update_task`." end # verify the required parameter 'task_update' is set if @api_client.config.client_side_validation && task_update.nil? raise ArgumentError, "Parameter `task_update` is required when calling `update_task`." end path = "/1/tasks/{taskID}".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(task_update) = .merge( :operation => :"IngestionClient.update_task", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, ) end |
#update_transformation(transformation_id, transformation_create, request_options = {}) ⇒ TransformationUpdateResponse
2510 2511 2512 2513 2514 2515 2516 |
# File 'lib/algolia/api/ingestion_client.rb', line 2510 def update_transformation(transformation_id, transformation_create, = {}) response = update_transformation_with_http_info(transformation_id, transformation_create, ) @api_client.deserialize( response.body, [:debug_return_type] || "Ingestion::TransformationUpdateResponse" ) end |
#update_transformation_with_http_info(transformation_id, transformation_create, request_options = {}) ⇒ Http::Response
Returns the response.
2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 |
# File 'lib/algolia/api/ingestion_client.rb', line 2472 def update_transformation_with_http_info(transformation_id, transformation_create, = {}) # verify the required parameter 'transformation_id' is set if @api_client.config.client_side_validation && transformation_id.nil? raise ArgumentError, "Parameter `transformation_id` is required when calling `update_transformation`." end # verify the required parameter 'transformation_create' is set if @api_client.config.client_side_validation && transformation_create.nil? raise ArgumentError, "Parameter `transformation_create` is required when calling `update_transformation`." end path = "/1/transformations/{transformationID}".sub( "{" + "transformationID" + "}", Transport.encode_uri(transformation_id.to_s) ) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(transformation_create) = .merge( :operation => :"IngestionClient.update_transformation", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, ) end |
#validate_source(source_create = nil, request_options = {}) ⇒ SourceWatchResponse
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2556 2557 2558 2559 |
# File 'lib/algolia/api/ingestion_client.rb', line 2556 def validate_source(source_create = nil, = {}) response = validate_source_with_http_info(source_create, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::SourceWatchResponse") end |
#validate_source_before_update(source_id, source_update, request_options = {}) ⇒ SourceWatchResponse
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2610 2611 2612 2613 |
# File 'lib/algolia/api/ingestion_client.rb', line 2610 def validate_source_before_update(source_id, source_update, = {}) response = validate_source_before_update_with_http_info(source_id, source_update, ) @api_client.deserialize(response.body, [:debug_return_type] || "Ingestion::SourceWatchResponse") end |
#validate_source_before_update_with_http_info(source_id, source_update, request_options = {}) ⇒ Http::Response
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 |
# File 'lib/algolia/api/ingestion_client.rb', line 2571 def validate_source_before_update_with_http_info(source_id, source_update, = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `validate_source_before_update`." end # verify the required parameter 'source_update' is set if @api_client.config.client_side_validation && source_update.nil? raise ArgumentError, "Parameter `source_update` is required when calling `validate_source_before_update`." end path = "/1/sources/{sourceID}/validate".sub("{" + "sourceID" + "}", Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(source_update) = .merge( :operation => :"IngestionClient.validate_source_before_update", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#validate_source_with_http_info(source_create = nil, request_options = {}) ⇒ Http::Response
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
Required API Key ACLs:
- addObject
- deleteIndex
- editSettings
2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 |
# File 'lib/algolia/api/ingestion_client.rb', line 2527 def validate_source_with_http_info(source_create = nil, = {}) path = "/1/sources/validate" query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(source_create) = .merge( :operation => :"IngestionClient.validate_source", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |