class StatusCat::Checkers::GoogleCivic
Public Class Methods
new()
click to toggle source
# File lib/status_cat/checkers/google_civic.rb, line 7 def initialize @value = api_key @status = fail_on_exception do response = ::HTTParty.get(url) response.code == 200 ? nil : 'fail' end end
Public Instance Methods
url()
click to toggle source
# File lib/status_cat/checkers/google_civic.rb, line 15 def url return "https://www.googleapis.com/civicinfo/v2/representatives?key=#{api_key}&address=94306" end