Opened 9 years ago

Closed 9 years ago

#3278 closed enhancement (fixed)

No way to retrieve "description" and "tags" for uploaded GPX tracks?

Reported by: hartmut@… Owned by: Tom Hughes
Priority: minor Milestone:
Component: api Version:
Keywords: gpx tracks Cc:

Description

When uploading a GPX track file via "/api/0.6/gpx/create" i can provide "description" and "tags" fields, none of the gpx related API functions seem to be able to retrieve these values though?

Proposed enhancement alternatives:

  • add "description" and "tags" attributes to the <gpx_file> tags returned by /api/0.6/gpx/<id>/details
  • instead of adding attributes to <gpx_file> maybe make <gpx_file> a container that may have optional <description> and <tags> data subcontainers (field contents are usually rather short though, so attributes may be sufficient)
  • create separate API calls for these values

Attachments (1)

patch.txt (347 bytes) - added by hartmut@… 9 years ago.
patch to add "description" and "tags" attributes to /user/gpx_files and /gpx/<id>/details responses

Download all attachments as: .zip

Change History (3)

comment:1 Changed 9 years ago by hartmut@…

proposed patch (from someone with next to zero ruby foo) for the simple "extra attributes" approach

--- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -155,6 +155,8 @@ class Trace < ActiveRecord::Base

el1visibility? = self.visibility el1pending? = (!self.inserted).to_s el1timestamp? = self.timestamp.xmlschema

+ el1description? = self.description; + elitags? = self.tags.join(" ,");

return el1

end

Changed 9 years ago by hartmut@…

Attachment: patch.txt added

patch to add "description" and "tags" attributes to /user/gpx_files and /gpx/<id>/details responses

comment:2 Changed 9 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

Implemented (as subelements).

Note: See TracTickets for help on using tickets.