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

v1.6.0 Fix most features. #56

Merged
merged 33 commits into from
Oct 19, 2023
Merged

v1.6.0 Fix most features. #56

merged 33 commits into from
Oct 19, 2023

Conversation

gooin
Copy link
Contributor

@gooin gooin commented Oct 2, 2023

  • New HttpClient class
  • Login and get user token
  • Garmin URLs works with garmin.cn and garmin.com
  • Auto refresh Ouath2 token
  • Oauth1,Oauth2 token import and export.
  • Download Activity, countActivities, getActivities, getActivity, getUserProfile, getUserSettings
  • Upload Activity, delete Activity
  • Implementation of other methods, such as Badge,Workout,Gear etc
  • Handle MFA
  • Handle Account locked
  • Unit test
  • Listeners

@gooin gooin mentioned this pull request Oct 2, 2023
@gooin gooin closed this Oct 2, 2023
@gooin gooin reopened this Oct 2, 2023
@Abasz
Copy link

Abasz commented Oct 2, 2023

Is there a specific reason that you are still using the /proxy/ path on the connect api?

Actually, for some reasons I got errors on that and moved to connectapi.garmin.com without the /proxy/. I checked and I think this is used by Garth as well.

So for instance, activity list service: https://connectapi.garmin.com/activitylist-service/activities/search/activities
or download service: https://connectapi.garmin.com/download-service/files/activity/

@gooin
Copy link
Contributor Author

gooin commented Oct 2, 2023

Is there a specific reason that you are still using the /proxy/ path on the connect api?

Actually, for some reasons I got errors on that and moved to connectapi.garmin.com without the /proxy/. I checked and I think this is used by Garth as well.

So for instance, activity list service: https://connectapi.garmin.com/activitylist-service/activities/search/activities or download service: https://connectapi.garmin.com/download-service/files/activity/

I use UrlClass.ts not url.ts

@Abasz
Copy link

Abasz commented Oct 2, 2023

Is there a specific reason that you are still using the /proxy/ path on the connect api?
Actually, for some reasons I got errors on that and moved to connectapi.garmin.com without the /proxy/. I checked and I think this is used by Garth as well.
So for instance, activity list service: https://connectapi.garmin.com/activitylist-service/activities/search/activities or download service: https://connectapi.garmin.com/download-service/files/activity/

I use UrlClass.ts not url.ts

you are right... sorry I missed that.

@gooin
Copy link
Contributor Author

gooin commented Oct 2, 2023

Is there a specific reason that you are still using the /proxy/ path on the connect api?
Actually, for some reasons I got errors on that and moved to connectapi.garmin.com without the /proxy/. I checked and I think this is used by Garth as well.
So for instance, activity list service: https://connectapi.garmin.com/activitylist-service/activities/search/activities or download service: https://connectapi.garmin.com/download-service/files/activity/

I use UrlClass.ts not url.ts

you are right... sorry I missed that.

I Will delete it later.😂

@gooin
Copy link
Contributor Author

gooin commented Oct 2, 2023

Is there a specific reason that you are still using the /proxy/ path on the connect api?
Actually, for some reasons I got errors on that and moved to connectapi.garmin.com without the /proxy/. I checked and I think this is used by Garth as well.
So for instance, activity list service: https://connectapi.garmin.com/activitylist-service/activities/search/activities or download service: https://connectapi.garmin.com/download-service/files/activity/

I use UrlClass.ts not url.ts

you are right... sorry I missed that.

@Abasz removed...

@kspetrov
Copy link

kspetrov commented Oct 3, 2023

@gooin Hi! What about workout methods? Or this is not in your plan?

@gooin
Copy link
Contributor Author

gooin commented Oct 3, 2023 via email

@kspetrov
Copy link

kspetrov commented Oct 3, 2023

Perfect! :) Thanks a lot!!!

@gooin
Copy link
Contributor Author

gooin commented Oct 3, 2023

Perfect! :) Thanks a lot!!!

Latest commit added workout methods. See 901a70f

@pauly
Copy link

pauly commented Oct 9, 2023

Is the whole interface changing here? The original examples aren't working, neither is my code if I switch to this branch.
I see the change from

await GCClient.login(process.env.GUSER, process.env.GPASS)
const userProfile = await GCClient.getUserProfile()
const stepData = await GCClient.getSteps(new Date(date))

now there is no getSteps()

@gooin
Copy link
Contributor Author

gooin commented Oct 10, 2023

Is the whole interface changing here? The original examples aren't working, neither is my code if I switch to this branch. I see the change from

await GCClient.login(process.env.GUSER, process.env.GPASS)
const userProfile = await GCClient.getUserProfile()
const stepData = await GCClient.getSteps(new Date(date))

now there is no getSteps()

steps, sleep, weight, gear are not implemented yet, see GarminConnect.ts

@@ -1,18 +1,33 @@
const { GarminConnect } = require('garmin-connect');
const { GarminConnect } = require('../dist/index');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be 'garmin-connect'

@@ -1,12 +1,14 @@
{
"name": "garmin-connect",
"version": "1.5.0",
"version": "1.6.5",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not bump version numbers, this will be done along with a new release

@Pythe1337N Pythe1337N changed the base branch from master to gooin-fixes October 19, 2023 08:36
@Pythe1337N Pythe1337N merged commit baeed07 into Pythe1337N:gooin-fixes Oct 19, 2023
@matin
Copy link

matin commented Oct 26, 2023

@gooin well done! 👏🏽

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.

7 participants