Sha256: 780ee7b243bc6ba36cd7b94a3bc46b5bf22be9725ae06edfcc5b6d8ebc1b4cac
Contents?: true
Size: 581 Bytes
Versions: 6
Compression:
Stored size: 581 Bytes
Contents
module Mailroute class Client def initialize(username, apikey) @username = username @apikey = apikey end def check_connection response = RestClient.get 'https://admin-dev.mailroute.net/api/v1/reseller/', 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'Authorization' => "ApiKey #@username:#@apikey" response.code == 200 end end def self.check_connection Client.new(username, apikey).check_connection end end
Version data entries
6 entries across 6 versions & 1 rubygems