UNPKG

@gooin/garmin-connect-cn

Version:

Makes it simple to interface with Garmin Connect CN to get or set any data point

29 lines (22 loc) 928 B
const { GarminConnect } = require('../dist/index'); // Has to be run in an async function to be able to use the await keyword const main = async () => { // Create a new Garmin Connect Client const GCClient = new GarminConnect({ username: 'goooinn@icloud.com', password: 'Yzt753951' }); // export const GARMIN_USERNAME_DEFAULT = 'gooin@outlook.com'; // export const GARMIN_PASSWORD_DEFAULT = 'Garmin753951'; // export const GARMIN_GLOBAL_USERNAME_DEFAULT = 'goooinn@gmail.com'; // export const GARMIN_GLOBAL_PASSWORD_DEFAULT = ',UxZ5YxiKK#N*56'; // Uses credentials from garmin.config.json or uses supplied params // await GCClient.login('goooinn@icloud.com', 'Yzt753951'); await GCClient.login(); // Get user info const info = await GCClient.getUserInfo(); // Log info to make sure signin was successful console.log(info); }; // Run the code main();