Class: Jimson::ClientHelper
- Inherits:
-
Object
- Object
- Jimson::ClientHelper
- Defined in:
- lib/syncano/jimson_client.rb
Overview
Overwritten helper from Jimson gem
Instance Method Summary collapse
-
#send_batch ⇒ Array
Overwritten send_batch method, so it now returns collection of responses.
Instance Method Details
#send_batch ⇒ Array
Overwritten send_batch method, so it now returns collection of responses
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/syncano/jimson_client.rb', line 7 def send_batch batch = @batch.map(&:first) # get the requests response = send_batch_request(batch) begin responses = JSON.parse(response) rescue raise Jimson::ClientError::InvalidJSON.new(json) end process_batch_response(responses) responses = @batch @batch = [] responses end |