openambitproject / openambit

openambit
280 stars 82 forks source link

Provide support for downloading XLSX/KML/GPX/... #155

Closed centic9 closed 7 years ago

centic9 commented 7 years ago

Not sure if this is possible via the Suunto REST interface, but it would be nice if we could add UI for downloading the resulting .xlsx/.gpx/.kml files that the Suunto Web UI provides.

I would be willing to work on this feature, but as the REST API is not documented and I have no information about it whats-o-ever, it is hard to see if this is even feasible. Does anyone have enough insider-information to be able to state if it is even possible?

centic9 commented 7 years ago

I just now found issue #20 , this one basically is the same thing only also for other types of downloads that Movescount provides, e.g. .kml, .xlsx, .fit, ...

marguslt commented 7 years ago

Considering that Movescount web UI provides export options and Openambit has a potential to provide completely offline or self-hosted solution, on it's own or combined with some other project, e.g. https://github.com/bwaldvogel/openmoves , could you name few examples where exporting thought Openambit UI + Movescount service would be superior over local conversion or doing that same thing in Movescount web? I only ask because personally I'm still more interested in processing and output plugin framework ( https://github.com/openambitproject/openambit/issues/25#issuecomment-41038163 ).

uiservices.movescount.com used to have metadata publishing enabled, this provided basic documentation for REST API . Some time (6 months or so) ago publishing was turned off, but If I remember correctly, uiservices api (or atleast the published part) moves GET knew only about json at that time. Yet I'm sure they have set up format converters for 3rd party services like Strava and TP, just not so sure it is provided by the same uiservices that serves Moveslink2 desktop and mobile Movescount apps. Somehow related - mobile Movescount is not only for syncing activities from bluetooth-enabled Suuntos, it also downloads, stores and lists Moves from Movescount ... and there are number of really good debugging proxies available ...

Web backend also provides www.movescount.com/move/export?id=<move_id>&format=gpx , but you need to handle authentication.

Regarding access to api & docs, you might find this - https://github.com/cpfair/tapiriik/issues/68 - interesting.

centic9 commented 7 years ago

Thanks for the hints, I previously went the way of web-ui-sctaping, but it sometimes broke and lately somehow became impossible for me to use, so I am looking for alternatives.

I'll look at the Android app to see if it allows to glimpse some bits out of the used protocoll.

marguslt commented 7 years ago

If you just want to set up some automation or mass-export for yourself, poking Movescount web with browser developer tools will reveal everything you need regarding listing and exporting Moves.

A lazy way to get around authentication for something like that is to use cookies from your browser session - Network tab in Chrome dev.tools provides "copy as cURL" for every URL, this includes cookies and thus is a nice base for your own scripts. And Movescount keeps you logged in for a looong time.

As exporting has been exactly the same for at least a year, I'd assume core functions of Movescont backend will not change as often as web ui.

centic9 commented 7 years ago

Yes, that's the route that I am going now, only it is kind of cumbersome and would be nicer if the REST interface could be used for all steps, however with the current information it seems this is not possible and thus not feasible in openambit itself.