Jump to content

API error within requested status of specific GC codes


Recommended Posts

Posted

I am using GSAK and in a self programmed macro a am requesting a GC code and it's status:

$data = GcApi2("geocaches/$codeGC?fields=status,referenceCode","GET")

 

If the request is for a geocache code (I used 'GC5O234' here) that has been archived already and the GC code contains an 'O' (the letter !) like the one I used (GC5O234), the return code is not ok.

The API comes back with the response: status:archived and referenceCode=GC50234, so the letter 'O' I used when requesting was cachnged to '0' (the number). I would have expected, that I get the status of GC5O234, not the one from GC50234.

 

The  same behavior I realized with GC codes containing an 'S', the result is the used code by the API ist '5' nad not 'S'

 

Why this correction in the API response ?

Posted

No, true.  The article says "The following pseudo code shows how to perform the conversion..."  The conversion MUST be done on the client side.  Sending non-base31 characters will cause issues due to invalid objects.  The server doesn't do this for you, hence HHL is correct in his statement.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...