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

Backport changes from moderation and pe-st to kjkjava #42

Closed
wants to merge 79 commits into from

Conversation

pe-st
Copy link

@pe-st pe-st commented Apr 11, 2018

Hello Kyle

This PR contains all the required changes to make your script work again after the recent changes to the Garmin Connect site, as well as other refactorings from the moderation and my (pe-st) fork.

I tried to keep your CSV format as unchanged as possible (same columns, same formatting)

Regards, Peter

yohcop and others added 30 commits October 15, 2015 21:42
JSON format does not download any file, but saves all the metadata received about activities in a .json file.
…ns, formatting changes for input to Google Spreadsheets.
Fixed keyError when parsing totalFound results
Fix download URLs to point to modern proxy so TCX/GPX download works.
Reduce maximum to 19, as everything bigger gets a 500 status:

    Making activity request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    http://connect.garmin.com/proxy/activity-search-service-1.2/json/activities?start=0&limit=1
    Finished activity request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Garmin Connect activity: [NNNNNNNNNN] (activity name)
        Tue, 6 Mar 2018 10:23, 00:57:44, 11.20 Kilometers
    https://connect.garmin.com/modern/proxy/download-service/export/gpx/activity/NNNNNNNNNN?full=true
        Downloading file... Done. GPX data saved.
    Making activity request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    http://connect.garmin.com/proxy/activity-search-service-1.2/json/activities?start=1&limit=20
    Traceback (most recent call last):
      File "./gcexport.py", line 284, in <module>
        result = http_req(url_gc_search + urlencode(search_params))
      File "./gcexport.py", line 82, in http_req
      ...
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    urllib2.HTTPError: HTTP Error 500: Internal Server Error
Use `limit_maximum` instead of magic number
The old endpoint ('activity-search-service-1.2') doesn't seem to
work anymore for more than 20 activities, but is still useful for
the result summary (total numbers of activities)

The new endpoint ('activitylist-service') has an almost
completely different JSON output, which hasn't been adapted yet.
pe-st and others added 22 commits April 2, 2018 11:47
Cleanup also other stuff like unneeded quote escaping for columns
that will never see a quote, etc.
no point in using a float with one decimal place
This format is almost the same that Garmin used
in the activity-search-service
Cleanup also other stuff like unneeded quote escaping for columns
that will never see a quote, etc.
no point in using a float with one decimal place for heart rate
The ticket is now extracted from the login response.
The cookies are not needed anymore, as well as the
voodoo calls to modern and legacy session.

For the post_auth call I chose just an URL that worked when
analyzing the HTTP traffic in the browser, maybe there are better
ones (with less payload)?

Issue moderation/garmin-connect-export#10
It's already checked before
The detail contains also average and max temperature
The 'pretty' names come from a dictionary retrieved by separate
REST calls
It's already checked before
The 'pretty' names come from a dictionary retrieved by separate
REST calls
pe-st added a commit to pe-st/garmin-connect-export that referenced this pull request Sep 8, 2018
- endTimeMillis column
- raw duration columns
- xxxSpeedPaceRaw columns

csv_header_running.properties template now corresponds to my old open PR
kjkjava/garmin-connect-export#42
@pe-st
Copy link
Author

pe-st commented Jan 3, 2021

I got a PR (pe-st/garmin-connect-export#53) in my own fork to detach my fork, and I think after more than 30 months without a reaction to this PR here this might be the right thing to do.

@pe-st
Copy link
Author

pe-st commented Feb 10, 2021

@pe-st pe-st closed this Feb 10, 2021
@pe-st pe-st deleted the feature/revert-csv-to-kjkjava branch February 10, 2021 21:41
@pe-st pe-st restored the feature/revert-csv-to-kjkjava branch February 10, 2021 21:42
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

Successfully merging this pull request may close these issues.

5 participants