Class: Spyse::Client::AS

Inherits:
Base
  • Object
show all
Defined in:
lib/spyse/clients/as.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(asn, limit: nil, offset: nil) ⇒ Hash

Lists AS

Returns:

  • (Hash)

See Also:



13
14
15
16
17
18
# File 'lib/spyse/clients/as.rb', line 13

def get(asn, limit: nil, offset: nil)
  params = {
    asn: asn, limit: limit, offset: offset,
  }.compact
  _get("/as", params) { |json| json }
end

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

Lists ASs

Returns:

  • (Hash)

See Also:



27
28
29
30
31
32
# File 'lib/spyse/clients/as.rb', line 27

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