Class: BazaarVoice::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/bazaar_voice.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



9
10
11
# File 'lib/bazaar_voice.rb', line 9

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



17
18
19
# File 'lib/bazaar_voice.rb', line 17

def configure
  yield(configuration)
end

.resetObject



13
14
15
# File 'lib/bazaar_voice.rb', line 13

def reset
  @configuration = Configuration.new
end

.was_helpful(boolean, content_id) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/bazaar_voice.rb', line 28

def was_helpful(boolean, content_id)
  post(
    'submitfeedback',
    'ContentType' => 'review',
    'FeedbackType' => 'helpfulness',
    'Vote' => (boolean ? 'Positive' : 'Negative'),
    'ContentId' => content_id
  )
end