Class: OSCRuby::QueryResults

Inherits:
Object
  • Object
show all
Includes:
QueryModule, ValidationsModule
Defined in:
lib/osc_ruby/classes/query_results.rb

Instance Method Summary collapse

Methods included from ValidationsModule

attr_hash_exists_and_is_type_of, check_attributes, check_attributes_request, check_client, check_for_id, check_for_names, check_for_parents, check_interfaces, check_obj_for_errors, check_object_for_id, check_query, extract_attributes

Methods included from QueryModule

create, destroy, find, update

Methods included from NormalizeModule

iterate_through_rows, normalize

Constructor Details

#initializeQueryResults

Returns a new instance of QueryResults.



13
# File 'lib/osc_ruby/classes/query_results.rb', line 13

def initialize; end

Instance Method Details

#query(client, query) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/osc_ruby/classes/query_results.rb', line 15

def query(client,query)

	ValidationsModule::check_client(client)

	ValidationsModule::check_query(query,"query")

	@query = URI.escape("queryResults/?query=#{query}")

   	response = QueryModule::find(client,@query)

   	JSON.parse(response) 
		
end