Project

urlvoid

0.0
No commit activity in last 3 years
No release in over 3 years
Gem for URLVoid API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
>= 0
~> 10.0
>= 0

Runtime

 Project Readme

URLVoid API Gem

Ruby Gem for URLVoid API.

Gem Version CircleCI

Installation

Add this line to your application's Gemfile:

gem 'urlvoid'

And then execute:

$ bundle

Or install it yourself as:

$ gem install urlvoid

Usage

URLVoid Host Response

require 'urlvoid'

api_key = 'MY_API_KEY'

urlvoid = URLVoid::Host.info(api_key, 'google.com')

# API Response
urlvoid.response
# =>
{"details"=>
  {"host"=>"google.com",
   "updated"=>"1438544337",
   "http_response_code"=>"200",
   "domain_age"=>"874296000",
   "google_page_rank"=>"9",
   "alexa_rank"=>"1",
   "connect_time"=>"0.028592",
   "header_size"=>"840",
   "download_size"=>"44685",
   "speed_download"=>"309084",
   "external_url_redirect"=>nil,
   "ip"=>
    {"addr"=>"216.58.211.78",
     "hostname"=>"par03s14-in-f14.1e100.net",
     "asn"=>"15169",
     "asname"=>"Google Inc.",
     "country_code"=>"US",
     "country_name"=>"United States",
     "region_name"=>"California",
     "city_name"=>"Mountain View",
     "continent_code"=>"NA",
     "continent_name"=>"North America",
     "latitude"=>"37.4192",
     "longitude"=>"-122.057"}},
 "detections"=>{"engines"=>{"engine"=>"PhishTank"}, "count"=>"1"},
 "page_load"=>"0.00"}

# API Reponse Detections
urlvoid.detections
# =>  {"engines"=>{"engine"=>"PhishTank"}, "count"=>"1"}

URLVoid API Queries Remaining

require 'urlvoid'

api_key = 'MY_API_KEY'

URLVoid::Stats.remaining_queries(api_key)
# => 901

Contributing

  1. Fork it ( https://github.com/pwelch/urlvoid/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request