Class: GuardianSearcher::Search

Inherits:
Base
  • Object
show all
Defined in:
lib/guardian_searcher/search.rb

Class Method Summary collapse

Class Method Details

.search_articles(q, options = {}) ⇒ Object



5
6
7
8
# File 'lib/guardian_searcher/search.rb', line 5

def self.search_articles(q, options = {})
  searcher = GuardianSearcher::Search.new(api_key: ENV["guardian_api_key"])
  searcher.search(q, options)
end

.search_sections(q, options = {}) ⇒ Object



10
11
12
13
# File 'lib/guardian_searcher/search.rb', line 10

def self.search_sections(q, options = {})
  searcher = GuardianSearcher::Search.new(api_key: ENV["guardian_api_key"])
  searcher.search_sections(q, options)
end