lib/keen/client.rb in keen-0.4.4 vs lib/keen/client.rb in keen-0.5.0

- old
+ new

@@ -31,11 +31,11 @@ } def beacon_url(event_collection, properties) json = MultiJson.encode(properties) data = [json].pack("m0").tr("+/", "-_").gsub("\n", "") - "https://#{api_host}#{api_path(event_collection)}?api_key=#{@api_key}&data=#{data}" + "https://#{api_host}#{api_path(event_collection)}?data=#{data}" end def initialize(*args) options = args[0] unless options.is_a?(Hash) @@ -129,15 +129,14 @@ def api_path(event_collection) "/#{api_version}/projects/#{project_id}/events/#{URI.escape(event_collection)}" end def api_headers_with_auth(sync_or_async) - api_headers(sync_or_async).merge("Authorization" => api_key) + api_headers(sync_or_async) end def check_configuration! raise ConfigurationError, "Project ID must be set" unless project_id - raise ConfigurationError, "API Key must be set" unless api_key end def check_event_data!(event_collection, properties) raise ArgumentError, "Event collection can not be nil" unless event_collection raise ArgumentError, "Event properties can not be nil" unless properties