app/lib/cachecache/geocaching.rb
# Does an initial search for geocaches near the given coordinates.
#
# The returned geocache objects will only have basic data fields
# populated, e.g. no hints or description.
#
# @param accessToken [String] The access token for the Geocaching.com API
# @param lat [float] The latitude of the center of the search in decimal degrees
# @param lon [float] The longitude of the center of the search in decimal degrees
# @returns A list of geocache objects as returned by the Geocaching.com API
Does an initial search for geocaches near the given coordinates.
The returned geocache objects will only have basic data fields
populated, e.g. no hints or description.
Does an initial search for geocaches near the given coordinates . The returned geocache objects will only have basic data fields populated e . g . no hints or description .
def _search_first(accessToken, lat, lon)
            req = {
                'AccessToken' => accessToken,
                'IsLite' => true,
                'MaxPerPage' => MAX_PER_PAGE,
                'GeocachingLogCount' => 5,
                'TrackableLogCount' => 0,
                'PointRadius' => {
                    'DistanceInMeters' => "#{SEARCH_DISTANCE}.000000",
                    'Point' => {
                        'Latitude' => lat,
                        'Longitude' => lon
                    }
                }
            }
            data = _post('/LiveV6IAP/Geocaching.svc/SearchForGeocaches', req)
            _check_result(data)
            _log_limit('lite', data)
            return data['Geocaches']
        end
def _search_first ( accessToken , lat , lon ) req = { 'AccessToken' => accessToken , 'IsLite' => true , 'MaxPerPage' => MAX_PER_PAGE , 'GeocachingLogCount' => 5 , 'TrackableLogCount' => 0 , 'PointRadius' => { 'DistanceInMeters' => "#{SEARCH_DISTANCE}.000000" , 'Point' => { 'Latitude' => lat , 'Longitude' => lon } } } data = _post ( '/LiveV6IAP/Geocaching.svc/SearchForGeocaches' , req ) _check_result ( data ) _log_limit ( 'lite' , data ) return data [ 'Geocaches' ] end
Does an initial search for geocaches near the given coordinates.
Does an initial search for geocaches near the given coordinates .
A list of geocache objects as returned by the Geocaching.com API
A list of geocache objects as returned by the Geocaching . com API
accessToken
The access token for the Geocaching.com API
The access token for the Geocaching . com API
lat
The latitude of the center of the search in decimal degrees
The latitude of the center of the search in decimal degrees
lon
The longitude of the center of the search in decimal degrees
The longitude of the center of the search in decimal degrees