Closed aismail closed 8 years ago
Hey there @aismail; could I convince you into filing a pull request with the changes you posted in your 8-filtered-view-of-entries branch
? Having just glanced at those changes, they look like they'll work great, and I'm not sure if you were planning on adding additional features.
If you're not familiar with how a pull request works: you just click the "New Pull Request" button on https://github.com/coddingtonbear/python-myfitnesspal and select your branch name (8-filtered-view-of-entries branch
) when prompted.
Cheers!
Why
Sometimes, for analysis purposes, we want to extract a filtered view of a food log. For example, I want to be able to filter only those entries that correspond to sweets, that can be had at all meals. Or maybe I want to see how many bread-related products I am eating.
What
get_date
method from Client receivesfilter
as a parameter. It is a function which takes one parameter of typemyfitnesspal.entry.Entry
and returnsTrue
/False
depending on whether the entry is added or notNote
This is not exactly the ideal solution. The ideal solution is to make the
Day
/Meal
/Entry
structures mutable. However, for me that is too much work right now.