Module: OData4::Query::Result::JSON Private

Defined in:
lib/odata4/query/result/json.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Represents the results of executing a OData4::Query.

Instance Method Summary collapse

Instance Method Details

#error_messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
23
24
# File 'lib/odata4/query/result/json.rb', line 22

def error_message
  result_json['error'].andand['message']
end

#next_pageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'lib/odata4/query/result/json.rb', line 14

def next_page
  result_json['@odata.nextLink']
end

#next_page_urlObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/odata4/query/result/json.rb', line 18

def next_page_url
  next_page.gsub(service.service_url, '')
end

#process_results(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
11
12
# File 'lib/odata4/query/result/json.rb', line 7

def process_results(&block)
  find_entities.each do |entity_json|
    entity = OData4::Entity.from_json(entity_json, entity_options)
    block_given? ? block.call(entity) : yield(entity)
  end
end