class FyipeTransport

Public Class Methods

new( apiUrl) click to toggle source
# File lib/fyipe/fyipeTransport.rb, line 6
def initialize( apiUrl)
    # set up the api transporter
    @apiUrl = apiUrl
end

Public Instance Methods

sendErrorEventToServer(event) click to toggle source
# File lib/fyipe/fyipeTransport.rb, line 11
def sendErrorEventToServer(event)
    response = makeApiRequest(event)
    return response
end

Private Instance Methods

makeApiRequest(body) click to toggle source
# File lib/fyipe/fyipeTransport.rb, line 17
def makeApiRequest(body)
    # make api request and return response

    response = self.class.post(@apiUrl, :headers => {'Content-Type'=>'application/json'}, :body => body.to_json).parsed_response

    return response
end