lib/dashing-contrib/bottles/pingdom/uptime.rb in dashing-contrib-0.2.0 vs lib/dashing-contrib/bottles/pingdom/uptime.rb in dashing-contrib-0.2.1

- old
+ new

@@ -27,10 +27,12 @@ end private def make_request(credentials, id, from_time, to_time) request_url = uptime_request_url(credentials, id, from_time, to_time) - response = RestClient.get(request_url, { 'App-Key' => credentials.api_key }) + headers = { 'App-Key' => credentials.api_key } + headers['Account-Email'] = credentials.team_account unless credentials.team_account.empty? + response = RestClient.get(request_url, headers) MultiJson.load(response.body, { symbolize_keys: true }) end def uptime_request_url(credentials, id, from_time, to_time) "https://#{credentials.username}:#{credentials.password}@api.pingdom.com/api/2.0/summary.average/#{id}?from=#{from_time}&to=#{to_time}&includeuptime=true"