Class: Ultraquiz::GemsClient

Inherits:
Gems::Client
  • Object
show all
Defined in:
lib/ultraquiz/gems_client.rb

Instance Method Summary collapse

Instance Method Details

#search(query, page = 1) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/ultraquiz/gems_client.rb', line 6

def search(query, page = 1)
   yaml_data = get(
     "/api/v1/search.yaml",
     {:query => query, :page => "#{page}"}
   )
   response = YAML.load(yaml_data)
end