class Tracking

Constants

BASEURL
DIMENSIONS

Public Class Methods

new(api_key, site_token, client=Client.new) click to toggle source
# File lib/gosquared/tracking.rb, line 7
def initialize(api_key, site_token, client=Client.new)
  @site_token = site_token
  @api_key = api_key
  @client = client
end

Public Instance Methods

post() click to toggle source
# File lib/gosquared/tracking.rb, line 21
def post
  response = @client.post(url, @data)
  @data = nil if response.code === '200'
  response
end
url() click to toggle source
# File lib/gosquared/tracking.rb, line 27
def url
  url = BASEURL + @dimension + "?api_key=#{@api_key}" + "&site_token=#{@site_token}"
end