Project-GC Lua Sandbox API
Loading...
Searching...
No Matches
GetFavorites

Member Function Documentation

◆ GetFavorites()

GetFavorites ( $favoriteType = 'points',
$params = [] )

Returns an associative array with cache data.

Parameters
string$favoriteType(optional) Should be one of:
  • (string) 'points' (default)
  • (string) 'percentage'
  • (string) 'wilson'
array$params(optional) An optional associative array of options for filtering/limit.
  • limit (integer): Max number of rows to return (default=100, max=1000)
  • dontCountArchivedTowardsLimit: (bool) defaults to true
  • dontCountDisabledTowardsLimit: (bool) defaults to false
  • alternativeDBCluster: (bool) defaults to false - Generally faster if processing lots of data, like multiple countries. Can not be combined with radius/distance filter.
  • filter (array): An associative array with filters
  • country (string or array)
  • region (string or array)
  • county (string or array)
  • types (array): An array of valid types
  • sizes (array): An array of valid sizes
  • difficulties (array): An array of valid values
  • terrains (array): An array of valid values
  • excludeOwner (int): Exclude geocaches by this ownerId
  • excludeDisabled (bool): Exclude disabled geocaches, defaults to false
  • excludeArchived (bool): Exclude archived geocaches, defaults to false
  • requiredFP (int): Required favorite points. Will default to 10 when using favoriteType = percentage, to match the top list, otherwise 0. Note that this is in pure points regardless of type, and not in percent or wilson score.
  • radius (array): An associative array, the Haversine formula will be used
  • distance (integer): Number of meters.
  • latitude (float): Latitude.
  • longitude (float): Longitude.
Returns
array An associative array with the data.