Giter Site home page Giter Site logo

marazt / garmin-connect-client Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 327 KB

GarminConnectClient is a library for communication with GarminConnect. It allows to list, download and upload Garmin activities. It is inspired by https://github.com/La0/garmin-uploader.

License: MIT License

C# 99.28% PowerShell 0.72%

garmin-connect-client's People

Contributors

marazt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

garmin-connect-client's Issues

Garmin API URLs are no longer valid

Hi I think there has been some changes to the garmin API and the library no longer works.

This returns a PaymentRequired status: CONNECT_URL + "modern/proxy/upload-service/upload"

Removing the modern works: CONNECT_URL + "/proxy/upload-service/upload"

Furthermore, ValidateModernTicketUrlResponseMessage check is no longer valid, as the new API returns OK status code instead of PermanentlyMoved, so it returns.

I have issue with

Tried to run the code

`
res = await this.httpClient.GetAsync(url);

        ValidateModernTicketUrlResponseMessage(res, $"Second auth step failed to produce success or expected 302: {res.StatusCode}.");

`

res
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers:
{
Date: Sun, 14 Feb 2021 19:15:00 GMT
Connection: keep-alive
Cache-Control: no-store, must-revalidate, no-cache, max-age=0
Pragma: no-cache
Set-Cookie: ADRUM_BTa=R:1083|g:ac047d3d-5346-478a-beb4-3299ea365f7b|n:garmin_869629ee-d273-481d-b5a4-f4b0a8c4d5a3; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure
Set-Cookie: ADRUM_BTa=R:1083|g:bb981197-f6df-4d0a-8ba3-81812c2a85bf; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: ADRUM_BTa=R:1083|g:bb981197-f6df-4d0a-8ba3-81812c2a85bf|n:garmin_869629ee-d273-481d-b5a4-f4b0a8c4d5a3; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: SameSite=None; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: SESSIONID=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
Set-Cookie: ADRUM_BTa=R:1083|g:ac047d3d-5346-478a-beb4-3299ea365f7b|n:garmin_869629ee-d273-481d-b5a4-f4b0a8c4d5a3; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure
Set-Cookie: ADRUM_BTa=R:1083|g:600e79f9-0d01-47d3-8393-e337f7544374; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: ADRUM_BTa=R:1083|g:600e79f9-0d01-47d3-8393-e337f7544374|n:garmin_869629ee-d273-481d-b5a4-f4b0a8c4d5a3; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: SameSite=None; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Set-Cookie: ADRUM_BT1=R:1083|i:259057; Max-Age=30; Expires=Sun, 14-Feb-2021 19:15:30 GMT; Path=/; Secure
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
x-vcap-request-id: 635a8e82-6363-4a13-4d39-785d5bf25457
x-xss-protection: 1; mode=block
CF-Cache-Status: DYNAMIC
cf-request-id: 084390c91b0000140c41a4b000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 62191d882e3a140c-SEA
Content-Type: application/json; charset=UTF-8
Content-Length: 255
Expires: 0
}}

Any ideas how to fix this?

System.FormatException when returning internalId on weight scale file upload

Hi, There is an System.FormatException when a weight scale fit File is uploaded as it does not have an internalId (as the detailedImportResult.successes.internalId field is null). Hence the UploadActivity method cannot return a valid long.

I recommend using tryParse instead as its out parameter will be set to 0 if parsing is not possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.