Sha256: 5ceacf548b4f175e8a931f591b439e25819e24923f2886ce3d64108df2353d47

Contents?: true

Size: 295 Bytes

Versions: 2

Compression:

Stored size: 295 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onyphe-1.1.0 lib/onyphe/clients/geoloc.rb
onyphe-1.0.0 lib/onyphe/clients/geoloc.rb