Class: BatchApi::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/batch_api/configuration.rb

Overview

Batch API Configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Default values for configuration variables



19
20
21
22
23
24
25
# File 'lib/batch_api/configuration.rb', line 19

def initialize
  @verb = :post
  @endpoint = "/batch"
  @limit = 50
  @decode_json_responses = true
  @add_timestamp = true
end

Instance Attribute Details

#add_timestampObject

Returns the value of attribute add_timestamp.



16
17
18
# File 'lib/batch_api/configuration.rb', line 16

def add_timestamp
  @add_timestamp
end

#decode_json_responsesObject

Returns the value of attribute decode_json_responses.



15
16
17
# File 'lib/batch_api/configuration.rb', line 15

def decode_json_responses
  @decode_json_responses
end

#endpointObject

Public: configuration options. Currently, you can set:

  • endpoint: (URL) through which the Batch API will be exposed (default

“/batch)

  • verb: through which it’s accessed (default “POST”)

  • limit: how many requests can be processed in a single request

(default 50) decode_json_responses - automatically decode JSON response bodies, so they don’t get double-decoded (e.g. when you decode the batch response, the bodies are already objects).



14
15
16
# File 'lib/batch_api/configuration.rb', line 14

def endpoint
  @endpoint
end

#limitObject

Public: configuration options. Currently, you can set:

  • endpoint: (URL) through which the Batch API will be exposed (default

“/batch)

  • verb: through which it’s accessed (default “POST”)

  • limit: how many requests can be processed in a single request

(default 50) decode_json_responses - automatically decode JSON response bodies, so they don’t get double-decoded (e.g. when you decode the batch response, the bodies are already objects).



14
15
16
# File 'lib/batch_api/configuration.rb', line 14

def limit
  @limit
end

#verbObject

Public: configuration options. Currently, you can set:

  • endpoint: (URL) through which the Batch API will be exposed (default

“/batch)

  • verb: through which it’s accessed (default “POST”)

  • limit: how many requests can be processed in a single request

(default 50) decode_json_responses - automatically decode JSON response bodies, so they don’t get double-decoded (e.g. when you decode the batch response, the bodies are already objects).



14
15
16
# File 'lib/batch_api/configuration.rb', line 14

def verb
  @verb
end