Class: Quova::QOD
- Inherits:
-
Object
- Object
- Quova::QOD
- Defined in:
- lib/quova/qod.rb
Overview
Interface to the Quova QOD (Quova On Demand) service
Instance Method Summary collapse
-
#info(ip) ⇒ Quova::Result<Virtus>
(also: #[])
Query the API for a given IP address.
-
#initialize(options) ⇒ QOD
constructor
Initialize the QOD client with Quova API credentials.
Constructor Details
#initialize(options) ⇒ QOD
Initialize the QOD client with Quova API credentials
17 18 19 20 |
# File 'lib/quova/qod.rb', line 17 def initialize() base = "https://%s:%[email protected]/ipinfo" @resource = RestClient::Resource.new(base % [[:id], [:password]]) end |
Instance Method Details
#info(ip) ⇒ Quova::Result<Virtus> Also known as: []
Query the API for a given IP address
62 63 64 |
# File 'lib/quova/qod.rb', line 62 def info(ip) parse_xml(@resource[ip.to_s].get.body) end |