Sha256: 18bf38a58c2febb13a1a4539649c0a00a489cbe0c7e243614d9dc4c698ac38ed

Contents?: true

Size: 403 Bytes

Versions: 1

Compression:

Stored size: 403 Bytes

Contents

require 'hashie'
require 'httparty'

require 'domainr/version'

module Domainr
  extend self

  include HTTParty
  format :json
  base_uri 'domai.nr'

  def search(term)
    options = { :q => term }
    Hashie::Mash.new(get('/api/json/search', { :query => options }))
  end

  def info(domain)
    options = { :q => domain }
    Hashie::Mash.new(get('/api/json/info', { :query => options }))
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
domainr-0.1.0 lib/domainr.rb