Class: Rapa::Responses::LookupBrowseNodeResponse
Instance Method Summary
collapse
#body, #headers, #initialize, #status
Instance Method Details
5
6
7
8
9
|
# File 'lib/rapa/responses/single_resource_response/lookup_browse_node_response.rb', line 5
def error
if value = body.dig("BrowseNodeLookupErrorResponse", "Error")
::Rapa::Error.new(value)
end
end
|
#has_error? ⇒ Boolean
12
13
14
|
# File 'lib/rapa/responses/single_resource_response/lookup_browse_node_response.rb', line 12
def has_error?
!error.nil?
end
|
#has_valid_request? ⇒ Boolean
17
18
19
|
# File 'lib/rapa/responses/single_resource_response/lookup_browse_node_response.rb', line 17
def has_valid_request?
body.dig("BrowseNodeLookupResponse", "BrowseNodes", "Request", "IsValid") == "True"
end
|
22
23
24
25
26
27
28
29
|
# File 'lib/rapa/responses/single_resource_response/lookup_browse_node_response.rb', line 22
def response_group(group)
item = sources.find { |source| source["Type"] == group }
unless item.nil?
item["TopItem"].map do |source|
resource_class.new(source)
end
end
end
|