class Feather
Public Class Methods
track(identifier, interaction, api_key)
click to toggle source
# File lib/feather-api.rb, line 6 def self.track(identifier, interaction, api_key) uri = URI.parse("http://feather-cfm.com/api/v1/track/custom") header = {'Content-Type': 'text/json'} data = { 'identifier' => identifier, 'interaction' => interaction, 'api_key' => api_key } http = Net::HTTP.new(uri.host, uri.port) request = Net::HTTP::Post.new(uri.request_uri, header) request.body = data.to_json response = http.request(request) end