Class: Spyse::Client::IP
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#get(ip, limit: nil, offset: nil, as_org: nil, country: nil, as_num: nil) ⇒ Hash
Lists ips.
-
#search(search_params, limit: nil, offset: nil) ⇒ Hash
Lists IPs.
Methods inherited from Base
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
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
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 |