Skip to content

Commit f161ec0

Browse files
committed
added api_key setting to ESDB module
1 parent 558a0aa commit f161ec0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/esdb.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
module ESDB
2+
# Various Settings
3+
# TODO: refactor
4+
class << self
5+
def api_key=(key)
6+
@api_key = key
7+
end
8+
9+
def api_key
10+
@api_key
11+
end
12+
end
13+
214
# Simply transforms a stats hash into a StatsParam string
315
class StatsParam
416
def initialize(stats)

lib/esdb/replay.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Replay < ESDB::Resource
44
# successfully queued for processing.
55
def self.upload(file)
66
replay = self.new
7-
response = JSON.parse(RestClient.post(replay.url, :file => file))
7+
response = JSON.parse(RestClient.post(replay.url, :file => file, :api_key => ESDB.api_key))
88
Rails.logger.info response.inspect
99

1010
response['job'] ? response['job'] : false

0 commit comments

Comments
 (0)