{"id":20972034,"url":"https://github.com/fabulator/garmin-api-handler","last_synced_at":"2025-05-14T11:34:03.438Z","repository":{"id":33610270,"uuid":"159978002","full_name":"fabulator/garmin-api-handler","owner":"fabulator","description":"Unofficial handler for Garmin connect API","archived":false,"fork":false,"pushed_at":"2025-03-31T16:23:06.000Z","size":3309,"stargazers_count":12,"open_issues_count":9,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T12:56:14.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabulator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T19:06:51.000Z","updated_at":"2025-03-12T05:27:00.000Z","dependencies_parsed_at":"2023-12-11T18:26:28.180Z","dependency_job_id":"b745d206-9d2f-4a43-9c20-d2039fd58701","html_url":"https://github.com/fabulator/garmin-api-handler","commit_stats":{"total_commits":550,"total_committers":4,"mean_commits":137.5,"dds":0.4872727272727273,"last_synced_commit":"7fc352c3af271b218779bac9aef864ca5b10954e"},"previous_names":[],"tags_count":229,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fgarmin-api-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fgarmin-api-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fgarmin-api-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fgarmin-api-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabulator","download_url":"https://codeload.github.com/fabulator/garmin-api-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254131954,"owners_count":22020053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T04:06:20.146Z","updated_at":"2025-05-14T11:34:03.423Z","avatar_url":"https://github.com/fabulator.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Garmin API handler\n\n[![npm version](https://badge.fury.io/js/garmin-api-handler.svg)](https://badge.fury.io/js/garmin-api-handler)\n[![renovate-app](https://img.shields.io/badge/renovate-app-blue.svg)](https://renovateapp.com/) \n[![Known Vulnerabilities](https://snyk.io/test/github/fabulator/garmin-api-handler/badge.svg)](https://snyk.io/test/github/fabulator/garmin-api-handler)\n[![codecov](https://codecov.io/gh/fabulator/garmin-api-handler/branch/master/graph/badge.svg)](https://codecov.io/gh/fabulator/garmin-api-handler) \n[![travis](https://travis-ci.org/fabulator/garmin-api-handler.svg?branch=master)](https://travis-ci.org/fabulator/garmin-api-handler)\n\n\nThis is an unofficial handler for Garmin Connect API. The documentation is bad :)\n\n## How to download fit files, example:\n\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst { GarminApi } = require('../dist');\nconst { DateTime } = require('luxon');\nrequire('cross-fetch/polyfill');\n\nconst extract = require('extract-zip')\n\n\nconst api = new GarminApi();\n\n(async () =\u003e {\n    await api.login(LOGIN, PASSWORD);\n\n    const activities = await api.getActivities({limit: 1000, startDate: DateTime.fromJSDate(new Date('2020-01-01')).startOf('day'), endDate: DateTime.fromJSDate(new Date('2020-12-31')).endOf('day')});\n\n    await Promise.all(activities.map(async (activity) =\u003e {\n        const data = await api.getActivityFile(activity.getId());\n        const fileName = `files/${activity.getId()}.fit.zip`;\n        fs.writeFileSync(fileName, Buffer.from(await data.arrayBuffer()));\n        await extract(path.resolve(__dirname, '..', fileName), { dir: path.resolve(__dirname, '..', 'files') })\n        fs.rmSync(fileName);\n    }));\n})()\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulator%2Fgarmin-api-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabulator%2Fgarmin-api-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulator%2Fgarmin-api-handler/lists"}