Class: BatchApi::Configuration
- Inherits:
-
Object
- Object
- BatchApi::Configuration
- Defined in:
- lib/batch_api/configuration.rb
Overview
Batch API Configuration
Instance Attribute Summary collapse
-
#add_timestamp ⇒ Object
Returns the value of attribute add_timestamp.
-
#decode_json_responses ⇒ Object
Returns the value of attribute decode_json_responses.
-
#endpoint ⇒ Object
Public: configuration options.
-
#limit ⇒ Object
Public: configuration options.
-
#verb ⇒ Object
Public: configuration options.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Default values for configuration variables.
Constructor Details
#initialize ⇒ Configuration
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_timestamp ⇒ Object
Returns the value of attribute add_timestamp.
16 17 18 |
# File 'lib/batch_api/configuration.rb', line 16 def @add_timestamp end |
#decode_json_responses ⇒ Object
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 |
#endpoint ⇒ Object
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 |
#limit ⇒ Object
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 |
#verb ⇒ Object
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 |