Closed nathanmerrill closed 5 years ago
Same here, although when I run day.exercises
it just returns [<Cardiovascular>, <Strength Training>]
as opposed to any actual data, so I wonder if the exercise bit doesn't actually work!
I'm afraid that was a community contribution from @samhinshaw, so we'll either have to ask him to write some docs, or you folks can come together to try to write them -- I'd be glad to accept a PR covering that functionality's use.
Looking at the code it looks like each of the objects you see printed (<Cardiovascular>
or <Strength>
) has a few useful properties:
name
('cardiovascular' or 'strength', at least)entries
get_as_list()
Try those out to see what you get!
Thanks @coddingtonbear , just tried it, and both entries
and get_as_list()
gave me what I wanted (name, duration and calories)
Could I trouble you to post some sample output from each of those commands so even somebody who doesn't use this feature of MFP might be able to write some docs?
No problem, I've submitted a pull request
Thanks so much for adding some docs, @AleenaCodes; I'm sure that'll help lots of folks!
Awesome, thanks @AleenaCodes! Sorry about that 😶
Looks like exercises was added recently. I'm struggling to figure out how to use it, so some documentation would be great!