Pythe1337N / garmin-connect

Makes it simple to interface with Garmin Connect to get or set any data point.
MIT License
145 stars 60 forks source link

Weather #13

Closed Includes21 closed 3 years ago

Includes21 commented 3 years ago

Hello, is it possible to receive weather data from activity?

Pythe1337N commented 3 years ago

Hi, there is no built in support for fetching weather data with this library yet. However it should be possible to do this by building custom request according to the readme. It seems that the weather data can be fetched using this url: https://connect.garmin.com/modern/proxy/activity-service/activity/[activity id]/weather The response I got contained this information:

{
    "issueDate": "2020-11-17T14:00:00.000+0000",
    "temp": 48,
    "apparentTemp": null,
    "dewPoint": 43,
    "relativeHumidity": 82,
    "windDirection": null,
    "windDirectionCompassPoint": "N/A",
    "windSpeed": null,
    "windGust": null,
    "latitude": 59.349998,
    "longitude": 18.0667,
    "weatherStationDTO": {
        "id": "02484",
        "name": "02484",
        "timezone": null
    },
    "weatherTypeDTO": {
        "weatherTypePk": null,
        "desc": "Unknown",
        "image": "099.png"
    }
}

If you do get it to work feel free to add it to this repo as well.

Pythe1337N commented 3 years ago

This is now supported since version 1.4.0