coddingtonbear / python-myfitnesspal

Access your meal tracking data stored in MyFitnessPal programatically
MIT License
797 stars 139 forks source link

Support for adding new foods #122

Closed neilramaswamy closed 2 years ago

neilramaswamy commented 3 years ago

I've looked through the API provided here and it seems like many of the provided features are for retrieving data about a logged in user's metrics—exercise, meals, measurements. However, I was thinking that it would be useful to be able to add data into MyFitnessPal through this Python API (in my use case, I want to programatically add foods to my account from my company's menu website).

I'd be happy to submit a PR for this feature (for /food/new), but I wanted to first check that this would philosophically align with the project. That is, are we avoiding making data insertion easy because that might anger the MyFitnessPal folks, who might in turn make their API harder for us to interact with? Or would it be undesirable to introduce a few "insertion" routes without supporting all of them?

If support for adding new foods, meals, etc. doesn't fit within the scope of this project, I'll just fork, add it myself, and drop a link to the fork down below, in case folks stumble across this thread in the future.

Thanks!

Dnic94 commented 3 years ago

Hey

I've looked through the API provided here and it seems like many of the provided features are for retrieving data about a logged in user's metrics—exercise, meals, measurements. However, I was thinking that it would be useful to be able to add data into MyFitnessPal through this Python API (in my use case, I want to programatically add foods to my account from my company's menu website).

I'd be happy to submit a PR for this feature (for /food/new), but I wanted to first check that this would philosophically align with the project. That is, are we avoiding making data insertion easy because that might anger the MyFitnessPal folks, who might in turn make their API harder for us to interact with? Or would it be undesirable to introduce a few "insertion" routes without supporting all of them?

If support for adding new foods, meals, etc. doesn't fit within the scope of this project, I'll just fork, add it myself, and drop a link to the fork down below, in case folks stumble across this thread in the future.

Thanks!

Hey @neilramaswamy . I already implemented this within the last month. There is an open pull request from me. Please check it out - New function to add Foods to the MFP DB #121 ;)

coddingtonbear commented 2 years ago

We can continue this discussion on #121 ; for the moment I'm going to close this, though. Cheers!