Class: Spyse::Client::IP

Inherits:
Base
  • Object
show all
Defined in:
lib/spyse/clients/ip.rb

Constant Summary

Constants inherited from Base

Base::BASE_URL, Base::HOST, Base::VERSION

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Spyse::Client::Base

Instance Method Details

#get(ip, limit: nil, offset: nil, as_org: nil, country: nil, as_num: nil) ⇒ Hash

Lists ips

Returns:

  • (Hash)

See Also:



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/spyse/clients/ip.rb', line 13

def get(ip, limit: nil, offset: nil, as_org: nil, country: nil, as_num: nil)
  params = {
    limit: limit,
    offset: offset,
    ip: ip,
    as_org: as_org,
    country: country,
    as_num: as_num
  }.compact
  _get("/ip", params) { |json| json }
end

#search(search_params, limit: nil, offset: nil) ⇒ Hash

Lists IPs

Returns:

  • (Hash)

See Also:



32
33
34
35
36
37
# File 'lib/spyse/clients/ip.rb', line 32

def search(search_params, limit: nil, offset: nil)
  params = {
    search_params: search_params, limit: limit, offset: offset,
  }.compact
  _post("/ip/search", params) { |json| json }
end