Class: GuardianSearcher::Search
- Defined in:
- lib/guardian_searcher/search.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
#initialize, #search, #search_editions, #search_sections, #search_tags
Constructor Details
This class inherits a constructor from GuardianSearcher::Base
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, = {}) searcher = GuardianSearcher::Search.new(api_key: ENV["guardian_api_key"]) searcher.search(q, ) end |
.search_sections(q, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/guardian_searcher/search.rb', line 10 def self.search_sections(q, = {}) searcher = GuardianSearcher::Search.new(api_key: ENV["guardian_api_key"]) searcher.search_sections(q, ) end |