class Mailroute::Client
Public Class Methods
new(username, apikey)
click to toggle source
# File lib/mailroute/check_connection.rb, line 3 def initialize(username, apikey) @username = username @apikey = apikey end
Public Instance Methods
check_connection()
click to toggle source
# File lib/mailroute/check_connection.rb, line 8 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