class RecombeeApiClient::Batch

Batch processing allows you to submit arbitrary sequence of requests

Attributes

body_parameters[R]

Values of body parameters as a Hash

ensure_https[RW]
requests[R]
timeout[RW]

Public Class Methods

new(requests, optional = {}) click to toggle source
  • *Required arguments*

    • requests -> Array of API requests.

# File lib/recombee_api_client/api/batch.rb, line 17
def initialize(requests, optional = {})
  @requests = requests
  optional = normalize_optional(optional)
  @optional = optional
  @body_parameters = requests_to_batch_hash
  @timeout = requests.map{|r| r.timeout}.reduce(:+)
  @ensure_https = true

  @optional.each do |par, _|
    fail UnknownOptionalParameter.new(par) unless ["distinctRecomms"].include? par
  end
end

Public Instance Methods

method() click to toggle source

HTTP method

# File lib/recombee_api_client/api/batch.rb, line 31
def method
  :post
end
path() click to toggle source

Relative path to the endpoint

# File lib/recombee_api_client/api/batch.rb, line 46
def path
  p = '/{databaseId}/batch/'
  p
end
query_parameters() click to toggle source

Values of query path parameters as a Hash. name of parameter => value of the parameter

# File lib/recombee_api_client/api/batch.rb, line 40
def query_parameters
  params = {}
  params
end