Class: ScoreboardRubywarrior::Reporter
- Inherits:
-
Object
- Object
- ScoreboardRubywarrior::Reporter
- Includes:
- HTTParty
- Defined in:
- lib/scoreboard_rubywarrior/reporter.rb
Constant Summary collapse
- REPORTER_API_ENDPOINT_URI =
'http://rubywarrior.herokuapp.com/scores'
Class Method Summary collapse
Class Method Details
.endpoint ⇒ Object
13 14 15 |
# File 'lib/scoreboard_rubywarrior/reporter.rb', line 13 def self.endpoint cusom_endpoint || REPORTER_API_ENDPOINT_URI end |
.send_level_update(report) ⇒ Object
8 9 10 11 |
# File 'lib/scoreboard_rubywarrior/reporter.rb', line 8 def self.send_level_update(report) post(endpoint, body: report.to_json, headers: { 'Content-Type' => 'application/json' }) end |