feat: Added create a recipe command
This commit is contained in:
@@ -101,6 +101,15 @@ class Recipe(Schema):
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
def create(self):
|
||||
created_recipe = {
|
||||
'description': self.description,
|
||||
'name': self.name,
|
||||
'base_servings': self.base_servings,
|
||||
'desired_servings': self.desired_servings,
|
||||
'not_check_shoppinglist': self.not_check_shoppinglist
|
||||
}
|
||||
self.rest_service.post('recipes', created_recipe)
|
||||
def get(self, include_products=False):
|
||||
try:
|
||||
recipe = self.rest_service.get('recipes', id=self.id)
|
||||
|
Reference in New Issue
Block a user