garmin-connect icon indicating copy to clipboard operation
garmin-connect copied to clipboard

Export UrlClass

Open dachia opened this issue 1 year ago • 2 comments

Hi, @Pythe1337N

Thank you for this library.

There's an obvious use case to use custom requests, and IMHO it would make sense to export UrlClass for that purpose. I am using UrlClass, because you, as a maintainer, know better which URLs are possible. As an example, I had no idea of the GC_API URL until I looked at the source code.

Right now I am importing UrlClass directly like this import gcUrl from 'garmin-connect/dist/garmin/UrlClass.js'; which is very flaky.

Thank you for all your time and effort!

P.S. If you would prefer it, I can create PR for this

dachia avatar Nov 22 '23 07:11 dachia

@dachia - you can access these via GCClient

ie: GCClient.url.BASE_URL

gregegan avatar Dec 31 '23 08:12 gregegan

Mark as resolved @Pythe1337N

gregegan avatar Jan 18 '24 06:01 gregegan