Sha256: 36e1be86937c0673c6a954847132ccc27bd53fbd48632cce382df167e3af9679

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

module Spyse
  module Client
    class AS < Base
      #
      # Lists AS
      #
      # @see https://spyse.com/api#/as/as
      #
      # @return [Hash]
      #
      def get(asn, limit: nil, offset: nil)
        params = {
          asn: asn, limit: limit, offset: offset,
        }.compact
        _get("/as", params) { |json| json }
      end

      #
      # Lists ASs
      #
      # @see https://spyse.com/api#/as/as_search
      #
      # @return [Hash]
      #
      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spysex-0.1.0 lib/spyse/clients/as.rb