class RDStation::Events
Public Class Methods
new(authorization:)
click to toggle source
# File lib/rdstation/events.rb, line 8 def initialize(authorization:) @authorization = authorization end
Public Instance Methods
create(payload)
click to toggle source
# File lib/rdstation/events.rb, line 12 def create(payload) retryable_request(@authorization) do |authorization| response = self.class.post(base_url, headers: authorization.headers, body: payload.to_json) ApiResponse.build(response) end end
Private Instance Methods
base_url()
click to toggle source
# File lib/rdstation/events.rb, line 21 def base_url "#{RDStation.host}/platform/events" end