Sha256: 58bd957bc73aa6b8f52e3de6014db1d19ef9af488a064249d24bdfd9b008dae8
Contents?: true
Size: 541 Bytes
Versions: 14
Compression:
Stored size: 541 Bytes
Contents
require 'rest-client' require 'cgi' module DashingContrib module Pingdom module Checks extend self def fetch(credentials, id) make_request(credentials, id) end private def make_request(credentials, id) request_url = "https://#{credentials.username}:#{credentials.password}@api.pingdom.com/api/2.0/checks/#{id}" response = RestClient.get(request_url, { 'App-Key' => credentials.api_key }) MultiJson.load response.body, { symbolize_keys: true } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems