class PasswordBreachAlert::Api::Breachedaccount

Constants

API_URL

Public Instance Methods

call(account, params = nil) click to toggle source
# File lib/password_breach_alert/api/breachedaccount.rb, line 8
def call(account, params = nil)
  query = (params || {}).reverse_merge('truncateResponse': true).to_query
  endpoint = "#{API_URL}#{account}?#{query}"

  with_wait do
    JSON.parse(URI.parse(endpoint).open(@request_options).read)
  end
end