Skip to content

Commit

Permalink
Added Function to create new Foods
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnic94 committed Aug 21, 2021
1 parent 18eec52 commit 0d7b27a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myfitnesspal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def set_new_food(self, brand: str, description: str, calories: int, fat: float,
fiber: float = "", monounsaturated_fat: float = "", sugar: float = "", trans_fat: str = float,
cholesterol: float = "", vitamin_a: float = "", calcium: float = "", vitamin_c: float = "",
iron: float = "",
serving_size: str = "1 Serving", servingspercontainer: float = "1.0", sharepublic: int = 0 ):
serving_size: str = "1 Serving", servingspercontainer: float = "1.0", sharepublic: bool = False ):
"""Function to Submit new Foods to MFP"""

# TODO Test Food Dict
Expand Down Expand Up @@ -886,7 +886,7 @@ def set_new_food(self, brand: str, description: str, calories: int, fat: float,
"food_entry[meal_id]": "0",
"addtodiary": "no",
"preserve_exact_description_and_brand": "true",
"sharefood": "{}".format(sharepublic),
"sharefood": "{}".format(int(sharepublic)),
"continue": "Save"
},
)
Expand Down

0 comments on commit 0d7b27a

Please sign in to comment.