Sha256: 04157db5bf361c46c8e0a5ac30ab0db907cd6b7e947d4103a7c9e9ee5e06a5eb

Contents?: true

Size: 300 Bytes

Versions: 4

Compression:

Stored size: 300 Bytes

Contents

# frozen_string_literal: true

module Onyphe
  module Clients
    class Pastries < Client
      def get_by_ip(ip, page = 1)
        raise ArgumentError, "Invalid IP address: #{ip}" unless Validator.valid_ip?(ip)

        get("/pastries/#{ip}", page: page) { |json| json }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
onyphe-0.2.3 lib/onyphe/clients/pastries.rb
onyphe-0.2.2 lib/onyphe/clients/pastries.rb
onyphe-0.2.1 lib/onyphe/clients/pastries.rb
onyphe-0.2.0 lib/onyphe/clients/pastries.rb