Advanced

Re: GetBookmarklist

GetBookmarklist
May 21, 2019 03:31PM
The new API uses short codes similar to GC-codes instead of GUID. The old API was a bit inconsistent.

The only Sandbox callback method I can see this far that is affected is GetBookmarklist(). Today the first argument is a GUID, in the future it will be a "BMCODE". The look exactly like GC-Codes, but starting with BM instead of GC.

For the current scripts and configs there are two solutions. Regardless of which solution I choose, I will first search all scripts and configs for strings in the format ........-....-....-....-............ where dot is a wildcard (regexp). Then I will send them to HQ to get a translation list, I can not do that myself with the current APIs.

Then I will either add a translation table in the callback method, for these only, or I will try to regexp replace inside all scripts and configs. I believe the second method should be safe enough, and also more consistent. Feel free to drop comments if you have any opinions.
Re: GetBookmarklist
May 21, 2019 03:38PM
The more exact regexp will be:
'[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}'
Re: GetBookmarklist
May 21, 2019 03:44PM
3923 GUIDs in total. That's a lot, I don't want to keep that list in my code if I can avoid it, so I will aim to replace inside the scripts and configs (with code).

Also, if I find anything else that's matching, it's very unlikely that it will match a bookmark list, so any faulty replacement should be avoided easily.
Re: GetBookmarklist
May 30, 2019 07:15PM
I am about to run this update now. Please note that the GetBookmarkList() method needs IDs starting with BM in the future, and not long GUIDs.

As a side-note, I noticed (with help from HQ) that it wasn't as simple as searching for that regexp. It matched some images, and a lot of souvenirs, and probably something else as well. But searching for a quote or double quote followed by the GUID seems better. There is a risk that I will miss updating something. Hopefully someone will report it as not working soon then.
Re: GetBookmarklist
May 30, 2019 07:24PM
I tested with this checker, and that one seems to work:
https://project-gc.com/Challenges/GC4C5N1

Before running update: Worked
After replacing GUIDs with BM-Codes, obviously didn't work.
After releasing new code for LUA callbacks: Worked again.
Re: GetBookmarklist
June 06, 2019 08:13PM
[never mind, found a way for user to supply it]



Edited 1 time(s). Last edit at 06/06/2019 08:18PM by pieterix. (view changes)
Re: GetBookmarklist
June 06, 2019 08:19PM
That's a good question. Since I am an API developer and had plenty to translate. Also other kinds of data (not bookmark lists) I emailed HQ who helped me.

I thought one could just click on the owner and browse to his lists and look there, but that web interface uses GUID as well (https://www.geocaching.com/profile/?guid=a0bcb031-d6ab-4c49-9481-f04baf7a74d5). In contradiction to when to when I look at my own (https://www.geocaching.com/account/lists) which uses BM-codes.

I will try to use the API to list all lists by that owner, that should return them with BM-codes, let me get back to you.
Re: GetBookmarklist
June 06, 2019 08:22PM
I see that you found a workaround. But if you haven't gotten the answer yet, this is the link:
https://www.geocaching.com/bookmarks/view.aspx?code=BMPXYA
Re: GetBookmarklist
June 06, 2019 08:25PM
Thanks! Yes, was still waiting for the reply from the user. And yes, noticed the BM codes on my own lists, so that's where I sent the user to.
Re: GetBookmarklist
June 06, 2019 08:33PM
I haven't tested, but you should be able to use this tool as well.
https://project-gc.com/Tools/MapBookmarklist

You will find the bm-code in the url after going through the input process.
Re: GetBookmarklist
June 06, 2019 08:39PM
Yes, that tool works perfectly. Thanks for the pointer.
Sorry, you do not have permission to post/reply in this forum.