Skip to content
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

API: Trail ID #86

Closed
githubhacs opened this issue Jun 24, 2024 · 2 comments
Closed

API: Trail ID #86

githubhacs opened this issue Jun 24, 2024 · 2 comments

Comments

@githubhacs
Copy link

githubhacs commented Jun 24, 2024

hi,

problems
cannot search for Trails by easily known data to retreive Trail ID.
when a Trail is created by the Upload endpoint the ID is not available in the response.

The API's Trail endpoint performs a search using the ID ( https://wanderer.to/api-reference/trail/ ).
The only way I see to obtain the ID is by opening the view for the Trail.

Why do I care? :-)

I have a utility which will parse a GPX file, or if the file contains multiple days it'll split into separate tracks / files then:

  • using the Track's starting point's lat/lon lookup the address.
    • perform all manner of address munging depending on the address length.
  • using the GPX creator value sets an activity type.
  • get the Track's start Date and Time.

The new GPX track name is set as:

  • YYYY-MM-DD-gpx_activity_type-TrackStartLocation-TrackStartCountry+TrackStartPostcode

The new GPX Filename is set as:

  • YYY-MM-DD-GPX_ACTIVITY_TYPE-NOT_UPLOADED-COUNTRY.gpx

This file will be uploaded to Wanderer, hence NOT_UPLOADED in the filename.
Once it's been uploaded the NOT_UPLOADED portion of the filename becomes UPLOADED.

The aim is: once the the GPX file has been uploaded I can set various the Trail's properties using the Trail's Track Name data via the API.

To enable this the Trail ID is needed :-)

Thanks.

@Flomp
Copy link
Owner

Flomp commented Jun 28, 2024

Thanks for the hint. In v0.7.2 the upload endpoint now returns the trail id.

@githubhacs
Copy link
Author

Thanks very much, the ID is now returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants