Sha256: 920876c205b6ab8cb848ac24a12fe766b8185460f87afedf411ebeb6420a6d4d
Contents?: true
Size: 451 Bytes
Versions: 7
Compression:
Stored size: 451 Bytes
Contents
module GeoNamesAPI class NearbyPostalCode < ListEndpoint #radius in km METHOD = "findNearbyPostalCodesJSON" FIND_PARAMS = %w(postalcode country radius maxRows) def self.find_all_by_lat_lng(lat, lng, radius=10, maxRows=5) where({ 'lat' => lat, 'lng' => lng, 'radius' => radius, 'maxRows' => maxRows }).collect { |response| PostalCode.new(response) if response }.compact end end end
Version data entries
7 entries across 7 versions & 1 rubygems