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

Member Function Documentation

◆ GetPublishers()

GetPublishers ( $profileId,
$params = [] )

Returns an associative array with finds.

Note that a cache can be published multiple times and will then be returned once for each publisher (or twice if it was the same publisher). One should also be aware of that "Publish listing" is a log type that hasn't always existed; not all geocaches have a publisher.

Parameters
[in]int$profileId(required) An integer with the users profile id.
[in]array$params(optional) An optional array of options for filtering.
  • type: Can be set to finds or hides, defaults to finds. Will make this method get the publishers for either the users finds, or hides. Some filters (visitdate) will not work together with types=hides, and may result in errors or unexpected results.
  • order: NEWESTFIRST to sort with the newest publishes first, or OLDESTFIRST for the opposite
  • filter (array): An associative array with filters (implementation not tested)
    • country: Only geocaches located in this country
    • region: Only geocaches located in this region
    • county: Only geocaches located in this county
    • minVisitDate (YYYY-MM-DD): Minimum visit date (inclusive)
    • maxVisitDate (YYYY-MM-DD): Maximum visit date (inclusive)
Returns
array An associative array with the data. Fields:
  • (int) cache_id
  • (string) gccode
  • (int) published_id
  • (string) publisher_name
  • (string) publish_date
  • (string) visitdate
  • (int) log_id