coddingtonbear / python-myfitnesspal

Access your meal tracking data stored in MyFitnessPal programatically
MIT License
794 stars 136 forks source link

Add exercise to documentation #79

Closed nathanmerrill closed 5 years ago

nathanmerrill commented 5 years ago

Looks like exercises was added recently. I'm struggling to figure out how to use it, so some documentation would be great!

AleenaCodes commented 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!

coddingtonbear commented 5 years ago

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:

Try those out to see what you get!

AleenaCodes commented 5 years ago

Thanks @coddingtonbear , just tried it, and both entries and get_as_list() gave me what I wanted (name, duration and calories)

coddingtonbear commented 5 years ago

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?

AleenaCodes commented 5 years ago

No problem, I've submitted a pull request

coddingtonbear commented 5 years ago

Thanks so much for adding some docs, @AleenaCodes; I'm sure that'll help lots of folks!

samhinshaw commented 5 years ago

Awesome, thanks @AleenaCodes! Sorry about that 😶