module KpApi

Constants

DOMAINS
METHODS
VERSION

Public Class Methods

api_access(url) click to toggle source
# File lib/kp_api.rb, line 161
def self.api_access(url)
  #uri = URI.parse(url)
  #http = Net::HTTP.new(uri.host, uri.port)
  #response = http.request_head(uri.path)
  #
  #if response.code == '200'
  #  true
  #else
  #  false
  #end
  raise ToDo
end
valid_json?(j) click to toggle source
# File lib/kp_api.rb, line 174
def self.valid_json?(j)
  begin
    JSON.parse(j)


    return true
  rescue JSON::ParserError => e
    return false
  end
end