GSAK (Geocaching Swiss Army Knife)
 

Contents - Index


GarminApi (function)

GarminApi(sResource,sParms,[nTimeout]) : string

This macro function allows you to retrieve data from the Garmin Opencaching.com web site. Documentation for the API can be found here

Resource - Usually just the http:// address of the api section you are using

sParms - This will be a list of parmaters to use with this resource. There will be more, but currently I have just allowed you to enter a username and password. Parms will be in the form of "Token:" followed by the value for that token. Each will be separated by a comma.

nTimeout - Optional. The number of seconds to wait before the request will time out. Default is 60 seconds.

Sample code to grab 10 caches and load into database "Test"

Note1: You would need a saved settings called "garmin" for this macro code to work

Note2: You must use your account (user name and password) for opencaching.com
 

$File="c:\temp\garmin.gpx"
Database name=Test
$data = GarminApi("http://opencaching.com/api/geocache.gpx?limit=10","User:clyde,Pass:xxxxx")
$status = Putfile("c:\temp\garmin.gpx",$data)
Load settings=garmin File=$File DATABASE=Test ShowStats=Yes
msgok msg=finished

 
Alpha List         Category List

Copyright 2004-2011 CWE Computer Services  
Privacy Policy Contact