-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong state in API for dipped GK #1063
Comments
You're using
After checking the code, on this endpoint the state show if the GK is in a cache or not. So on a dipped,
Regarding https://geokrety.org/help/api#syncmethod1, given the code, this field is the actual logtype ID.
-- |
Wait-wait-wait! 0 is "dropped" which is IN THE CACHE, isn't it? It's not "absent". That's what we rely on in our scripts:
As we want to show only GK that next visitor can actually find in the cache. |
Maybe I mixed up some URLs btw, that's from our production code as well:
|
So basically at some point the interface of these endpoints was changes to completely opposite values? We had one script to rule them all which was able to handle data regardless of full export and incremental correctly. And now it sounds like we need to add some hack to treat "0" in one case completely differently from another... That sounds sad... |
I think you are mixing 2 APIs...
Did you try the I took one with <geokret id="22111">
<name><![CDATA[Quieschente ohne quietsch!]]></name>
<distancetravelled>1682</distancetravelled>
<state>1</state>
<position latitude="50.89835" longitude="8.06732"/>
<waypoints>
<waypoint><![CDATA[GCR6TH]]></waypoint>
</waypoints>
</geokret> It's last log is dropped, so it is present in cache, "state=1" is valid for and one with <geokret id="22728">
<name><![CDATA[Drewniany Pan]]></name>
<distancetravelled>10395</distancetravelled>
<state>0</state>
<position latitude="51.59365" longitude="16.04848"/>
<waypoints>
<waypoint><![CDATA[OP9W24]]></waypoint>
</waypoints>
</geokret> last log is now with
States a
|
Reported by gc.su users
GK: https://geokrety.org/ru/geokrety/GK14227
Website shows correctly that it was dipped in the cache https://geocaching.su/?pn=101&cid=31933.
However in the differential API it shows wrong state 0 ("dropped")
https://geokrety.org/api/v1/export_oc?modifiedsince=20240903070000&timezone=Europe%2FParis&compress=0
Please fix the API results so it shows the correct state (5?)
It's even mentioned in the API docs (https://geokrety.org/help/api#syncmethod1) that dipped ones should have value of "grabbed"
The text was updated successfully, but these errors were encountered: