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

get_activities() not found #201

Open
chris-brown-nz opened this issue Apr 26, 2024 · 3 comments
Open

get_activities() not found #201

chris-brown-nz opened this issue Apr 26, 2024 · 3 comments

Comments

@chris-brown-nz
Copy link

chris-brown-nz commented Apr 26, 2024

Hi, I'm getting an error running the following:

gc.get_activities(start_date, 10)

This is the output:

HTTPError                                 Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/garth/http.py](https://localhost:8080/#) in request(self, method, subdomain, path, api, referrer, headers, **kwargs)
    138         try:
--> 139             self.last_resp.raise_for_status()
    140         except HTTPError as e:

5 frames
HTTPError: 404 Client Error: Not Found for url: https://connectapi.garmin.com/activitylist-service/activities/search/activities?start=2024-04-22&limit=10

During handling of the above exception, another exception occurred:

GarthHTTPError                            Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/garth/http.py](https://localhost:8080/#) in request(self, method, subdomain, path, api, referrer, headers, **kwargs)
    139             self.last_resp.raise_for_status()
    140         except HTTPError as e:
--> 141             raise GarthHTTPError(
    142                 msg="Error in request",
    143                 error=e,

GarthHTTPError: Error in request: 404 Client Error: Not Found for url: https://connectapi.garmin.com/activitylist-service/activities/search/activities?start=2024-04-22&limit=10

I am happy to have a look into this but can't find any documentation for the connect api - can you point me to it please?

@darroni
Copy link

darroni commented Apr 26, 2024

Try changing to
.get_activities_by_date(start_date, end_date)

@chris-brown-nz
Copy link
Author

.get_activities_by_date(start_date, end_date) works, thanks

@darroni
Copy link

darroni commented Apr 26, 2024

I don't think the get_activities method supports the datetime format. Maybe someone else can confirm.

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

No branches or pull requests

2 participants