GSAK (Geocaching Swiss Army Knife) | |||||
Contents
- Index
GcApi2(sApiCall,[sHttpMethod],[sJsontData],[sCaption]) : string sApiCall - Required. The api call including any paramaters sHttpMethod - Optional. If not given "Get" is assumed. Valid values are Get,Post,Put,Delete. sJsonData - Optional. Formatted Json data. Only meaningful (and required) for Put and Post methods sCaption - Optional. Progress dialog caption. So as not to confuse with the old GcApi() function, we output to different table - GcApi2. Here are a few simple examples to get you started 1. Get some information for the current user (note that "me" is used to reference the current user)
Also remember that this function outputs the data to the GcApi2 table (in the current database) 2. Show the first 50 trackables in the current user's inventory
3. Get the first 50 bookmark lists for the current user
4. Update a bookmarks list (book mark code found via example 3)
Note: When using api calls that use the HTTP PUT method you must include the full resource. So you must include all the fields in the example even if you don't really want to change them (the onus is on you to make sure they are the same as before) We have also added the system variable $_GcApi2Header This variable will contain the Http header of the response (of the most recent GcApi2() call) There may be more information in the header later down the track, but for the moment the only real use is access to the x-total-count value. From the Groundspeak docs: An example of what the contents of this variable will look like: For example, if we wanted to know how many caches have the word "zebra" in the name:
Note: This function generates tables which are suitable to use with sqlite. For more information see this link Alpha List Category List |
Copyright 2004-2019 CWE Computer Services Privacy Policy Contact |