-
Notifications
You must be signed in to change notification settings - Fork 22
I know a lot of people like to automate things and used the old version to scrape large areas. Lab2Gpx V2 is not a form anymore but uses an api the fetch data from the backend.
For the download just send the settings as a json string in the body of the POST request
curl -X POST "https://api.lab2gpx.gcutils.de/download" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"version": 2,
"locale": "en",
"radius": 15,
"coordinates": {
"lat": 52.520008,
"lon": 13.404954
},
"limit": 300,
"cacheType": "Lab Cache",
"linear": "default",
"prefix": "LC",
"stageSeparator": true,
"customCodeTemplate": null,
"userGuid": null,
"completionStatuses": [
"0",
"1",
"2"
],
"includeQuestion": true,
"includeWaypointDescription": true,
"includeCacheDescription": true,
"excludeOwner": null,
"excludeNames": null,
"excludeUuids": null,
"quirksL4Ctype": false,
"outputFormat": "gpx"
}
JSONThe response is either HTTP Status 200 and the file or any other Status Code and the error message in a json response.
Instead of JSON you can also send variables as Content-Type: application/x-www-form-urlencoded e.g. for usage with GSAKs PostUrl() function. See https://github.com/mirsch/lab2gpx/issues/215
to match other/old data you may require the Lab2Gpx Code for an UUID or vice versa
GET https://api.lab2gpx.gcutils.de/lab2gpx-data/by-code/<CODE>
GET https://api.lab2gpx.gcutils.de/lab2gpx-data/by-uuid/<UUID>
will give you the corresponding data from the Lab2Gpx Database or HTTP Status 404 if the information was not found in the DB.
These 2 calls tell you nothing about the current state of the Adventure Lab.
It's meant to get the data Lab2Gpx stores in it's database. This call gives you the code for the given UUID/GUID nothing more (title and coordinates are just for orientation/debug). This data is only updated once (the first time lab2gpx downloads the Adventure Lab)
The only interesting data in the response is uuid, code and parent.
if parent is null, uuid is the UUID/GUID of the Adventure Lab
if parent is not null, uuid is the UUID/GUID of the Stage and parent is the UUID/GUID of the Adventure Lab
code is the code fragment.