Class: FriendlyScore::Endpoints::UserPositive

Inherits:
Base
  • Object
show all
Defined in:
lib/friendly_score/endpoints/user_positive.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #perform

Constructor Details

This class inherits a constructor from FriendlyScore::Endpoints::Base

Instance Method Details

#api_pathObject



8
9
10
# File 'lib/friendly_score/endpoints/user_positive.rb', line 8

def api_path
  "api/user/positive"
end

#process_response(body) ⇒ Object



4
5
6
# File 'lib/friendly_score/endpoints/user_positive.rb', line 4

def process_response body
  nil
end

#validate(id, positive) ⇒ Object



12
13
14
15
16
# File 'lib/friendly_score/endpoints/user_positive.rb', line 12

def validate id, positive
  unless [0, 1].include? positive
    raise ValidationError.new "Argument 'positive' should be 0 or 1."
  end
end