Module: Movieman::NYTimes_review

Extended by:
NYTimes_review
Included in:
NYTimes_review
Defined in:
lib/movieman/nytimes_review.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



8
9
10
# File 'lib/movieman/nytimes_review.rb', line 8

def api_key
  @api_key
end

#fObject

Returns the value of attribute f.



8
9
10
# File 'lib/movieman/nytimes_review.rb', line 8

def f
  @f
end

Class Method Details

.config(&block) ⇒ Object



10
# File 'lib/movieman/nytimes_review.rb', line 10

def self.config(&block) instance_eval(&block); end

.search(q) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/movieman/nytimes_review.rb', line 20

def self.search q
  f.get do |r|
    r.url "/svc/movies/v2/reviews/search.xml"
    r.params['query'] = q
    r.params['api-key'] = api_key
  end
end