Hello,
I would like to export the details of my activities (from the activities page) with the equipment used for each activity.
we can parameters several interesting thinks but I can't find how to add the Equipment filed
How can I dot It ?
Hello,
I would like to export the details of my activities (from the activities page) with the equipment used for each activity.
we can parameters several interesting thinks but I can't find how to add the Equipment filed
How can I dot It ?
You can write a script to print values in web-browser console (F12).
Add before to not mix order:
jQuery.ajaxSetup({async:false});
First link lists activities, change limit=100 as needed or add filters.
Second nested link checks gear, in print there is join() as there can be few gears for one activity. If you use single gear for each activity, then it could be: gear[0].customMakeModel.
jQuery.getJSON(
'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=100',
function(act_list)
{
act_list.forEach(
function(act)
{
jQuery.getJSON(
'https://connect.garmin.com/modern/proxy/gear-service/gear/filterGear?activityId=' + act.activityId,
function(gear)
{
console.dir(act.activityId, act.activityName, act.startTimeLocal, gear.map(i=>i.customMakeModel).join('|'));
}
);
}
);
}
);Hi,
Thanks for your answer
I have tried it but don't understand how modifying your custom function for sigle gear for each activity.
I try this :
console.dir(act.activityId, act.activityName, act.startTimeLocal, gear[0].customMakeModel))
But I have this error :
backbone-lib.js?bust=4.40.1.0:1 Uncaught TypeError: Cannot read property 'customMakeModel' of undefined
You can use join() also for single gear, it's just not needed, but it works.
For always single gear, you replaced good, but keep an eye on brackets, and if some of your activities don't have any gear, then you would need to add check if gear has any length: gear.length?value-if-true:value-if-false.
function(gear)
{
console.dir(gear.length?gear[0].customMakeModel:'no gear');
}