diff --git a/setup.py b/setup.py index 846fcc1..f9bd3a4 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,6 @@ entry_points={ 'console_scripts': ['swagger_server=swagger_server.__main__:main']}, long_description="""\ - __Important:__ - An __[API key](https://chompthis.com/api/)__ is required for access to this API. - Get yours at __[https://chompthis.com/api](https://chompthis.com/api/)__. ----- __Getting Started:__ - __[Subscribe](https://chompthis.com/api/#pricing)__ to the API. - Scroll down and click the \"__Authorize__\" button. - Enter your API key into the \"__value__\" input, click the \"__Authorize__\" button, then click the \"__Close__\" button. - Scroll down to the section titled \"__default__\" and click on the API endpoint you wish to use. - Click the \"__Try it out__\" button. - Enter the information the endpoint requires. - Click the \"__Execute__\" button. __Example:__ - __[View example](https://raw.githubusercontent.com/chompfoods/examples/master/response-object.json)__ API response object. ----- __How Do I Find My API Key?__ - Your API key was sent to the email address you used to create your subscription. - You will also find your API key in the __[Client Center](https://chompthis.com/api/manage.php)__. - _Read __[this article](https://desk.zoho.com/portal/chompthis/kb/articles/how-do-i-find-my-api-key)__ for more information._ ||| | ------- | -------- | | [Knowledge Base](https://desk.zoho.com/portal/chompthis/kb/chomp) | [Pricing](https://chompthis.com/api/) | | [Attribution](https://chompthis.com/api/docs/attribution.php) | [Cost Calculator](https://chompthis.com/api/cost-calculator.php) | | [Terms & License](https://chompthis.com/api/terms.php) | [Database Search](https://chompthis.com/api/lookup.php) | | [Support](https://chompthis.com/api/ticket-new.php) | [Query Builder](https://chompthis.com/api/build.php) | | [Client Center](https://chompthis.com/api/manage.php) | | + ## Important An **[API key](https://chompthis.com/api/)** is required for access to this API. Get yours at **[https://chompthis.com/api](https://chompthis.com/api/)**. ### Getting Started * **[Subscribe](https://chompthis.com/api/#pricing)** to the API. * Scroll down and click the \"**Authorize**\" button. * Enter your API key into the \"**value**\" input, click the \"**Authorize**\" button, then click the \"**Close**\" button. * Scroll down to the section titled \"**default**\" and click on the API endpoint you wish to use. * Click the \"**Try it out**\" button. * Enter the information the endpoint requires. * Click the \"**Execute**\" button. ### Example * Branded food response object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/branded-food-response-object.json)** * Ingredient response object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/ingredient-response-object.json)** * Error response object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/error-response-object.json)** ### How Do I Find My API Key? * Your API key was sent to the email address you used to create your subscription. * You will also find your API key in the **[Client Center](https://chompthis.com/api/manage.php)**. * Read **[this article](https://desk.zoho.com/portal/chompthis/kb/articles/how-do-i-find-my-api-key)** for more information. ### Helpful Links * **Help & Support** * [Knowledge Base »](https://desk.zoho.com/portal/chompthis/kb/chomp) * [Support »](https://chompthis.com/api/ticket-new.php) * [Client Center »](https://chompthis.com/api/manage.php) * **Pricing** * [Subscription Options »](https://chompthis.com/api/) * [Cost Calculator »](https://chompthis.com/api/cost-calculator.php) * **Guidelines** * [Terms & License »](https://chompthis.com/api/terms.php) * [Attribution »](https://chompthis.com/api/docs/attribution.php) """ ) diff --git a/swagger_server/controllers/default_controller.py b/swagger_server/controllers/default_controller.py index 8b0fa85..6529b4f 100644 --- a/swagger_server/controllers/default_controller.py +++ b/swagger_server/controllers/default_controller.py @@ -9,9 +9,9 @@ def food_branded_barcode_php_get(code): # noqa: E501 """Get a branded food item using a barcode - # Get data for a branded food using the food's UPC/EAN barcode. __Example:__ ```https://chompthis.com/api/v2/food/branded/barcode.php?api_key=API_KEY&code=CODE``` # noqa: E501 + ## Get data for a branded food using the food's UPC/EAN barcode. **Example** > ```https://chompthis.com/api/v2/food/branded/barcode.php?api_key=API_KEY&code=CODE``` **Tips** * Read our **[Knowledge Base article](https://desk.zoho.com/portal/chompthis/kb/articles/im-having-trouble-getting-matches-for-barcodes-what-can-id-do)** for helpful tips and tricks. # noqa: E501 - :param code: UPC/EAN barcode __Example:__ 0842234000988 __Resources:__ [Database search](https://chompthis.com/api/lookup.php) _Read [this article](https://desk.zoho.com/portal/chompthis/kb/articles/im-having-trouble-getting-matches-for-barcodes-what-can-id-do) for tips and tricks._ + :param code: #### UPC/EAN barcode **Example** > ```&code=0842234000988``` :type code: str :rtype: BrandedFoodObject @@ -19,30 +19,17 @@ def food_branded_barcode_php_get(code): # noqa: E501 return 'do some magic!' -def food_branded_id_php_get(id, source=None): # noqa: E501 - """Get a branded food item using an ID number - - # Get data for a branded food using Chomp's internal ID number. _Alternatively, set the \"source\" parameter to \"USDA\" and use the food's FDC ID._ __Example:__ ```https://chompthis.com/api/v2/food/branded/id.php?api_key=API_KEY&id=ID``` # noqa: E501 - - :param id: Chomp branded food ID. _Set \"source=USDA\" if you wish to pass in the food's FoodData Central ID (fdc_id)._ __Example #1:__ 15 __Resources:__ [Find branded food IDs](https://chompthis.com/api/lookup.php) - :type id: int - :param source: Specify the data source (optional). You must pass in \"USDA\" if you want to look up a food item using a USDA FDC ID. __Example:__ USDA _(defaults to \"Chomp\")_ - :type source: str - - :rtype: BrandedFoodObject - """ - return 'do some magic!' - - -def food_branded_name_php_get(name, limit=None): # noqa: E501 +def food_branded_name_php_get(name, limit=None, page=None): # noqa: E501 """Get a branded food item by name - # Search for branded food items by name. __Example:__ ```https://chompthis.com/api/v2/food/branded/name.php?api_key=API_KEY&name=NAME``` # noqa: E501 + ## Search for branded food items by name. **Example** > ```https://chompthis.com/api/v2/food/branded/name.php?api_key=API_KEY&name=NAME``` **Tips** * Get started by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. # noqa: E501 - :param name: Branded food name __Example:__ Starburst __Resources:__ [Find branded food names](https://chompthis.com/api/lookup.php) + :param name: #### Search for branded food items using a general food name keyword. This does not have to exactly match the \"official\" name for the food. **Example** > ```&name=Starburst``` :type name: str - :param limit: Set maximum number of records you want the API to return. ___Note:__ The maximum value is 10._ __Example:__ 3 _(defaults to 10)_ + :param limit: #### Set maximum number of records you want the API to return. The default value is \"**10**.\" **Example** > ```&limit=10``` :type limit: int + :param page: #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` + :type page: int :rtype: BrandedFoodObject """ @@ -52,35 +39,35 @@ def food_branded_name_php_get(name, limit=None): # noqa: E501 def food_branded_search_php_get(allergen=None, brand=None, category=None, country=None, diet=None, ingredient=None, keyword=None, mineral=None, nutrient=None, palm_oil=None, trace=None, vitamin=None, limit=None, page=None): # noqa: E501 """Get data for branded food items using various search parameters - # Search for branded food items using various parameters. __Example:__ ```https://chompthis.com/api/v2/food/branded/search.php?api_key=API_KEY&brand=BRAND&country=COUNTRY&page=1``` ___Tip:__ Get started by using the [Query Builder](https://chompthis.com/api/build.php)._ # noqa: E501 + ## Search for branded food items using various parameters. **Example** > ```https://chompthis.com/api/v2/food/branded/search.php?api_key=API_KEY&brand=BRAND&country=COUNTRY&page=1``` **Tips** * Get started by using the **[Query Builder](https://chompthis.com/api/build.php)**. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. # noqa: E501 - :param allergen: Specify a required allergen ingredient (optional) __Example__: Peanuts __Resources__: [List of allergens](https://chompthis.com/api/data/allergen.php) + :param allergen: #### Filter the search to only include branded foods that contain a specific allergen. **Example** > ```&allergen=Peanuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type allergen: str - :param brand: Specify a required brand (optional) __Example__: Starbucks __Resources__: [List of brands](https://chompthis.com/api/data/brand.php) + :param brand: #### Filter the search to only include branded foods that are owned by a specific brand. **Example** > ```&brand=Starbucks``` :type brand: str - :param category: Specify a required category (optional) __Example__: Pasta Dishes __Resources__: [List of categories](https://chompthis.com/api/data/category.php) + :param category: #### Filter the search to only include branded foods from a specific category. **Example** > ```&category=Plant Based Foods``` :type category: str - :param country: Specify a required country (optional) __Example__: United States __Resources__: [List of countries](https://chompthis.com/api/data/country.php) + :param country: #### Filter the search to only include branded foods that are sold in a specific country. **Example** > ```&country=United States``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type country: str - :param diet: Specify a required diet (optional) _Filters the search to only include food items that are considered compatible with the following diets: Vegan, Vegetarian, Gluten Free_ __Example__: Gluten Free __Resources__: [List of diets](https://chompthis.com/api/data/lifestyle.php) + :param diet: #### Filter the search to only include branded foods that are considered compatible with a specific diet. **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type diet: str - :param ingredient: Specify a required ingredient (optional) __Example__: Salt __Resources__: [List of ingredients](https://chompthis.com/api/data/ingredient.php) + :param ingredient: #### Filter the search to only include branded foods that contain a specific ingredient. **Example** > ```&ingredient=Salt``` :type ingredient: str - :param keyword: Specify a required keyword (optional) __Example__: Starbucks __Resources__: [List of brands](https://chompthis.com/api/data/brand.php) + :param keyword: #### Filter the search to only include branded foods that are associated with a specific keyword. **Example** > ```&keyword=Organic``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type keyword: str - :param mineral: Specify a required mineral (optional) __Example__: Potassium __Resources__: [List of minerals](https://chompthis.com/api/data/mineral.php) + :param mineral: #### Filter the search to only include branded foods that contain a specific mineral. **Example** > ```&mineral=Potassium``` :type mineral: str - :param nutrient: Specify a required nutrition label item (optional) __Example__: Caffeine __Resources__: [List of nutrition label items](https://chompthis.com/api/data/nutrition.php) + :param nutrient: #### Filter the search to only include branded foods that contain a specific nutrient. **Example** > ```&nutrient=Caffeine``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type nutrient: str - :param palm_oil: Specify a required palm oil ingredient (optional) __Example__: E160a Beta Carotene __Resources__: [List of palm oil ingredients](https://chompthis.com/api/data/palm-oil.php) + :param palm_oil: #### Filter the search to only include branded foods that contain a specific ingredient made using palm oil. **Example** > ```&palm_oil=E160a Beta Carotene``` :type palm_oil: str - :param trace: Specify a required trace ingredient (optional) __Example__: Tree Nuts __Resources__: [List of trace ingredients](https://chompthis.com/api/data/trace.php) + :param trace: ### Filter the search to only include branded foods that contain a specific trace ingredient. **Example** > ```&trace=Tree Nuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. :type trace: str - :param vitamin: Specify a required vitamin (optional) __Example__: Biotin __Resources__: [List of vitamins](https://chompthis.com/api/data/vitamin.php) + :param vitamin: #### Filter the search to only include branded foods that contain a specific vitamin. **Example** > ```&vitamin=Biotin``` :type vitamin: str - :param limit: Set maximum number of records you want the API to return. ___Note:__ The maximum value is 10._ __Example:__ 3 _(defaults to 10)_ + :param limit: #### Set maximum number of records you want the API to return. The default value is \"**10**.\" **Example** > ```&limit=10``` :type limit: int - :param page: Specify the search response page number. _Each page will contain up to 10 items._ __Example__: 1 _(default)_ + :param page: #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` :type page: int :rtype: BrandedFoodObject @@ -88,18 +75,14 @@ def food_branded_search_php_get(allergen=None, brand=None, category=None, countr return 'do some magic!' -def ingredient_search_php_get(find, list, raw=None, limit=None): # noqa: E501 +def food_ingredient_search_php_get(find, limit=None): # noqa: E501 """Get raw/generic food ingredient item(s) - # Get data for a specific ingredient or a specific set of ingredients. __Example:__ ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=STRING/LIST&list=BOOLEAN&raw=BOOLEAN``` # noqa: E501 + ## Get data for a specific ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli``` **Example #2: Set of Ingredients** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli,mashed potatoes,chicken drumstick``` **Tips** * Expose ingredient endpoints by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. # noqa: E501 - :param find: Specify the ingredient name(s). __Example #1:__ broccoli __Example #2:__ broccoli,cauliflower,spinach ___Important Note:__ Set the \"is_list\" parameter to true before passing in a comma-separated list of ingredients._ - :type find: int - :param list: Specify if you are searching for multiple ingredients. _Setting this to true will configure this endpoint so that it accepts a comma-separated list of ingredients._ _By default, this endpoint expects a single ingredient._ __Example:__ true _(defaults to false)_ - :type list: bool - :param raw: Specify if you only want data for raw ingredients. __Example:__ true _(defaults to true)_ - :type raw: bool - :param limit: Set maximum number of records you want the API to return. ___Important Note:__ Setting this to \"1\" will return 1 record per search term._ __Example:__ 1 _(defaults to 1, max is 3)_ + :param find: Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,buttermilk waffle,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients. + :type find: str + :param limit: #### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` :type limit: int :rtype: IngredientObject diff --git a/swagger_server/models/__init__.py b/swagger_server/models/__init__.py index 868c956..abdbcd0 100644 --- a/swagger_server/models/__init__.py +++ b/swagger_server/models/__init__.py @@ -4,8 +4,6 @@ from __future__ import absolute_import # import models into model package from swagger_server.models.branded_food_object import BrandedFoodObject -from swagger_server.models.branded_food_object_calorie_conversion_factor import BrandedFoodObjectCalorieConversionFactor -from swagger_server.models.branded_food_object_components import BrandedFoodObjectComponents from swagger_server.models.branded_food_object_country_details import BrandedFoodObjectCountryDetails from swagger_server.models.branded_food_object_diet_flags import BrandedFoodObjectDietFlags from swagger_server.models.branded_food_object_diet_labels import BrandedFoodObjectDietLabels @@ -14,15 +12,15 @@ from swagger_server.models.branded_food_object_diet_labels_vegetarian import BrandedFoodObjectDietLabelsVegetarian from swagger_server.models.branded_food_object_items import BrandedFoodObjectItems from swagger_server.models.branded_food_object_nutrients import BrandedFoodObjectNutrients -from swagger_server.models.branded_food_object_nutrients_chomp import BrandedFoodObjectNutrientsChomp -from swagger_server.models.branded_food_object_nutrients_usda import BrandedFoodObjectNutrientsUsda from swagger_server.models.branded_food_object_package import BrandedFoodObjectPackage from swagger_server.models.branded_food_object_packaging_photos import BrandedFoodObjectPackagingPhotos from swagger_server.models.branded_food_object_packaging_photos_front import BrandedFoodObjectPackagingPhotosFront from swagger_server.models.branded_food_object_packaging_photos_ingredients import BrandedFoodObjectPackagingPhotosIngredients from swagger_server.models.branded_food_object_packaging_photos_nutrition import BrandedFoodObjectPackagingPhotosNutrition -from swagger_server.models.branded_food_object_portions import BrandedFoodObjectPortions from swagger_server.models.branded_food_object_serving import BrandedFoodObjectServing from swagger_server.models.ingredient_object import IngredientObject +from swagger_server.models.ingredient_object_calorie_conversion_factor import IngredientObjectCalorieConversionFactor +from swagger_server.models.ingredient_object_components import IngredientObjectComponents from swagger_server.models.ingredient_object_items import IngredientObjectItems from swagger_server.models.ingredient_object_nutrients import IngredientObjectNutrients +from swagger_server.models.ingredient_object_portions import IngredientObjectPortions diff --git a/swagger_server/models/branded_food_object_items.py b/swagger_server/models/branded_food_object_items.py index 64ca98a..f8c9302 100644 --- a/swagger_server/models/branded_food_object_items.py +++ b/swagger_server/models/branded_food_object_items.py @@ -6,15 +6,12 @@ from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model -from swagger_server.models.branded_food_object_calorie_conversion_factor import BrandedFoodObjectCalorieConversionFactor # noqa: F401,E501 -from swagger_server.models.branded_food_object_components import BrandedFoodObjectComponents # noqa: F401,E501 from swagger_server.models.branded_food_object_country_details import BrandedFoodObjectCountryDetails # noqa: F401,E501 from swagger_server.models.branded_food_object_diet_flags import BrandedFoodObjectDietFlags # noqa: F401,E501 from swagger_server.models.branded_food_object_diet_labels import BrandedFoodObjectDietLabels # noqa: F401,E501 from swagger_server.models.branded_food_object_nutrients import BrandedFoodObjectNutrients # noqa: F401,E501 from swagger_server.models.branded_food_object_package import BrandedFoodObjectPackage # noqa: F401,E501 from swagger_server.models.branded_food_object_packaging_photos import BrandedFoodObjectPackagingPhotos # noqa: F401,E501 -from swagger_server.models.branded_food_object_portions import BrandedFoodObjectPortions # noqa: F401,E501 from swagger_server.models.branded_food_object_serving import BrandedFoodObjectServing # noqa: F401,E501 from swagger_server import util @@ -24,7 +21,7 @@ class BrandedFoodObjectItems(Model): Do not edit the class manually. """ - def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredients: str=None, package: BrandedFoodObjectPackage=None, serving: BrandedFoodObjectServing=None, categories: List[str]=None, nutrients: BrandedFoodObjectNutrients=None, calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor=None, protein_conversion_factor: float=None, diet_labels: BrandedFoodObjectDietLabels=None, diet_flags: List[BrandedFoodObjectDietFlags]=None, packaging_photos: BrandedFoodObjectPackagingPhotos=None, components: List[BrandedFoodObjectComponents]=None, portions: List[BrandedFoodObjectPortions]=None, allergens: List[str]=None, brand_list: List[str]=None, countries: List[str]=None, country_details: BrandedFoodObjectCountryDetails=None, palm_oil_ingredients: List[str]=None, ingredient_list: List[str]=None, has_english_ingredients: bool=None, minerals: List[str]=None, traces: List[str]=None, common_name: str=None, description: str=None, keywords: List[str]=None, footnote: str=None): # noqa: E501 + def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredients: str=None, package: BrandedFoodObjectPackage=None, serving: BrandedFoodObjectServing=None, categories: List[str]=None, nutrients: List[BrandedFoodObjectNutrients]=None, diet_labels: BrandedFoodObjectDietLabels=None, diet_flags: List[BrandedFoodObjectDietFlags]=None, packaging_photos: BrandedFoodObjectPackagingPhotos=None, allergens: List[str]=None, brand_list: List[str]=None, countries: List[str]=None, country_details: BrandedFoodObjectCountryDetails=None, palm_oil_ingredients: List[str]=None, ingredient_list: List[str]=None, has_english_ingredients: bool=None, minerals: List[str]=None, traces: List[str]=None, vitamins: List[str]=None, description: str=None, keywords: List[str]=None): # noqa: E501 """BrandedFoodObjectItems - a model defined in Swagger :param barcode: The barcode of this BrandedFoodObjectItems. # noqa: E501 @@ -42,21 +39,13 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien :param categories: The categories of this BrandedFoodObjectItems. # noqa: E501 :type categories: List[str] :param nutrients: The nutrients of this BrandedFoodObjectItems. # noqa: E501 - :type nutrients: BrandedFoodObjectNutrients - :param calorie_conversion_factor: The calorie_conversion_factor of this BrandedFoodObjectItems. # noqa: E501 - :type calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor - :param protein_conversion_factor: The protein_conversion_factor of this BrandedFoodObjectItems. # noqa: E501 - :type protein_conversion_factor: float + :type nutrients: List[BrandedFoodObjectNutrients] :param diet_labels: The diet_labels of this BrandedFoodObjectItems. # noqa: E501 :type diet_labels: BrandedFoodObjectDietLabels :param diet_flags: The diet_flags of this BrandedFoodObjectItems. # noqa: E501 :type diet_flags: List[BrandedFoodObjectDietFlags] :param packaging_photos: The packaging_photos of this BrandedFoodObjectItems. # noqa: E501 :type packaging_photos: BrandedFoodObjectPackagingPhotos - :param components: The components of this BrandedFoodObjectItems. # noqa: E501 - :type components: List[BrandedFoodObjectComponents] - :param portions: The portions of this BrandedFoodObjectItems. # noqa: E501 - :type portions: List[BrandedFoodObjectPortions] :param allergens: The allergens of this BrandedFoodObjectItems. # noqa: E501 :type allergens: List[str] :param brand_list: The brand_list of this BrandedFoodObjectItems. # noqa: E501 @@ -75,14 +64,12 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien :type minerals: List[str] :param traces: The traces of this BrandedFoodObjectItems. # noqa: E501 :type traces: List[str] - :param common_name: The common_name of this BrandedFoodObjectItems. # noqa: E501 - :type common_name: str + :param vitamins: The vitamins of this BrandedFoodObjectItems. # noqa: E501 + :type vitamins: List[str] :param description: The description of this BrandedFoodObjectItems. # noqa: E501 :type description: str :param keywords: The keywords of this BrandedFoodObjectItems. # noqa: E501 :type keywords: List[str] - :param footnote: The footnote of this BrandedFoodObjectItems. # noqa: E501 - :type footnote: str """ self.swagger_types = { 'barcode': str, @@ -92,14 +79,10 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien 'package': BrandedFoodObjectPackage, 'serving': BrandedFoodObjectServing, 'categories': List[str], - 'nutrients': BrandedFoodObjectNutrients, - 'calorie_conversion_factor': BrandedFoodObjectCalorieConversionFactor, - 'protein_conversion_factor': float, + 'nutrients': List[BrandedFoodObjectNutrients], 'diet_labels': BrandedFoodObjectDietLabels, 'diet_flags': List[BrandedFoodObjectDietFlags], 'packaging_photos': BrandedFoodObjectPackagingPhotos, - 'components': List[BrandedFoodObjectComponents], - 'portions': List[BrandedFoodObjectPortions], 'allergens': List[str], 'brand_list': List[str], 'countries': List[str], @@ -109,10 +92,9 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien 'has_english_ingredients': bool, 'minerals': List[str], 'traces': List[str], - 'common_name': str, + 'vitamins': List[str], 'description': str, - 'keywords': List[str], - 'footnote': str + 'keywords': List[str] } self.attribute_map = { @@ -124,13 +106,9 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien 'serving': 'serving', 'categories': 'categories', 'nutrients': 'nutrients', - 'calorie_conversion_factor': 'calorie_conversion_factor', - 'protein_conversion_factor': 'protein_conversion_factor', 'diet_labels': 'diet_labels', 'diet_flags': 'diet_flags', 'packaging_photos': 'packaging_photos', - 'components': 'components', - 'portions': 'portions', 'allergens': 'allergens', 'brand_list': 'brand_list', 'countries': 'countries', @@ -140,10 +118,9 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien 'has_english_ingredients': 'has_english_ingredients', 'minerals': 'minerals', 'traces': 'traces', - 'common_name': 'common_name', + 'vitamins': 'vitamins', 'description': 'description', - 'keywords': 'keywords', - 'footnote': 'footnote' + 'keywords': 'keywords' } self._barcode = barcode self._name = name @@ -153,13 +130,9 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien self._serving = serving self._categories = categories self._nutrients = nutrients - self._calorie_conversion_factor = calorie_conversion_factor - self._protein_conversion_factor = protein_conversion_factor self._diet_labels = diet_labels self._diet_flags = diet_flags self._packaging_photos = packaging_photos - self._components = components - self._portions = portions self._allergens = allergens self._brand_list = brand_list self._countries = countries @@ -169,10 +142,9 @@ def __init__(self, barcode: str=None, name: str=None, brand: str=None, ingredien self._has_english_ingredients = has_english_ingredients self._minerals = minerals self._traces = traces - self._common_name = common_name + self._vitamins = vitamins self._description = description self._keywords = keywords - self._footnote = footnote @classmethod def from_dict(cls, dikt) -> 'BrandedFoodObjectItems': @@ -258,7 +230,7 @@ def brand(self, brand: str): def ingredients(self) -> str: """Gets the ingredients of this BrandedFoodObjectItems. - Ingredients in order of highest value to least # noqa: E501 + This food item's ingredients from greatest quantity to least # noqa: E501 :return: The ingredients of this BrandedFoodObjectItems. :rtype: str @@ -269,7 +241,7 @@ def ingredients(self) -> str: def ingredients(self, ingredients: str): """Sets the ingredients of this BrandedFoodObjectItems. - Ingredients in order of highest value to least # noqa: E501 + This food item's ingredients from greatest quantity to least # noqa: E501 :param ingredients: The ingredients of this BrandedFoodObjectItems. :type ingredients: str @@ -341,70 +313,28 @@ def categories(self, categories: List[str]): self._categories = categories @property - def nutrients(self) -> BrandedFoodObjectNutrients: + def nutrients(self) -> List[BrandedFoodObjectNutrients]: """Gets the nutrients of this BrandedFoodObjectItems. + An array containing nutrient informatio objects for this food item # noqa: E501 :return: The nutrients of this BrandedFoodObjectItems. - :rtype: BrandedFoodObjectNutrients + :rtype: List[BrandedFoodObjectNutrients] """ return self._nutrients @nutrients.setter - def nutrients(self, nutrients: BrandedFoodObjectNutrients): + def nutrients(self, nutrients: List[BrandedFoodObjectNutrients]): """Sets the nutrients of this BrandedFoodObjectItems. + An array containing nutrient informatio objects for this food item # noqa: E501 :param nutrients: The nutrients of this BrandedFoodObjectItems. - :type nutrients: BrandedFoodObjectNutrients + :type nutrients: List[BrandedFoodObjectNutrients] """ self._nutrients = nutrients - @property - def calorie_conversion_factor(self) -> BrandedFoodObjectCalorieConversionFactor: - """Gets the calorie_conversion_factor of this BrandedFoodObjectItems. - - - :return: The calorie_conversion_factor of this BrandedFoodObjectItems. - :rtype: BrandedFoodObjectCalorieConversionFactor - """ - return self._calorie_conversion_factor - - @calorie_conversion_factor.setter - def calorie_conversion_factor(self, calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor): - """Sets the calorie_conversion_factor of this BrandedFoodObjectItems. - - - :param calorie_conversion_factor: The calorie_conversion_factor of this BrandedFoodObjectItems. - :type calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor - """ - - self._calorie_conversion_factor = calorie_conversion_factor - - @property - def protein_conversion_factor(self) -> float: - """Gets the protein_conversion_factor of this BrandedFoodObjectItems. - - The multiplication factor used to calculate protein from nitrogen # noqa: E501 - - :return: The protein_conversion_factor of this BrandedFoodObjectItems. - :rtype: float - """ - return self._protein_conversion_factor - - @protein_conversion_factor.setter - def protein_conversion_factor(self, protein_conversion_factor: float): - """Sets the protein_conversion_factor of this BrandedFoodObjectItems. - - The multiplication factor used to calculate protein from nitrogen # noqa: E501 - - :param protein_conversion_factor: The protein_conversion_factor of this BrandedFoodObjectItems. - :type protein_conversion_factor: float - """ - - self._protein_conversion_factor = protein_conversion_factor - @property def diet_labels(self) -> BrandedFoodObjectDietLabels: """Gets the diet_labels of this BrandedFoodObjectItems. @@ -470,52 +400,6 @@ def packaging_photos(self, packaging_photos: BrandedFoodObjectPackagingPhotos): self._packaging_photos = packaging_photos - @property - def components(self) -> List[BrandedFoodObjectComponents]: - """Gets the components of this BrandedFoodObjectItems. - - An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) # noqa: E501 - - :return: The components of this BrandedFoodObjectItems. - :rtype: List[BrandedFoodObjectComponents] - """ - return self._components - - @components.setter - def components(self, components: List[BrandedFoodObjectComponents]): - """Sets the components of this BrandedFoodObjectItems. - - An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) # noqa: E501 - - :param components: The components of this BrandedFoodObjectItems. - :type components: List[BrandedFoodObjectComponents] - """ - - self._components = components - - @property - def portions(self) -> List[BrandedFoodObjectPortions]: - """Gets the portions of this BrandedFoodObjectItems. - - An array of objects containing information on discrete amounts of a food found in this item # noqa: E501 - - :return: The portions of this BrandedFoodObjectItems. - :rtype: List[BrandedFoodObjectPortions] - """ - return self._portions - - @portions.setter - def portions(self, portions: List[BrandedFoodObjectPortions]): - """Sets the portions of this BrandedFoodObjectItems. - - An array of objects containing information on discrete amounts of a food found in this item # noqa: E501 - - :param portions: The portions of this BrandedFoodObjectItems. - :type portions: List[BrandedFoodObjectPortions] - """ - - self._portions = portions - @property def allergens(self) -> List[str]: """Gets the allergens of this BrandedFoodObjectItems. @@ -722,27 +606,27 @@ def traces(self, traces: List[str]): self._traces = traces @property - def common_name(self) -> str: - """Gets the common_name of this BrandedFoodObjectItems. + def vitamins(self) -> List[str]: + """Gets the vitamins of this BrandedFoodObjectItems. - Common names associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 + An array of vitamins that are found in this item # noqa: E501 - :return: The common_name of this BrandedFoodObjectItems. - :rtype: str + :return: The vitamins of this BrandedFoodObjectItems. + :rtype: List[str] """ - return self._common_name + return self._vitamins - @common_name.setter - def common_name(self, common_name: str): - """Sets the common_name of this BrandedFoodObjectItems. + @vitamins.setter + def vitamins(self, vitamins: List[str]): + """Sets the vitamins of this BrandedFoodObjectItems. - Common names associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 + An array of vitamins that are found in this item # noqa: E501 - :param common_name: The common_name of this BrandedFoodObjectItems. - :type common_name: str + :param vitamins: The vitamins of this BrandedFoodObjectItems. + :type vitamins: List[str] """ - self._common_name = common_name + self._vitamins = vitamins @property def description(self) -> str: @@ -789,26 +673,3 @@ def keywords(self, keywords: List[str]): """ self._keywords = keywords - - @property - def footnote(self) -> str: - """Gets the footnote of this BrandedFoodObjectItems. - - Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall. # noqa: E501 - - :return: The footnote of this BrandedFoodObjectItems. - :rtype: str - """ - return self._footnote - - @footnote.setter - def footnote(self, footnote: str): - """Sets the footnote of this BrandedFoodObjectItems. - - Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall. # noqa: E501 - - :param footnote: The footnote of this BrandedFoodObjectItems. - :type footnote: str - """ - - self._footnote = footnote diff --git a/swagger_server/models/branded_food_object_nutrients.py b/swagger_server/models/branded_food_object_nutrients.py index ef08507..156056c 100644 --- a/swagger_server/models/branded_food_object_nutrients.py +++ b/swagger_server/models/branded_food_object_nutrients.py @@ -6,8 +6,6 @@ from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model -from swagger_server.models.branded_food_object_nutrients_chomp import BrandedFoodObjectNutrientsChomp # noqa: F401,E501 -from swagger_server.models.branded_food_object_nutrients_usda import BrandedFoodObjectNutrientsUsda # noqa: F401,E501 from swagger_server import util @@ -16,25 +14,45 @@ class BrandedFoodObjectNutrients(Model): Do not edit the class manually. """ - def __init__(self, chomp: List[BrandedFoodObjectNutrientsChomp]=None, usda: List[BrandedFoodObjectNutrientsUsda]=None): # noqa: E501 + def __init__(self, name: str=None, per_100g: float=None, measurement_unit: str=None, rank: int=None, data_points: int=None, description: str=None): # noqa: E501 """BrandedFoodObjectNutrients - a model defined in Swagger - :param chomp: The chomp of this BrandedFoodObjectNutrients. # noqa: E501 - :type chomp: List[BrandedFoodObjectNutrientsChomp] - :param usda: The usda of this BrandedFoodObjectNutrients. # noqa: E501 - :type usda: List[BrandedFoodObjectNutrientsUsda] + :param name: The name of this BrandedFoodObjectNutrients. # noqa: E501 + :type name: str + :param per_100g: The per_100g of this BrandedFoodObjectNutrients. # noqa: E501 + :type per_100g: float + :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrients. # noqa: E501 + :type measurement_unit: str + :param rank: The rank of this BrandedFoodObjectNutrients. # noqa: E501 + :type rank: int + :param data_points: The data_points of this BrandedFoodObjectNutrients. # noqa: E501 + :type data_points: int + :param description: The description of this BrandedFoodObjectNutrients. # noqa: E501 + :type description: str """ self.swagger_types = { - 'chomp': List[BrandedFoodObjectNutrientsChomp], - 'usda': List[BrandedFoodObjectNutrientsUsda] + 'name': str, + 'per_100g': float, + 'measurement_unit': str, + 'rank': int, + 'data_points': int, + 'description': str } self.attribute_map = { - 'chomp': 'chomp', - 'usda': 'usda' + 'name': 'name', + 'per_100g': 'per_100g', + 'measurement_unit': 'measurement_unit', + 'rank': 'rank', + 'data_points': 'data_points', + 'description': 'description' } - self._chomp = chomp - self._usda = usda + self._name = name + self._per_100g = per_100g + self._measurement_unit = measurement_unit + self._rank = rank + self._data_points = data_points + self._description = description @classmethod def from_dict(cls, dikt) -> 'BrandedFoodObjectNutrients': @@ -48,47 +66,139 @@ def from_dict(cls, dikt) -> 'BrandedFoodObjectNutrients': return util.deserialize_model(dikt, cls) @property - def chomp(self) -> List[BrandedFoodObjectNutrientsChomp]: - """Gets the chomp of this BrandedFoodObjectNutrients. + def name(self) -> str: + """Gets the name of this BrandedFoodObjectNutrients. - An array containing an object for each nutrient data point # noqa: E501 + Nutrient name # noqa: E501 - :return: The chomp of this BrandedFoodObjectNutrients. - :rtype: List[BrandedFoodObjectNutrientsChomp] + :return: The name of this BrandedFoodObjectNutrients. + :rtype: str """ - return self._chomp + return self._name - @chomp.setter - def chomp(self, chomp: List[BrandedFoodObjectNutrientsChomp]): - """Sets the chomp of this BrandedFoodObjectNutrients. + @name.setter + def name(self, name: str): + """Sets the name of this BrandedFoodObjectNutrients. - An array containing an object for each nutrient data point # noqa: E501 + Nutrient name # noqa: E501 - :param chomp: The chomp of this BrandedFoodObjectNutrients. - :type chomp: List[BrandedFoodObjectNutrientsChomp] + :param name: The name of this BrandedFoodObjectNutrients. + :type name: str """ - self._chomp = chomp + self._name = name @property - def usda(self) -> List[BrandedFoodObjectNutrientsUsda]: - """Gets the usda of this BrandedFoodObjectNutrients. + def per_100g(self) -> float: + """Gets the per_100g of this BrandedFoodObjectNutrients. - An array containing an object for each nutrient data point as found in the USDA database # noqa: E501 + Amount of the nutrient per 100g of food # noqa: E501 - :return: The usda of this BrandedFoodObjectNutrients. - :rtype: List[BrandedFoodObjectNutrientsUsda] + :return: The per_100g of this BrandedFoodObjectNutrients. + :rtype: float """ - return self._usda + return self._per_100g - @usda.setter - def usda(self, usda: List[BrandedFoodObjectNutrientsUsda]): - """Sets the usda of this BrandedFoodObjectNutrients. + @per_100g.setter + def per_100g(self, per_100g: float): + """Sets the per_100g of this BrandedFoodObjectNutrients. - An array containing an object for each nutrient data point as found in the USDA database # noqa: E501 + Amount of the nutrient per 100g of food # noqa: E501 - :param usda: The usda of this BrandedFoodObjectNutrients. - :type usda: List[BrandedFoodObjectNutrientsUsda] + :param per_100g: The per_100g of this BrandedFoodObjectNutrients. + :type per_100g: float """ - self._usda = usda + self._per_100g = per_100g + + @property + def measurement_unit(self) -> str: + """Gets the measurement_unit of this BrandedFoodObjectNutrients. + + The unit used for the measure of this nutrient # noqa: E501 + + :return: The measurement_unit of this BrandedFoodObjectNutrients. + :rtype: str + """ + return self._measurement_unit + + @measurement_unit.setter + def measurement_unit(self, measurement_unit: str): + """Sets the measurement_unit of this BrandedFoodObjectNutrients. + + The unit used for the measure of this nutrient # noqa: E501 + + :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrients. + :type measurement_unit: str + """ + + self._measurement_unit = measurement_unit + + @property + def rank(self) -> int: + """Gets the rank of this BrandedFoodObjectNutrients. + + Nutrient rank # noqa: E501 + + :return: The rank of this BrandedFoodObjectNutrients. + :rtype: int + """ + return self._rank + + @rank.setter + def rank(self, rank: int): + """Sets the rank of this BrandedFoodObjectNutrients. + + Nutrient rank # noqa: E501 + + :param rank: The rank of this BrandedFoodObjectNutrients. + :type rank: int + """ + + self._rank = rank + + @property + def data_points(self) -> int: + """Gets the data_points of this BrandedFoodObjectNutrients. + + Number of observations on which the value is based # noqa: E501 + + :return: The data_points of this BrandedFoodObjectNutrients. + :rtype: int + """ + return self._data_points + + @data_points.setter + def data_points(self, data_points: int): + """Sets the data_points of this BrandedFoodObjectNutrients. + + Number of observations on which the value is based # noqa: E501 + + :param data_points: The data_points of this BrandedFoodObjectNutrients. + :type data_points: int + """ + + self._data_points = data_points + + @property + def description(self) -> str: + """Gets the description of this BrandedFoodObjectNutrients. + + Description of the nutrient source # noqa: E501 + + :return: The description of this BrandedFoodObjectNutrients. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this BrandedFoodObjectNutrients. + + Description of the nutrient source # noqa: E501 + + :param description: The description of this BrandedFoodObjectNutrients. + :type description: str + """ + + self._description = description diff --git a/swagger_server/models/branded_food_object_nutrients_chomp.py b/swagger_server/models/branded_food_object_nutrients_chomp.py deleted file mode 100644 index ba4eb9d..0000000 --- a/swagger_server/models/branded_food_object_nutrients_chomp.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from swagger_server.models.base_model_ import Model -from swagger_server import util - - -class BrandedFoodObjectNutrientsChomp(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - def __init__(self, name: str=None, measurement_unit: str=None, per_100g: float=None, per_serving: float=None, total: float=None): # noqa: E501 - """BrandedFoodObjectNutrientsChomp - a model defined in Swagger - - :param name: The name of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :type name: str - :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :type measurement_unit: str - :param per_100g: The per_100g of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :type per_100g: float - :param per_serving: The per_serving of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :type per_serving: float - :param total: The total of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :type total: float - """ - self.swagger_types = { - 'name': str, - 'measurement_unit': str, - 'per_100g': float, - 'per_serving': float, - 'total': float - } - - self.attribute_map = { - 'name': 'name', - 'measurement_unit': 'measurement_unit', - 'per_100g': 'per_100g', - 'per_serving': 'per_serving', - 'total': 'total' - } - self._name = name - self._measurement_unit = measurement_unit - self._per_100g = per_100g - self._per_serving = per_serving - self._total = total - - @classmethod - def from_dict(cls, dikt) -> 'BrandedFoodObjectNutrientsChomp': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The BrandedFoodObject_nutrients_chomp of this BrandedFoodObjectNutrientsChomp. # noqa: E501 - :rtype: BrandedFoodObjectNutrientsChomp - """ - return util.deserialize_model(dikt, cls) - - @property - def name(self) -> str: - """Gets the name of this BrandedFoodObjectNutrientsChomp. - - Nutrient name # noqa: E501 - - :return: The name of this BrandedFoodObjectNutrientsChomp. - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: str): - """Sets the name of this BrandedFoodObjectNutrientsChomp. - - Nutrient name # noqa: E501 - - :param name: The name of this BrandedFoodObjectNutrientsChomp. - :type name: str - """ - - self._name = name - - @property - def measurement_unit(self) -> str: - """Gets the measurement_unit of this BrandedFoodObjectNutrientsChomp. - - The unit used for measure (e.g. if mesure is 3 tsp, the unit is tsp) # noqa: E501 - - :return: The measurement_unit of this BrandedFoodObjectNutrientsChomp. - :rtype: str - """ - return self._measurement_unit - - @measurement_unit.setter - def measurement_unit(self, measurement_unit: str): - """Sets the measurement_unit of this BrandedFoodObjectNutrientsChomp. - - The unit used for measure (e.g. if mesure is 3 tsp, the unit is tsp) # noqa: E501 - - :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrientsChomp. - :type measurement_unit: str - """ - - self._measurement_unit = measurement_unit - - @property - def per_100g(self) -> float: - """Gets the per_100g of this BrandedFoodObjectNutrientsChomp. - - Amount of the nutrient per 100g of food # noqa: E501 - - :return: The per_100g of this BrandedFoodObjectNutrientsChomp. - :rtype: float - """ - return self._per_100g - - @per_100g.setter - def per_100g(self, per_100g: float): - """Sets the per_100g of this BrandedFoodObjectNutrientsChomp. - - Amount of the nutrient per 100g of food # noqa: E501 - - :param per_100g: The per_100g of this BrandedFoodObjectNutrientsChomp. - :type per_100g: float - """ - - self._per_100g = per_100g - - @property - def per_serving(self) -> float: - """Gets the per_serving of this BrandedFoodObjectNutrientsChomp. - - Nutrient value per serving # noqa: E501 - - :return: The per_serving of this BrandedFoodObjectNutrientsChomp. - :rtype: float - """ - return self._per_serving - - @per_serving.setter - def per_serving(self, per_serving: float): - """Sets the per_serving of this BrandedFoodObjectNutrientsChomp. - - Nutrient value per serving # noqa: E501 - - :param per_serving: The per_serving of this BrandedFoodObjectNutrientsChomp. - :type per_serving: float - """ - - self._per_serving = per_serving - - @property - def total(self) -> float: - """Gets the total of this BrandedFoodObjectNutrientsChomp. - - Total nutrient value # noqa: E501 - - :return: The total of this BrandedFoodObjectNutrientsChomp. - :rtype: float - """ - return self._total - - @total.setter - def total(self, total: float): - """Sets the total of this BrandedFoodObjectNutrientsChomp. - - Total nutrient value # noqa: E501 - - :param total: The total of this BrandedFoodObjectNutrientsChomp. - :type total: float - """ - - self._total = total diff --git a/swagger_server/models/branded_food_object_nutrients_usda.py b/swagger_server/models/branded_food_object_nutrients_usda.py deleted file mode 100644 index 18d771c..0000000 --- a/swagger_server/models/branded_food_object_nutrients_usda.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -from __future__ import absolute_import -from datetime import date, datetime # noqa: F401 - -from typing import List, Dict # noqa: F401 - -from swagger_server.models.base_model_ import Model -from swagger_server import util - - -class BrandedFoodObjectNutrientsUsda(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - def __init__(self, id: int=None, name: str=None, per_100g: float=None, measurement_unit: str=None, min: float=None, max: float=None, median: float=None, data_points: int=None, footnote: str=None, source: str=None, description: str=None): # noqa: E501 - """BrandedFoodObjectNutrientsUsda - a model defined in Swagger - - :param id: The id of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type id: int - :param name: The name of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type name: str - :param per_100g: The per_100g of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type per_100g: float - :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type measurement_unit: str - :param min: The min of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type min: float - :param max: The max of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type max: float - :param median: The median of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type median: float - :param data_points: The data_points of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type data_points: int - :param footnote: The footnote of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type footnote: str - :param source: The source of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type source: str - :param description: The description of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :type description: str - """ - self.swagger_types = { - 'id': int, - 'name': str, - 'per_100g': float, - 'measurement_unit': str, - 'min': float, - 'max': float, - 'median': float, - 'data_points': int, - 'footnote': str, - 'source': str, - 'description': str - } - - self.attribute_map = { - 'id': 'id', - 'name': 'name', - 'per_100g': 'per_100g', - 'measurement_unit': 'measurement_unit', - 'min': 'min', - 'max': 'max', - 'median': 'median', - 'data_points': 'data_points', - 'footnote': 'footnote', - 'source': 'source', - 'description': 'description' - } - self._id = id - self._name = name - self._per_100g = per_100g - self._measurement_unit = measurement_unit - self._min = min - self._max = max - self._median = median - self._data_points = data_points - self._footnote = footnote - self._source = source - self._description = description - - @classmethod - def from_dict(cls, dikt) -> 'BrandedFoodObjectNutrientsUsda': - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The BrandedFoodObject_nutrients_usda of this BrandedFoodObjectNutrientsUsda. # noqa: E501 - :rtype: BrandedFoodObjectNutrientsUsda - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this BrandedFoodObjectNutrientsUsda. - - Nutrient ID # noqa: E501 - - :return: The id of this BrandedFoodObjectNutrientsUsda. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this BrandedFoodObjectNutrientsUsda. - - Nutrient ID # noqa: E501 - - :param id: The id of this BrandedFoodObjectNutrientsUsda. - :type id: int - """ - - self._id = id - - @property - def name(self) -> str: - """Gets the name of this BrandedFoodObjectNutrientsUsda. - - Nutrient name # noqa: E501 - - :return: The name of this BrandedFoodObjectNutrientsUsda. - :rtype: str - """ - return self._name - - @name.setter - def name(self, name: str): - """Sets the name of this BrandedFoodObjectNutrientsUsda. - - Nutrient name # noqa: E501 - - :param name: The name of this BrandedFoodObjectNutrientsUsda. - :type name: str - """ - - self._name = name - - @property - def per_100g(self) -> float: - """Gets the per_100g of this BrandedFoodObjectNutrientsUsda. - - Amount of the nutrient per 100g of food # noqa: E501 - - :return: The per_100g of this BrandedFoodObjectNutrientsUsda. - :rtype: float - """ - return self._per_100g - - @per_100g.setter - def per_100g(self, per_100g: float): - """Sets the per_100g of this BrandedFoodObjectNutrientsUsda. - - Amount of the nutrient per 100g of food # noqa: E501 - - :param per_100g: The per_100g of this BrandedFoodObjectNutrientsUsda. - :type per_100g: float - """ - - self._per_100g = per_100g - - @property - def measurement_unit(self) -> str: - """Gets the measurement_unit of this BrandedFoodObjectNutrientsUsda. - - The unit used for the measure of this nutrient # noqa: E501 - - :return: The measurement_unit of this BrandedFoodObjectNutrientsUsda. - :rtype: str - """ - return self._measurement_unit - - @measurement_unit.setter - def measurement_unit(self, measurement_unit: str): - """Sets the measurement_unit of this BrandedFoodObjectNutrientsUsda. - - The unit used for the measure of this nutrient # noqa: E501 - - :param measurement_unit: The measurement_unit of this BrandedFoodObjectNutrientsUsda. - :type measurement_unit: str - """ - - self._measurement_unit = measurement_unit - - @property - def min(self) -> float: - """Gets the min of this BrandedFoodObjectNutrientsUsda. - - Minimum nutrient value # noqa: E501 - - :return: The min of this BrandedFoodObjectNutrientsUsda. - :rtype: float - """ - return self._min - - @min.setter - def min(self, min: float): - """Sets the min of this BrandedFoodObjectNutrientsUsda. - - Minimum nutrient value # noqa: E501 - - :param min: The min of this BrandedFoodObjectNutrientsUsda. - :type min: float - """ - - self._min = min - - @property - def max(self) -> float: - """Gets the max of this BrandedFoodObjectNutrientsUsda. - - Maximum nutrient value # noqa: E501 - - :return: The max of this BrandedFoodObjectNutrientsUsda. - :rtype: float - """ - return self._max - - @max.setter - def max(self, max: float): - """Sets the max of this BrandedFoodObjectNutrientsUsda. - - Maximum nutrient value # noqa: E501 - - :param max: The max of this BrandedFoodObjectNutrientsUsda. - :type max: float - """ - - self._max = max - - @property - def median(self) -> float: - """Gets the median of this BrandedFoodObjectNutrientsUsda. - - Median nutrient value # noqa: E501 - - :return: The median of this BrandedFoodObjectNutrientsUsda. - :rtype: float - """ - return self._median - - @median.setter - def median(self, median: float): - """Sets the median of this BrandedFoodObjectNutrientsUsda. - - Median nutrient value # noqa: E501 - - :param median: The median of this BrandedFoodObjectNutrientsUsda. - :type median: float - """ - - self._median = median - - @property - def data_points(self) -> int: - """Gets the data_points of this BrandedFoodObjectNutrientsUsda. - - Number of observations on which the value is based # noqa: E501 - - :return: The data_points of this BrandedFoodObjectNutrientsUsda. - :rtype: int - """ - return self._data_points - - @data_points.setter - def data_points(self, data_points: int): - """Sets the data_points of this BrandedFoodObjectNutrientsUsda. - - Number of observations on which the value is based # noqa: E501 - - :param data_points: The data_points of this BrandedFoodObjectNutrientsUsda. - :type data_points: int - """ - - self._data_points = data_points - - @property - def footnote(self) -> str: - """Gets the footnote of this BrandedFoodObjectNutrientsUsda. - - Comments on any unusual aspect of the food nutrient. Examples might include why a nutrient value is different than typically expected. # noqa: E501 - - :return: The footnote of this BrandedFoodObjectNutrientsUsda. - :rtype: str - """ - return self._footnote - - @footnote.setter - def footnote(self, footnote: str): - """Sets the footnote of this BrandedFoodObjectNutrientsUsda. - - Comments on any unusual aspect of the food nutrient. Examples might include why a nutrient value is different than typically expected. # noqa: E501 - - :param footnote: The footnote of this BrandedFoodObjectNutrientsUsda. - :type footnote: str - """ - - self._footnote = footnote - - @property - def source(self) -> str: - """Gets the source of this BrandedFoodObjectNutrientsUsda. - - Description of the nutrient source # noqa: E501 - - :return: The source of this BrandedFoodObjectNutrientsUsda. - :rtype: str - """ - return self._source - - @source.setter - def source(self, source: str): - """Sets the source of this BrandedFoodObjectNutrientsUsda. - - Description of the nutrient source # noqa: E501 - - :param source: The source of this BrandedFoodObjectNutrientsUsda. - :type source: str - """ - - self._source = source - - @property - def description(self) -> str: - """Gets the description of this BrandedFoodObjectNutrientsUsda. - - Description of how the food nutrient value was obtained # noqa: E501 - - :return: The description of this BrandedFoodObjectNutrientsUsda. - :rtype: str - """ - return self._description - - @description.setter - def description(self, description: str): - """Sets the description of this BrandedFoodObjectNutrientsUsda. - - Description of how the food nutrient value was obtained # noqa: E501 - - :param description: The description of this BrandedFoodObjectNutrientsUsda. - :type description: str - """ - - self._description = description diff --git a/swagger_server/models/branded_food_object_package.py b/swagger_server/models/branded_food_object_package.py index dfdcfbc..ea46af6 100644 --- a/swagger_server/models/branded_food_object_package.py +++ b/swagger_server/models/branded_food_object_package.py @@ -14,17 +14,17 @@ class BrandedFoodObjectPackage(Model): Do not edit the class manually. """ - def __init__(self, quantity: int=None, size: int=None): # noqa: E501 + def __init__(self, quantity: int=None, size: str=None): # noqa: E501 """BrandedFoodObjectPackage - a model defined in Swagger :param quantity: The quantity of this BrandedFoodObjectPackage. # noqa: E501 :type quantity: int :param size: The size of this BrandedFoodObjectPackage. # noqa: E501 - :type size: int + :type size: str """ self.swagger_types = { 'quantity': int, - 'size': int + 'size': str } self.attribute_map = { @@ -69,24 +69,24 @@ def quantity(self, quantity: int): self._quantity = quantity @property - def size(self) -> int: + def size(self) -> str: """Gets the size of this BrandedFoodObjectPackage. Package size # noqa: E501 :return: The size of this BrandedFoodObjectPackage. - :rtype: int + :rtype: str """ return self._size @size.setter - def size(self, size: int): + def size(self, size: str): """Sets the size of this BrandedFoodObjectPackage. Package size # noqa: E501 :param size: The size of this BrandedFoodObjectPackage. - :type size: int + :type size: str """ self._size = size diff --git a/swagger_server/models/branded_food_object_serving.py b/swagger_server/models/branded_food_object_serving.py index fb39fd1..c5ac4aa 100644 --- a/swagger_server/models/branded_food_object_serving.py +++ b/swagger_server/models/branded_food_object_serving.py @@ -14,35 +14,30 @@ class BrandedFoodObjectServing(Model): Do not edit the class manually. """ - def __init__(self, size: int=None, measurement_unit: str=None, size_fulltext: str=None, total: int=None): # noqa: E501 + def __init__(self, size: str=None, measurement_unit: str=None, size_fulltext: str=None): # noqa: E501 """BrandedFoodObjectServing - a model defined in Swagger :param size: The size of this BrandedFoodObjectServing. # noqa: E501 - :type size: int + :type size: str :param measurement_unit: The measurement_unit of this BrandedFoodObjectServing. # noqa: E501 :type measurement_unit: str :param size_fulltext: The size_fulltext of this BrandedFoodObjectServing. # noqa: E501 :type size_fulltext: str - :param total: The total of this BrandedFoodObjectServing. # noqa: E501 - :type total: int """ self.swagger_types = { - 'size': int, + 'size': str, 'measurement_unit': str, - 'size_fulltext': str, - 'total': int + 'size_fulltext': str } self.attribute_map = { 'size': 'size', 'measurement_unit': 'measurement_unit', - 'size_fulltext': 'size_fulltext', - 'total': 'total' + 'size_fulltext': 'size_fulltext' } self._size = size self._measurement_unit = measurement_unit self._size_fulltext = size_fulltext - self._total = total @classmethod def from_dict(cls, dikt) -> 'BrandedFoodObjectServing': @@ -56,24 +51,24 @@ def from_dict(cls, dikt) -> 'BrandedFoodObjectServing': return util.deserialize_model(dikt, cls) @property - def size(self) -> int: + def size(self) -> str: """Gets the size of this BrandedFoodObjectServing. Serving size # noqa: E501 :return: The size of this BrandedFoodObjectServing. - :rtype: int + :rtype: str """ return self._size @size.setter - def size(self, size: int): + def size(self, size: str): """Sets the size of this BrandedFoodObjectServing. Serving size # noqa: E501 :param size: The size of this BrandedFoodObjectServing. - :type size: int + :type size: str """ self._size = size @@ -82,7 +77,7 @@ def size(self, size: int): def measurement_unit(self) -> str: """Gets the measurement_unit of this BrandedFoodObjectServing. - Serving measurement unit (e.g. if measure is 3 tsp, the unit is tsp) # noqa: E501 + Measurement unit for each serving (e.g. if measure is 3 tsp, the unit is tsp) # noqa: E501 :return: The measurement_unit of this BrandedFoodObjectServing. :rtype: str @@ -93,7 +88,7 @@ def measurement_unit(self) -> str: def measurement_unit(self, measurement_unit: str): """Sets the measurement_unit of this BrandedFoodObjectServing. - Serving measurement unit (e.g. if measure is 3 tsp, the unit is tsp) # noqa: E501 + Measurement unit for each serving (e.g. if measure is 3 tsp, the unit is tsp) # noqa: E501 :param measurement_unit: The measurement_unit of this BrandedFoodObjectServing. :type measurement_unit: str @@ -123,26 +118,3 @@ def size_fulltext(self, size_fulltext: str): """ self._size_fulltext = size_fulltext - - @property - def total(self) -> int: - """Gets the total of this BrandedFoodObjectServing. - - Total servings # noqa: E501 - - :return: The total of this BrandedFoodObjectServing. - :rtype: int - """ - return self._total - - @total.setter - def total(self, total: int): - """Sets the total of this BrandedFoodObjectServing. - - Total servings # noqa: E501 - - :param total: The total of this BrandedFoodObjectServing. - :type total: int - """ - - self._total = total diff --git a/swagger_server/models/branded_food_object_calorie_conversion_factor.py b/swagger_server/models/ingredient_object_calorie_conversion_factor.py similarity index 63% rename from swagger_server/models/branded_food_object_calorie_conversion_factor.py rename to swagger_server/models/ingredient_object_calorie_conversion_factor.py index bf2e09f..5edb181 100644 --- a/swagger_server/models/branded_food_object_calorie_conversion_factor.py +++ b/swagger_server/models/ingredient_object_calorie_conversion_factor.py @@ -9,19 +9,19 @@ from swagger_server import util -class BrandedFoodObjectCalorieConversionFactor(Model): +class IngredientObjectCalorieConversionFactor(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, protein_value: float=None, fat_value: float=None, carbohydrate_value: float=None): # noqa: E501 - """BrandedFoodObjectCalorieConversionFactor - a model defined in Swagger + """IngredientObjectCalorieConversionFactor - a model defined in Swagger - :param protein_value: The protein_value of this BrandedFoodObjectCalorieConversionFactor. # noqa: E501 + :param protein_value: The protein_value of this IngredientObjectCalorieConversionFactor. # noqa: E501 :type protein_value: float - :param fat_value: The fat_value of this BrandedFoodObjectCalorieConversionFactor. # noqa: E501 + :param fat_value: The fat_value of this IngredientObjectCalorieConversionFactor. # noqa: E501 :type fat_value: float - :param carbohydrate_value: The carbohydrate_value of this BrandedFoodObjectCalorieConversionFactor. # noqa: E501 + :param carbohydrate_value: The carbohydrate_value of this IngredientObjectCalorieConversionFactor. # noqa: E501 :type carbohydrate_value: float """ self.swagger_types = { @@ -40,34 +40,34 @@ def __init__(self, protein_value: float=None, fat_value: float=None, carbohydrat self._carbohydrate_value = carbohydrate_value @classmethod - def from_dict(cls, dikt) -> 'BrandedFoodObjectCalorieConversionFactor': + def from_dict(cls, dikt) -> 'IngredientObjectCalorieConversionFactor': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The BrandedFoodObject_calorie_conversion_factor of this BrandedFoodObjectCalorieConversionFactor. # noqa: E501 - :rtype: BrandedFoodObjectCalorieConversionFactor + :return: The IngredientObject_calorie_conversion_factor of this IngredientObjectCalorieConversionFactor. # noqa: E501 + :rtype: IngredientObjectCalorieConversionFactor """ return util.deserialize_model(dikt, cls) @property def protein_value(self) -> float: - """Gets the protein_value of this BrandedFoodObjectCalorieConversionFactor. + """Gets the protein_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for protein # noqa: E501 - :return: The protein_value of this BrandedFoodObjectCalorieConversionFactor. + :return: The protein_value of this IngredientObjectCalorieConversionFactor. :rtype: float """ return self._protein_value @protein_value.setter def protein_value(self, protein_value: float): - """Sets the protein_value of this BrandedFoodObjectCalorieConversionFactor. + """Sets the protein_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for protein # noqa: E501 - :param protein_value: The protein_value of this BrandedFoodObjectCalorieConversionFactor. + :param protein_value: The protein_value of this IngredientObjectCalorieConversionFactor. :type protein_value: float """ @@ -75,22 +75,22 @@ def protein_value(self, protein_value: float): @property def fat_value(self) -> float: - """Gets the fat_value of this BrandedFoodObjectCalorieConversionFactor. + """Gets the fat_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for fat # noqa: E501 - :return: The fat_value of this BrandedFoodObjectCalorieConversionFactor. + :return: The fat_value of this IngredientObjectCalorieConversionFactor. :rtype: float """ return self._fat_value @fat_value.setter def fat_value(self, fat_value: float): - """Sets the fat_value of this BrandedFoodObjectCalorieConversionFactor. + """Sets the fat_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for fat # noqa: E501 - :param fat_value: The fat_value of this BrandedFoodObjectCalorieConversionFactor. + :param fat_value: The fat_value of this IngredientObjectCalorieConversionFactor. :type fat_value: float """ @@ -98,22 +98,22 @@ def fat_value(self, fat_value: float): @property def carbohydrate_value(self) -> float: - """Gets the carbohydrate_value of this BrandedFoodObjectCalorieConversionFactor. + """Gets the carbohydrate_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for carbohydrates # noqa: E501 - :return: The carbohydrate_value of this BrandedFoodObjectCalorieConversionFactor. + :return: The carbohydrate_value of this IngredientObjectCalorieConversionFactor. :rtype: float """ return self._carbohydrate_value @carbohydrate_value.setter def carbohydrate_value(self, carbohydrate_value: float): - """Sets the carbohydrate_value of this BrandedFoodObjectCalorieConversionFactor. + """Sets the carbohydrate_value of this IngredientObjectCalorieConversionFactor. The multiplication factor for carbohydrates # noqa: E501 - :param carbohydrate_value: The carbohydrate_value of this BrandedFoodObjectCalorieConversionFactor. + :param carbohydrate_value: The carbohydrate_value of this IngredientObjectCalorieConversionFactor. :type carbohydrate_value: float """ diff --git a/swagger_server/models/branded_food_object_components.py b/swagger_server/models/ingredient_object_components.py similarity index 62% rename from swagger_server/models/branded_food_object_components.py rename to swagger_server/models/ingredient_object_components.py index ce99247..6af0e9a 100644 --- a/swagger_server/models/branded_food_object_components.py +++ b/swagger_server/models/ingredient_object_components.py @@ -9,23 +9,23 @@ from swagger_server import util -class BrandedFoodObjectComponents(Model): +class IngredientObjectComponents(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, name: str=None, pct_weight: float=None, gram_weight: float=None, is_refuse: bool=None, data_points: int=None): # noqa: E501 - """BrandedFoodObjectComponents - a model defined in Swagger + """IngredientObjectComponents - a model defined in Swagger - :param name: The name of this BrandedFoodObjectComponents. # noqa: E501 + :param name: The name of this IngredientObjectComponents. # noqa: E501 :type name: str - :param pct_weight: The pct_weight of this BrandedFoodObjectComponents. # noqa: E501 + :param pct_weight: The pct_weight of this IngredientObjectComponents. # noqa: E501 :type pct_weight: float - :param gram_weight: The gram_weight of this BrandedFoodObjectComponents. # noqa: E501 + :param gram_weight: The gram_weight of this IngredientObjectComponents. # noqa: E501 :type gram_weight: float - :param is_refuse: The is_refuse of this BrandedFoodObjectComponents. # noqa: E501 + :param is_refuse: The is_refuse of this IngredientObjectComponents. # noqa: E501 :type is_refuse: bool - :param data_points: The data_points of this BrandedFoodObjectComponents. # noqa: E501 + :param data_points: The data_points of this IngredientObjectComponents. # noqa: E501 :type data_points: int """ self.swagger_types = { @@ -50,34 +50,34 @@ def __init__(self, name: str=None, pct_weight: float=None, gram_weight: float=No self._data_points = data_points @classmethod - def from_dict(cls, dikt) -> 'BrandedFoodObjectComponents': + def from_dict(cls, dikt) -> 'IngredientObjectComponents': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The BrandedFoodObject_components of this BrandedFoodObjectComponents. # noqa: E501 - :rtype: BrandedFoodObjectComponents + :return: The IngredientObject_components of this IngredientObjectComponents. # noqa: E501 + :rtype: IngredientObjectComponents """ return util.deserialize_model(dikt, cls) @property def name(self) -> str: - """Gets the name of this BrandedFoodObjectComponents. + """Gets the name of this IngredientObjectComponents. The kind of component, e.g. bone # noqa: E501 - :return: The name of this BrandedFoodObjectComponents. + :return: The name of this IngredientObjectComponents. :rtype: str """ return self._name @name.setter def name(self, name: str): - """Sets the name of this BrandedFoodObjectComponents. + """Sets the name of this IngredientObjectComponents. The kind of component, e.g. bone # noqa: E501 - :param name: The name of this BrandedFoodObjectComponents. + :param name: The name of this IngredientObjectComponents. :type name: str """ @@ -85,22 +85,22 @@ def name(self, name: str): @property def pct_weight(self) -> float: - """Gets the pct_weight of this BrandedFoodObjectComponents. + """Gets the pct_weight of this IngredientObjectComponents. The weight of the component as a percentage of the total weight of the food # noqa: E501 - :return: The pct_weight of this BrandedFoodObjectComponents. + :return: The pct_weight of this IngredientObjectComponents. :rtype: float """ return self._pct_weight @pct_weight.setter def pct_weight(self, pct_weight: float): - """Sets the pct_weight of this BrandedFoodObjectComponents. + """Sets the pct_weight of this IngredientObjectComponents. The weight of the component as a percentage of the total weight of the food # noqa: E501 - :param pct_weight: The pct_weight of this BrandedFoodObjectComponents. + :param pct_weight: The pct_weight of this IngredientObjectComponents. :type pct_weight: float """ @@ -108,22 +108,22 @@ def pct_weight(self, pct_weight: float): @property def gram_weight(self) -> float: - """Gets the gram_weight of this BrandedFoodObjectComponents. + """Gets the gram_weight of this IngredientObjectComponents. The weight of the component in grams # noqa: E501 - :return: The gram_weight of this BrandedFoodObjectComponents. + :return: The gram_weight of this IngredientObjectComponents. :rtype: float """ return self._gram_weight @gram_weight.setter def gram_weight(self, gram_weight: float): - """Sets the gram_weight of this BrandedFoodObjectComponents. + """Sets the gram_weight of this IngredientObjectComponents. The weight of the component in grams # noqa: E501 - :param gram_weight: The gram_weight of this BrandedFoodObjectComponents. + :param gram_weight: The gram_weight of this IngredientObjectComponents. :type gram_weight: float """ @@ -131,22 +131,22 @@ def gram_weight(self, gram_weight: float): @property def is_refuse(self) -> bool: - """Gets the is_refuse of this BrandedFoodObjectComponents. + """Gets the is_refuse of this IngredientObjectComponents. Whether the component is refuse, i.e. not edible # noqa: E501 - :return: The is_refuse of this BrandedFoodObjectComponents. + :return: The is_refuse of this IngredientObjectComponents. :rtype: bool """ return self._is_refuse @is_refuse.setter def is_refuse(self, is_refuse: bool): - """Sets the is_refuse of this BrandedFoodObjectComponents. + """Sets the is_refuse of this IngredientObjectComponents. Whether the component is refuse, i.e. not edible # noqa: E501 - :param is_refuse: The is_refuse of this BrandedFoodObjectComponents. + :param is_refuse: The is_refuse of this IngredientObjectComponents. :type is_refuse: bool """ @@ -154,22 +154,22 @@ def is_refuse(self, is_refuse: bool): @property def data_points(self) -> int: - """Gets the data_points of this BrandedFoodObjectComponents. + """Gets the data_points of this IngredientObjectComponents. The number of obersvations on which the measure is based # noqa: E501 - :return: The data_points of this BrandedFoodObjectComponents. + :return: The data_points of this IngredientObjectComponents. :rtype: int """ return self._data_points @data_points.setter def data_points(self, data_points: int): - """Sets the data_points of this BrandedFoodObjectComponents. + """Sets the data_points of this IngredientObjectComponents. The number of obersvations on which the measure is based # noqa: E501 - :param data_points: The data_points of this BrandedFoodObjectComponents. + :param data_points: The data_points of this IngredientObjectComponents. :type data_points: int """ diff --git a/swagger_server/models/ingredient_object_items.py b/swagger_server/models/ingredient_object_items.py index 88fdd41..2f9ab11 100644 --- a/swagger_server/models/ingredient_object_items.py +++ b/swagger_server/models/ingredient_object_items.py @@ -6,11 +6,10 @@ from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model -from swagger_server.models.branded_food_object_calorie_conversion_factor import BrandedFoodObjectCalorieConversionFactor # noqa: F401,E501 -from swagger_server.models.branded_food_object_components import BrandedFoodObjectComponents # noqa: F401,E501 -from swagger_server.models.branded_food_object_diet_labels import BrandedFoodObjectDietLabels # noqa: F401,E501 -from swagger_server.models.branded_food_object_portions import BrandedFoodObjectPortions # noqa: F401,E501 +from swagger_server.models.ingredient_object_calorie_conversion_factor import IngredientObjectCalorieConversionFactor # noqa: F401,E501 +from swagger_server.models.ingredient_object_components import IngredientObjectComponents # noqa: F401,E501 from swagger_server.models.ingredient_object_nutrients import IngredientObjectNutrients # noqa: F401,E501 +from swagger_server.models.ingredient_object_portions import IngredientObjectPortions # noqa: F401,E501 from swagger_server import util @@ -19,7 +18,7 @@ class IngredientObjectItems(Model): Do not edit the class manually. """ - def __init__(self, name: str=None, categories: List[str]=None, nutrients: IngredientObjectNutrients=None, calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor=None, protein_conversion_factor: float=None, diet_labels: BrandedFoodObjectDietLabels=None, components: List[BrandedFoodObjectComponents]=None, portions: List[BrandedFoodObjectPortions]=None, common_name: str=None, description: str=None, footnote: str=None): # noqa: E501 + def __init__(self, name: str=None, categories: List[str]=None, nutrients: List[IngredientObjectNutrients]=None, calorie_conversion_factor: IngredientObjectCalorieConversionFactor=None, protein_conversion_factor: float=None, components: List[IngredientObjectComponents]=None, portions: List[IngredientObjectPortions]=None, common_name: str=None, footnote: str=None, search_term: str=None, score: str=None): # noqa: E501 """IngredientObjectItems - a model defined in Swagger :param name: The name of this IngredientObjectItems. # noqa: E501 @@ -27,36 +26,36 @@ def __init__(self, name: str=None, categories: List[str]=None, nutrients: Ingred :param categories: The categories of this IngredientObjectItems. # noqa: E501 :type categories: List[str] :param nutrients: The nutrients of this IngredientObjectItems. # noqa: E501 - :type nutrients: IngredientObjectNutrients + :type nutrients: List[IngredientObjectNutrients] :param calorie_conversion_factor: The calorie_conversion_factor of this IngredientObjectItems. # noqa: E501 - :type calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor + :type calorie_conversion_factor: IngredientObjectCalorieConversionFactor :param protein_conversion_factor: The protein_conversion_factor of this IngredientObjectItems. # noqa: E501 :type protein_conversion_factor: float - :param diet_labels: The diet_labels of this IngredientObjectItems. # noqa: E501 - :type diet_labels: BrandedFoodObjectDietLabels :param components: The components of this IngredientObjectItems. # noqa: E501 - :type components: List[BrandedFoodObjectComponents] + :type components: List[IngredientObjectComponents] :param portions: The portions of this IngredientObjectItems. # noqa: E501 - :type portions: List[BrandedFoodObjectPortions] + :type portions: List[IngredientObjectPortions] :param common_name: The common_name of this IngredientObjectItems. # noqa: E501 :type common_name: str - :param description: The description of this IngredientObjectItems. # noqa: E501 - :type description: str :param footnote: The footnote of this IngredientObjectItems. # noqa: E501 :type footnote: str + :param search_term: The search_term of this IngredientObjectItems. # noqa: E501 + :type search_term: str + :param score: The score of this IngredientObjectItems. # noqa: E501 + :type score: str """ self.swagger_types = { 'name': str, 'categories': List[str], - 'nutrients': IngredientObjectNutrients, - 'calorie_conversion_factor': BrandedFoodObjectCalorieConversionFactor, + 'nutrients': List[IngredientObjectNutrients], + 'calorie_conversion_factor': IngredientObjectCalorieConversionFactor, 'protein_conversion_factor': float, - 'diet_labels': BrandedFoodObjectDietLabels, - 'components': List[BrandedFoodObjectComponents], - 'portions': List[BrandedFoodObjectPortions], + 'components': List[IngredientObjectComponents], + 'portions': List[IngredientObjectPortions], 'common_name': str, - 'description': str, - 'footnote': str + 'footnote': str, + 'search_term': str, + 'score': str } self.attribute_map = { @@ -65,24 +64,24 @@ def __init__(self, name: str=None, categories: List[str]=None, nutrients: Ingred 'nutrients': 'nutrients', 'calorie_conversion_factor': 'calorie_conversion_factor', 'protein_conversion_factor': 'protein_conversion_factor', - 'diet_labels': 'diet_labels', 'components': 'components', 'portions': 'portions', 'common_name': 'common_name', - 'description': 'description', - 'footnote': 'footnote' + 'footnote': 'footnote', + 'search_term': 'search_term', + 'score': 'score' } self._name = name self._categories = categories self._nutrients = nutrients self._calorie_conversion_factor = calorie_conversion_factor self._protein_conversion_factor = protein_conversion_factor - self._diet_labels = diet_labels self._components = components self._portions = portions self._common_name = common_name - self._description = description self._footnote = footnote + self._search_term = search_term + self._score = score @classmethod def from_dict(cls, dikt) -> 'IngredientObjectItems': @@ -140,43 +139,45 @@ def categories(self, categories: List[str]): self._categories = categories @property - def nutrients(self) -> IngredientObjectNutrients: + def nutrients(self) -> List[IngredientObjectNutrients]: """Gets the nutrients of this IngredientObjectItems. + An array containing nutrient informatio objects for this food item # noqa: E501 :return: The nutrients of this IngredientObjectItems. - :rtype: IngredientObjectNutrients + :rtype: List[IngredientObjectNutrients] """ return self._nutrients @nutrients.setter - def nutrients(self, nutrients: IngredientObjectNutrients): + def nutrients(self, nutrients: List[IngredientObjectNutrients]): """Sets the nutrients of this IngredientObjectItems. + An array containing nutrient informatio objects for this food item # noqa: E501 :param nutrients: The nutrients of this IngredientObjectItems. - :type nutrients: IngredientObjectNutrients + :type nutrients: List[IngredientObjectNutrients] """ self._nutrients = nutrients @property - def calorie_conversion_factor(self) -> BrandedFoodObjectCalorieConversionFactor: + def calorie_conversion_factor(self) -> IngredientObjectCalorieConversionFactor: """Gets the calorie_conversion_factor of this IngredientObjectItems. :return: The calorie_conversion_factor of this IngredientObjectItems. - :rtype: BrandedFoodObjectCalorieConversionFactor + :rtype: IngredientObjectCalorieConversionFactor """ return self._calorie_conversion_factor @calorie_conversion_factor.setter - def calorie_conversion_factor(self, calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor): + def calorie_conversion_factor(self, calorie_conversion_factor: IngredientObjectCalorieConversionFactor): """Sets the calorie_conversion_factor of this IngredientObjectItems. :param calorie_conversion_factor: The calorie_conversion_factor of this IngredientObjectItems. - :type calorie_conversion_factor: BrandedFoodObjectCalorieConversionFactor + :type calorie_conversion_factor: IngredientObjectCalorieConversionFactor """ self._calorie_conversion_factor = calorie_conversion_factor @@ -205,68 +206,47 @@ def protein_conversion_factor(self, protein_conversion_factor: float): self._protein_conversion_factor = protein_conversion_factor @property - def diet_labels(self) -> BrandedFoodObjectDietLabels: - """Gets the diet_labels of this IngredientObjectItems. - - - :return: The diet_labels of this IngredientObjectItems. - :rtype: BrandedFoodObjectDietLabels - """ - return self._diet_labels - - @diet_labels.setter - def diet_labels(self, diet_labels: BrandedFoodObjectDietLabels): - """Sets the diet_labels of this IngredientObjectItems. - - - :param diet_labels: The diet_labels of this IngredientObjectItems. - :type diet_labels: BrandedFoodObjectDietLabels - """ - - self._diet_labels = diet_labels - - @property - def components(self) -> List[BrandedFoodObjectComponents]: + def components(self) -> List[IngredientObjectComponents]: """Gets the components of this IngredientObjectItems. An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) # noqa: E501 :return: The components of this IngredientObjectItems. - :rtype: List[BrandedFoodObjectComponents] + :rtype: List[IngredientObjectComponents] """ return self._components @components.setter - def components(self, components: List[BrandedFoodObjectComponents]): + def components(self, components: List[IngredientObjectComponents]): """Sets the components of this IngredientObjectItems. An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) # noqa: E501 :param components: The components of this IngredientObjectItems. - :type components: List[BrandedFoodObjectComponents] + :type components: List[IngredientObjectComponents] """ self._components = components @property - def portions(self) -> List[BrandedFoodObjectPortions]: + def portions(self) -> List[IngredientObjectPortions]: """Gets the portions of this IngredientObjectItems. An array of objects containing information on discrete amounts of a food found in this item # noqa: E501 :return: The portions of this IngredientObjectItems. - :rtype: List[BrandedFoodObjectPortions] + :rtype: List[IngredientObjectPortions] """ return self._portions @portions.setter - def portions(self, portions: List[BrandedFoodObjectPortions]): + def portions(self, portions: List[IngredientObjectPortions]): """Sets the portions of this IngredientObjectItems. An array of objects containing information on discrete amounts of a food found in this item # noqa: E501 :param portions: The portions of this IngredientObjectItems. - :type portions: List[BrandedFoodObjectPortions] + :type portions: List[IngredientObjectPortions] """ self._portions = portions @@ -275,7 +255,7 @@ def portions(self, portions: List[BrandedFoodObjectPortions]): def common_name(self) -> str: """Gets the common_name of this IngredientObjectItems. - Common names associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 + Common name associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 :return: The common_name of this IngredientObjectItems. :rtype: str @@ -286,7 +266,7 @@ def common_name(self) -> str: def common_name(self, common_name: str): """Sets the common_name of this IngredientObjectItems. - Common names associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 + Common name associated with this item. These generally clarify what the item is (e.g. when the brand name is \"BRAND's Spicy Enchilada\" the common name may be \"Chicken enchilada\") # noqa: E501 :param common_name: The common_name of this IngredientObjectItems. :type common_name: str @@ -295,47 +275,70 @@ def common_name(self, common_name: str): self._common_name = common_name @property - def description(self) -> str: - """Gets the description of this IngredientObjectItems. + def footnote(self) -> str: + """Gets the footnote of this IngredientObjectItems. - A description of this item # noqa: E501 + Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall # noqa: E501 - :return: The description of this IngredientObjectItems. + :return: The footnote of this IngredientObjectItems. :rtype: str """ - return self._description + return self._footnote - @description.setter - def description(self, description: str): - """Sets the description of this IngredientObjectItems. + @footnote.setter + def footnote(self, footnote: str): + """Sets the footnote of this IngredientObjectItems. - A description of this item # noqa: E501 + Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall # noqa: E501 - :param description: The description of this IngredientObjectItems. - :type description: str + :param footnote: The footnote of this IngredientObjectItems. + :type footnote: str """ - self._description = description + self._footnote = footnote @property - def footnote(self) -> str: - """Gets the footnote of this IngredientObjectItems. + def search_term(self) -> str: + """Gets the search_term of this IngredientObjectItems. - Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall. # noqa: E501 + The original search term that found this food item # noqa: E501 - :return: The footnote of this IngredientObjectItems. + :return: The search_term of this IngredientObjectItems. :rtype: str """ - return self._footnote + return self._search_term - @footnote.setter - def footnote(self, footnote: str): - """Sets the footnote of this IngredientObjectItems. + @search_term.setter + def search_term(self, search_term: str): + """Sets the search_term of this IngredientObjectItems. - Comments on any unusual aspects of this item. Examples might include unusual aspects of the food overall. # noqa: E501 + The original search term that found this food item # noqa: E501 - :param footnote: The footnote of this IngredientObjectItems. - :type footnote: str + :param search_term: The search_term of this IngredientObjectItems. + :type search_term: str """ - self._footnote = footnote + self._search_term = search_term + + @property + def score(self) -> str: + """Gets the score of this IngredientObjectItems. + + A value that represents how similar the name of this food item is to the original search term. The lower the value the closer this item's name is to the original search term. # noqa: E501 + + :return: The score of this IngredientObjectItems. + :rtype: str + """ + return self._score + + @score.setter + def score(self, score: str): + """Sets the score of this IngredientObjectItems. + + A value that represents how similar the name of this food item is to the original search term. The lower the value the closer this item's name is to the original search term. # noqa: E501 + + :param score: The score of this IngredientObjectItems. + :type score: str + """ + + self._score = score diff --git a/swagger_server/models/ingredient_object_nutrients.py b/swagger_server/models/ingredient_object_nutrients.py index b9153ef..e625573 100644 --- a/swagger_server/models/ingredient_object_nutrients.py +++ b/swagger_server/models/ingredient_object_nutrients.py @@ -6,7 +6,6 @@ from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model -from swagger_server.models.branded_food_object_nutrients_usda import BrandedFoodObjectNutrientsUsda # noqa: F401,E501 from swagger_server import util @@ -15,20 +14,65 @@ class IngredientObjectNutrients(Model): Do not edit the class manually. """ - def __init__(self, usda: List[BrandedFoodObjectNutrientsUsda]=None): # noqa: E501 + def __init__(self, name: str=None, per_100g: float=None, measurement_unit: str=None, min: float=None, max: float=None, median: float=None, rank: int=None, data_points: int=None, footnote: str=None, description: str=None): # noqa: E501 """IngredientObjectNutrients - a model defined in Swagger - :param usda: The usda of this IngredientObjectNutrients. # noqa: E501 - :type usda: List[BrandedFoodObjectNutrientsUsda] + :param name: The name of this IngredientObjectNutrients. # noqa: E501 + :type name: str + :param per_100g: The per_100g of this IngredientObjectNutrients. # noqa: E501 + :type per_100g: float + :param measurement_unit: The measurement_unit of this IngredientObjectNutrients. # noqa: E501 + :type measurement_unit: str + :param min: The min of this IngredientObjectNutrients. # noqa: E501 + :type min: float + :param max: The max of this IngredientObjectNutrients. # noqa: E501 + :type max: float + :param median: The median of this IngredientObjectNutrients. # noqa: E501 + :type median: float + :param rank: The rank of this IngredientObjectNutrients. # noqa: E501 + :type rank: int + :param data_points: The data_points of this IngredientObjectNutrients. # noqa: E501 + :type data_points: int + :param footnote: The footnote of this IngredientObjectNutrients. # noqa: E501 + :type footnote: str + :param description: The description of this IngredientObjectNutrients. # noqa: E501 + :type description: str """ self.swagger_types = { - 'usda': List[BrandedFoodObjectNutrientsUsda] + 'name': str, + 'per_100g': float, + 'measurement_unit': str, + 'min': float, + 'max': float, + 'median': float, + 'rank': int, + 'data_points': int, + 'footnote': str, + 'description': str } self.attribute_map = { - 'usda': 'usda' + 'name': 'name', + 'per_100g': 'per_100g', + 'measurement_unit': 'measurement_unit', + 'min': 'min', + 'max': 'max', + 'median': 'median', + 'rank': 'rank', + 'data_points': 'data_points', + 'footnote': 'footnote', + 'description': 'description' } - self._usda = usda + self._name = name + self._per_100g = per_100g + self._measurement_unit = measurement_unit + self._min = min + self._max = max + self._median = median + self._rank = rank + self._data_points = data_points + self._footnote = footnote + self._description = description @classmethod def from_dict(cls, dikt) -> 'IngredientObjectNutrients': @@ -42,24 +86,231 @@ def from_dict(cls, dikt) -> 'IngredientObjectNutrients': return util.deserialize_model(dikt, cls) @property - def usda(self) -> List[BrandedFoodObjectNutrientsUsda]: - """Gets the usda of this IngredientObjectNutrients. + def name(self) -> str: + """Gets the name of this IngredientObjectNutrients. - An array containing an object for each nutrient data point as found in the USDA database # noqa: E501 + Nutrient name # noqa: E501 - :return: The usda of this IngredientObjectNutrients. - :rtype: List[BrandedFoodObjectNutrientsUsda] + :return: The name of this IngredientObjectNutrients. + :rtype: str """ - return self._usda + return self._name - @usda.setter - def usda(self, usda: List[BrandedFoodObjectNutrientsUsda]): - """Sets the usda of this IngredientObjectNutrients. + @name.setter + def name(self, name: str): + """Sets the name of this IngredientObjectNutrients. - An array containing an object for each nutrient data point as found in the USDA database # noqa: E501 + Nutrient name # noqa: E501 - :param usda: The usda of this IngredientObjectNutrients. - :type usda: List[BrandedFoodObjectNutrientsUsda] + :param name: The name of this IngredientObjectNutrients. + :type name: str """ - self._usda = usda + self._name = name + + @property + def per_100g(self) -> float: + """Gets the per_100g of this IngredientObjectNutrients. + + Amount of the nutrient per 100g of food # noqa: E501 + + :return: The per_100g of this IngredientObjectNutrients. + :rtype: float + """ + return self._per_100g + + @per_100g.setter + def per_100g(self, per_100g: float): + """Sets the per_100g of this IngredientObjectNutrients. + + Amount of the nutrient per 100g of food # noqa: E501 + + :param per_100g: The per_100g of this IngredientObjectNutrients. + :type per_100g: float + """ + + self._per_100g = per_100g + + @property + def measurement_unit(self) -> str: + """Gets the measurement_unit of this IngredientObjectNutrients. + + The unit used for the measure of this nutrient # noqa: E501 + + :return: The measurement_unit of this IngredientObjectNutrients. + :rtype: str + """ + return self._measurement_unit + + @measurement_unit.setter + def measurement_unit(self, measurement_unit: str): + """Sets the measurement_unit of this IngredientObjectNutrients. + + The unit used for the measure of this nutrient # noqa: E501 + + :param measurement_unit: The measurement_unit of this IngredientObjectNutrients. + :type measurement_unit: str + """ + + self._measurement_unit = measurement_unit + + @property + def min(self) -> float: + """Gets the min of this IngredientObjectNutrients. + + Minimum nutrient value # noqa: E501 + + :return: The min of this IngredientObjectNutrients. + :rtype: float + """ + return self._min + + @min.setter + def min(self, min: float): + """Sets the min of this IngredientObjectNutrients. + + Minimum nutrient value # noqa: E501 + + :param min: The min of this IngredientObjectNutrients. + :type min: float + """ + + self._min = min + + @property + def max(self) -> float: + """Gets the max of this IngredientObjectNutrients. + + Maximum nutrient value # noqa: E501 + + :return: The max of this IngredientObjectNutrients. + :rtype: float + """ + return self._max + + @max.setter + def max(self, max: float): + """Sets the max of this IngredientObjectNutrients. + + Maximum nutrient value # noqa: E501 + + :param max: The max of this IngredientObjectNutrients. + :type max: float + """ + + self._max = max + + @property + def median(self) -> float: + """Gets the median of this IngredientObjectNutrients. + + Median nutrient value # noqa: E501 + + :return: The median of this IngredientObjectNutrients. + :rtype: float + """ + return self._median + + @median.setter + def median(self, median: float): + """Sets the median of this IngredientObjectNutrients. + + Median nutrient value # noqa: E501 + + :param median: The median of this IngredientObjectNutrients. + :type median: float + """ + + self._median = median + + @property + def rank(self) -> int: + """Gets the rank of this IngredientObjectNutrients. + + Nutrient rank # noqa: E501 + + :return: The rank of this IngredientObjectNutrients. + :rtype: int + """ + return self._rank + + @rank.setter + def rank(self, rank: int): + """Sets the rank of this IngredientObjectNutrients. + + Nutrient rank # noqa: E501 + + :param rank: The rank of this IngredientObjectNutrients. + :type rank: int + """ + + self._rank = rank + + @property + def data_points(self) -> int: + """Gets the data_points of this IngredientObjectNutrients. + + Number of observations on which the value is based # noqa: E501 + + :return: The data_points of this IngredientObjectNutrients. + :rtype: int + """ + return self._data_points + + @data_points.setter + def data_points(self, data_points: int): + """Sets the data_points of this IngredientObjectNutrients. + + Number of observations on which the value is based # noqa: E501 + + :param data_points: The data_points of this IngredientObjectNutrients. + :type data_points: int + """ + + self._data_points = data_points + + @property + def footnote(self) -> str: + """Gets the footnote of this IngredientObjectNutrients. + + Comments on any unusual aspect of the food nutrient. Examples might include why a nutrient value is different than typically expected. # noqa: E501 + + :return: The footnote of this IngredientObjectNutrients. + :rtype: str + """ + return self._footnote + + @footnote.setter + def footnote(self, footnote: str): + """Sets the footnote of this IngredientObjectNutrients. + + Comments on any unusual aspect of the food nutrient. Examples might include why a nutrient value is different than typically expected. # noqa: E501 + + :param footnote: The footnote of this IngredientObjectNutrients. + :type footnote: str + """ + + self._footnote = footnote + + @property + def description(self) -> str: + """Gets the description of this IngredientObjectNutrients. + + Description of the nutrient source # noqa: E501 + + :return: The description of this IngredientObjectNutrients. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this IngredientObjectNutrients. + + Description of the nutrient source # noqa: E501 + + :param description: The description of this IngredientObjectNutrients. + :type description: str + """ + + self._description = description diff --git a/swagger_server/models/branded_food_object_portions.py b/swagger_server/models/ingredient_object_portions.py similarity index 65% rename from swagger_server/models/branded_food_object_portions.py rename to swagger_server/models/ingredient_object_portions.py index 74d6625..644529d 100644 --- a/swagger_server/models/branded_food_object_portions.py +++ b/swagger_server/models/ingredient_object_portions.py @@ -9,25 +9,25 @@ from swagger_server import util -class BrandedFoodObjectPortions(Model): +class IngredientObjectPortions(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, measurement_unit: str=None, description: str=None, modifier: str=None, gram_weight: float=None, data_points: int=None, footnote: str=None): # noqa: E501 - """BrandedFoodObjectPortions - a model defined in Swagger + """IngredientObjectPortions - a model defined in Swagger - :param measurement_unit: The measurement_unit of this BrandedFoodObjectPortions. # noqa: E501 + :param measurement_unit: The measurement_unit of this IngredientObjectPortions. # noqa: E501 :type measurement_unit: str - :param description: The description of this BrandedFoodObjectPortions. # noqa: E501 + :param description: The description of this IngredientObjectPortions. # noqa: E501 :type description: str - :param modifier: The modifier of this BrandedFoodObjectPortions. # noqa: E501 + :param modifier: The modifier of this IngredientObjectPortions. # noqa: E501 :type modifier: str - :param gram_weight: The gram_weight of this BrandedFoodObjectPortions. # noqa: E501 + :param gram_weight: The gram_weight of this IngredientObjectPortions. # noqa: E501 :type gram_weight: float - :param data_points: The data_points of this BrandedFoodObjectPortions. # noqa: E501 + :param data_points: The data_points of this IngredientObjectPortions. # noqa: E501 :type data_points: int - :param footnote: The footnote of this BrandedFoodObjectPortions. # noqa: E501 + :param footnote: The footnote of this IngredientObjectPortions. # noqa: E501 :type footnote: str """ self.swagger_types = { @@ -55,34 +55,34 @@ def __init__(self, measurement_unit: str=None, description: str=None, modifier: self._footnote = footnote @classmethod - def from_dict(cls, dikt) -> 'BrandedFoodObjectPortions': + def from_dict(cls, dikt) -> 'IngredientObjectPortions': """Returns the dict as a model :param dikt: A dict. :type: dict - :return: The BrandedFoodObject_portions of this BrandedFoodObjectPortions. # noqa: E501 - :rtype: BrandedFoodObjectPortions + :return: The IngredientObject_portions of this IngredientObjectPortions. # noqa: E501 + :rtype: IngredientObjectPortions """ return util.deserialize_model(dikt, cls) @property def measurement_unit(self) -> str: - """Gets the measurement_unit of this BrandedFoodObjectPortions. + """Gets the measurement_unit of this IngredientObjectPortions. The unit used for measure (e.g. if mesure is 3 tsp, the unit is tsp) # noqa: E501 - :return: The measurement_unit of this BrandedFoodObjectPortions. + :return: The measurement_unit of this IngredientObjectPortions. :rtype: str """ return self._measurement_unit @measurement_unit.setter def measurement_unit(self, measurement_unit: str): - """Sets the measurement_unit of this BrandedFoodObjectPortions. + """Sets the measurement_unit of this IngredientObjectPortions. The unit used for measure (e.g. if mesure is 3 tsp, the unit is tsp) # noqa: E501 - :param measurement_unit: The measurement_unit of this BrandedFoodObjectPortions. + :param measurement_unit: The measurement_unit of this IngredientObjectPortions. :type measurement_unit: str """ @@ -90,22 +90,22 @@ def measurement_unit(self, measurement_unit: str): @property def description(self) -> str: - """Gets the description of this BrandedFoodObjectPortions. + """Gets the description of this IngredientObjectPortions. Comments that provide more specificity on the measure. For example, for a pizza measure the dissemination text might be 1 slice is 1/8th of a 14 inch pizza. # noqa: E501 - :return: The description of this BrandedFoodObjectPortions. + :return: The description of this IngredientObjectPortions. :rtype: str """ return self._description @description.setter def description(self, description: str): - """Sets the description of this BrandedFoodObjectPortions. + """Sets the description of this IngredientObjectPortions. Comments that provide more specificity on the measure. For example, for a pizza measure the dissemination text might be 1 slice is 1/8th of a 14 inch pizza. # noqa: E501 - :param description: The description of this BrandedFoodObjectPortions. + :param description: The description of this IngredientObjectPortions. :type description: str """ @@ -113,22 +113,22 @@ def description(self, description: str): @property def modifier(self) -> str: - """Gets the modifier of this BrandedFoodObjectPortions. + """Gets the modifier of this IngredientObjectPortions. Qualifier of the measure (e.g. related to food shape or form) (e.g. melted, crushed, diced) # noqa: E501 - :return: The modifier of this BrandedFoodObjectPortions. + :return: The modifier of this IngredientObjectPortions. :rtype: str """ return self._modifier @modifier.setter def modifier(self, modifier: str): - """Sets the modifier of this BrandedFoodObjectPortions. + """Sets the modifier of this IngredientObjectPortions. Qualifier of the measure (e.g. related to food shape or form) (e.g. melted, crushed, diced) # noqa: E501 - :param modifier: The modifier of this BrandedFoodObjectPortions. + :param modifier: The modifier of this IngredientObjectPortions. :type modifier: str """ @@ -136,22 +136,22 @@ def modifier(self, modifier: str): @property def gram_weight(self) -> float: - """Gets the gram_weight of this BrandedFoodObjectPortions. + """Gets the gram_weight of this IngredientObjectPortions. The weight of the measure in grams # noqa: E501 - :return: The gram_weight of this BrandedFoodObjectPortions. + :return: The gram_weight of this IngredientObjectPortions. :rtype: float """ return self._gram_weight @gram_weight.setter def gram_weight(self, gram_weight: float): - """Sets the gram_weight of this BrandedFoodObjectPortions. + """Sets the gram_weight of this IngredientObjectPortions. The weight of the measure in grams # noqa: E501 - :param gram_weight: The gram_weight of this BrandedFoodObjectPortions. + :param gram_weight: The gram_weight of this IngredientObjectPortions. :type gram_weight: float """ @@ -159,22 +159,22 @@ def gram_weight(self, gram_weight: float): @property def data_points(self) -> int: - """Gets the data_points of this BrandedFoodObjectPortions. + """Gets the data_points of this IngredientObjectPortions. The number of observations on which the measure is based # noqa: E501 - :return: The data_points of this BrandedFoodObjectPortions. + :return: The data_points of this IngredientObjectPortions. :rtype: int """ return self._data_points @data_points.setter def data_points(self, data_points: int): - """Sets the data_points of this BrandedFoodObjectPortions. + """Sets the data_points of this IngredientObjectPortions. The number of observations on which the measure is based # noqa: E501 - :param data_points: The data_points of this BrandedFoodObjectPortions. + :param data_points: The data_points of this IngredientObjectPortions. :type data_points: int """ @@ -182,22 +182,22 @@ def data_points(self, data_points: int): @property def footnote(self) -> str: - """Gets the footnote of this BrandedFoodObjectPortions. + """Gets the footnote of this IngredientObjectPortions. Comments on any unusual aspects of the measure. Examples might includes caveats on the usage of a measure, or reasons why a measure gram weight is an unexpected value. # noqa: E501 - :return: The footnote of this BrandedFoodObjectPortions. + :return: The footnote of this IngredientObjectPortions. :rtype: str """ return self._footnote @footnote.setter def footnote(self, footnote: str): - """Sets the footnote of this BrandedFoodObjectPortions. + """Sets the footnote of this IngredientObjectPortions. Comments on any unusual aspects of the measure. Examples might includes caveats on the usage of a measure, or reasons why a measure gram weight is an unexpected value. # noqa: E501 - :param footnote: The footnote of this BrandedFoodObjectPortions. + :param footnote: The footnote of this IngredientObjectPortions. :type footnote: str """ diff --git a/swagger_server/swagger/swagger.yaml b/swagger_server/swagger/swagger.yaml index 307dee3..b3a3b20 100644 --- a/swagger_server/swagger/swagger.yaml +++ b/swagger_server/swagger/swagger.yaml @@ -1,25 +1,29 @@ openapi: 3.0.0 info: title: Chomp Food Database API Documentation - description: "__Important:__\n - An __[API key](https://chompthis.com/api/)__ is\ - \ required for access to this API.\n - Get yours at __[https://chompthis.com/api](https://chompthis.com/api/)__.\n\ - \n-----\n\n__Getting Started:__\n - __[Subscribe](https://chompthis.com/api/#pricing)__\ - \ to the API.\n - Scroll down and click the \"__Authorize__\" button.\n - Enter\ - \ your API key into the \"__value__\" input, click the \"__Authorize__\" button,\ - \ then click the \"__Close__\" button.\n - Scroll down to the section titled\ - \ \"__default__\" and click on the API endpoint you wish to use.\n - Click the\ - \ \"__Try it out__\" button.\n - Enter the information the endpoint requires.\n\ - \ - Click the \"__Execute__\" button.\n\n__Example:__ \n - __[View example](https://raw.githubusercontent.com/chompfoods/examples/master/response-object.json)__\ - \ API response object.\n\n-----\n\n__How Do I Find My API Key?__\n - Your API\ - \ key was sent to the email address you used to create your subscription.\n -\ - \ You will also find your API key in the __[Client Center](https://chompthis.com/api/manage.php)__.\n\ - \ - _Read __[this article](https://desk.zoho.com/portal/chompthis/kb/articles/how-do-i-find-my-api-key)__\ - \ for more information._\n\n|||\n| ------- | -------- |\n| [Knowledge Base](https://desk.zoho.com/portal/chompthis/kb/chomp)\ - \ | [Pricing](https://chompthis.com/api/) |\n| [Attribution](https://chompthis.com/api/docs/attribution.php)\ - \ | [Cost Calculator](https://chompthis.com/api/cost-calculator.php) |\n| [Terms\ - \ & License](https://chompthis.com/api/terms.php) | [Database Search](https://chompthis.com/api/lookup.php)\ - \ |\n| [Support](https://chompthis.com/api/ticket-new.php) | [Query Builder](https://chompthis.com/api/build.php)\ - \ |\n| [Client Center](https://chompthis.com/api/manage.php) | |\n" + description: "## Important\nAn **[API key](https://chompthis.com/api/)** is required\ + \ for access to this API. Get yours at **[https://chompthis.com/api](https://chompthis.com/api/)**.\n\ + \n### Getting Started\n * **[Subscribe](https://chompthis.com/api/#pricing)**\ + \ to the API.\n * Scroll down and click the \"**Authorize**\" button.\n * Enter\ + \ your API key into the \"**value**\" input, click the \"**Authorize**\" button,\ + \ then click the \"**Close**\" button.\n * Scroll down to the section titled\ + \ \"**default**\" and click on the API endpoint you wish to use.\n * Click the\ + \ \"**Try it out**\" button.\n * Enter the information the endpoint requires.\n\ + \ * Click the \"**Execute**\" button.\n\n### Example \n * Branded food response\ + \ object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/branded-food-response-object.json)**\n\ + \ * Ingredient response object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/ingredient-response-object.json)**\n\ + \ * Error response object: **[View example »](https://raw.githubusercontent.com/chompfoods/examples/master/error-response-object.json)**\n\ + \n### How Do I Find My API Key?\n * Your API key was sent to the email address\ + \ you used to create your subscription.\n * You will also find your API key in\ + \ the **[Client Center](https://chompthis.com/api/manage.php)**.\n * Read **[this\ + \ article](https://desk.zoho.com/portal/chompthis/kb/articles/how-do-i-find-my-api-key)**\ + \ for more information.\n\n### Helpful Links\n * **Help & Support**\n * [Knowledge\ + \ Base »](https://desk.zoho.com/portal/chompthis/kb/chomp)\n * [Support\ + \ »](https://chompthis.com/api/ticket-new.php)\n * [Client Center »](https://chompthis.com/api/manage.php)\n\ + \ * **Pricing**\n * [Subscription Options »](https://chompthis.com/api/)\n\ + \ * [Cost Calculator »](https://chompthis.com/api/cost-calculator.php)\n\ + \ * **Guidelines**\n * [Terms & License »](https://chompthis.com/api/terms.php)\n\ + \ * [Attribution »](https://chompthis.com/api/docs/attribution.php)\n" version: 1.0.0-oas3 servers: - url: https://chompthis.com/api/v2 @@ -28,110 +32,44 @@ paths: /food/branded/barcode.php: get: summary: Get a branded food item using a barcode - description: | - # Get data for a branded food using the food's UPC/EAN barcode. - - __Example:__ ```https://chompthis.com/api/v2/food/branded/barcode.php?api_key=API_KEY&code=CODE``` + description: "## Get data for a branded food using the food's UPC/EAN barcode.\n\ + \n**Example** \n> ```https://chompthis.com/api/v2/food/branded/barcode.php?api_key=API_KEY&code=CODE```\n\ + \n**Tips**\n * Read our **[Knowledge Base article](https://desk.zoho.com/portal/chompthis/kb/articles/im-having-trouble-getting-matches-for-barcodes-what-can-id-do)**\ + \ for helpful tips and tricks.\n" operationId: food_branded_barcode_php_get parameters: - name: code in: query description: | - UPC/EAN barcode - - __Example:__ 0842234000988 - - __Resources:__ [Database search](https://chompthis.com/api/lookup.php) - - _Read [this article](https://desk.zoho.com/portal/chompthis/kb/articles/im-having-trouble-getting-matches-for-barcodes-what-can-id-do) for tips and tricks._ - required: true - style: form - explode: true - schema: - type: string - responses: - "200": - description: __Valid__ - Will return an object containing any matching foods. - content: - application/json: - schema: - $ref: '#/components/schemas/BrandedFoodObject' - "400": - description: __Validation error__ - Invalid parameters or request. - "401": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. - _[More information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403": - description: __Forbidden__ - Disallowed entity. - "404": - description: __Not found__ - No food items exist that match your query parameters. - "500": - description: __Server error__ - Internal server error, request failed, or - base error. _[Contact us](https://chompthis.com/api/ticket-new.php) if - you see this._ - security: - - ApiKeyAuth: [] - x-openapi-router-controller: swagger_server.controllers.default_controller - /food/branded/id.php: - get: - summary: Get a branded food item using an ID number - description: | - # Get data for a branded food using Chomp's internal ID number. - - _Alternatively, set the "source" parameter to "USDA" and use the food's FDC ID._ - - __Example:__ ```https://chompthis.com/api/v2/food/branded/id.php?api_key=API_KEY&id=ID``` - operationId: food_branded_id_php_get - parameters: - - name: id - in: query - description: | - Chomp branded food ID. - - _Set "source=USDA" if you wish to pass in the food's FoodData Central ID (fdc_id)._ - - __Example #1:__ 15 + #### UPC/EAN barcode - __Resources:__ [Find branded food - IDs](https://chompthis.com/api/lookup.php) + **Example** + > ```&code=0842234000988``` required: true style: form explode: true - schema: - type: integer - - name: source - in: query - description: | - Specify the data source (optional). - - You must pass in "USDA" if you want to look up a food item using a USDA FDC ID. - - __Example:__ USDA _(defaults to "Chomp")_ - required: false - style: form - explode: true schema: type: string responses: "200": - description: __Valid__ - Will return an object containing any matching foods. + description: "**Valid** - Will return an object containing any matching\ + \ foods. \n" content: application/json: schema: $ref: '#/components/schemas/BrandedFoodObject' "400": - description: __Validation error__ - Invalid parameters or request. + description: | + **Validation error** - Invalid parameters or request. "401": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. - _[More information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403": - description: __Forbidden__ - Disallowed entity. + description: | + **Unauthorized** - Invalid API key, unauthorized access, or usage limits exceeded. ***[More information »](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)*** "404": - description: __Not found__ - No food items exist that match your query parameters. + description: | + **Not found** - No food items were found. "500": - description: __Server error__ - Internal server error, request failed, or - base error. _[Contact us](https://chompthis.com/api/ticket-new.php) if - you see this._ + description: | + **Server error** - Internal server error, request failed, or base error. *Please **[contact us](https://chompthis.com/api/ticket-new.php)** if you see this.* security: - ApiKeyAuth: [] x-openapi-router-controller: swagger_server.controllers.default_controller @@ -139,20 +77,24 @@ paths: get: summary: Get a branded food item by name description: | - # Search for branded food items by name. + ## Search for branded food items by name. + + **Example** + > ```https://chompthis.com/api/v2/food/branded/name.php?api_key=API_KEY&name=NAME``` - __Example:__ ```https://chompthis.com/api/v2/food/branded/name.php?api_key=API_KEY&name=NAME``` + **Tips** + * Get started by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. + + > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. operationId: food_branded_name_php_get parameters: - name: name in: query description: | - Branded food name - - __Example:__ Starburst + #### Search for branded food items using a general food name keyword. This does not have to exactly match the "official" name for the food. - __Resources:__ [Find branded food - names](https://chompthis.com/api/lookup.php) + **Example** + > ```&name=Starburst``` required: true style: form explode: true @@ -161,11 +103,10 @@ paths: - name: limit in: query description: | - Set maximum number of records you want the API to return. + #### Set maximum number of records you want the API to return. The default value is "**10**." - ___Note:__ The maximum value is 10._ - - __Example:__ 3 _(defaults to 10)_ + **Example** + > ```&limit=10``` required: false style: form explode: true @@ -182,49 +123,62 @@ paths: - 8 - 9 - 10 + - name: page + in: query + description: | + #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is "**1**." + + **Example** + > ```&page=1``` + required: false + style: form + explode: true + schema: + type: integer responses: "200": - description: __Valid__ - Will return an object containing any matching foods. + description: "**Valid** - Will return an object containing any matching\ + \ foods. \n" content: application/json: schema: $ref: '#/components/schemas/BrandedFoodObject' "400": - description: __Validation error__ - Invalid parameters or request. + description: | + **Validation error** - Invalid parameters or request. "401": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. - _[More information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403": - description: __Forbidden__ - Disallowed entity. + description: | + **Unauthorized** - Invalid API key, unauthorized access, or usage limits exceeded. ***[More information »](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)*** "404": - description: __Not found__ - No food items exist that match your query parameters. + description: | + **Not found** - No food items were found. "500": - description: __Server error__ - Internal server error, request failed, or - base error. _[Contact us](https://chompthis.com/api/ticket-new.php) if - you see this._ + description: | + **Server error** - Internal server error, request failed, or base error. *Please **[contact us](https://chompthis.com/api/ticket-new.php)** if you see this.* security: - ApiKeyAuth: [] x-openapi-router-controller: swagger_server.controllers.default_controller /food/branded/search.php: get: summary: Get data for branded food items using various search parameters - description: | - # Search for branded food items using various parameters. - - __Example:__ ```https://chompthis.com/api/v2/food/branded/search.php?api_key=API_KEY&brand=BRAND&country=COUNTRY&page=1``` - - ___Tip:__ Get started by using the [Query Builder](https://chompthis.com/api/build.php)._ + description: "## Search for branded food items using various parameters.\n\n\ + **Example**\n> ```https://chompthis.com/api/v2/food/branded/search.php?api_key=API_KEY&brand=BRAND&country=COUNTRY&page=1```\n\ + \n**Tips** \n * Get started by using the **[Query Builder](https://chompthis.com/api/build.php)**.\n\ + \n> This API endpoint is only available to Standard and Premium API subscribers.\ + \ Please consider upgrading your subscription if you are subscribed to the\ + \ Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)**\ + \ if you aren't sure how to upgrade your subscription.\n" operationId: food_branded_search_php_get parameters: - name: allergen in: query description: | - Specify a required allergen ingredient (optional) + #### Filter the search to only include branded foods that contain a specific allergen. - __Example__: Peanuts + **Example** + > ```&allergen=Peanuts``` - __Resources__: [List of - allergens](https://chompthis.com/api/data/allergen.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true @@ -233,12 +187,10 @@ paths: - name: brand in: query description: | - Specify a required brand (optional) - - __Example__: Starbucks + #### Filter the search to only include branded foods that are owned by a specific brand. - __Resources__: [List of - brands](https://chompthis.com/api/data/brand.php) + **Example** + > ```&brand=Starbucks``` required: false style: form explode: true @@ -247,12 +199,10 @@ paths: - name: category in: query description: | - Specify a required category (optional) + #### Filter the search to only include branded foods from a specific category. - __Example__: Pasta Dishes - - __Resources__: [List of - categories](https://chompthis.com/api/data/category.php) + **Example** + > ```&category=Plant Based Foods``` required: false style: form explode: true @@ -261,12 +211,12 @@ paths: - name: country in: query description: | - Specify a required country (optional) + #### Filter the search to only include branded foods that are sold in a specific country. - __Example__: United States + **Example** + > ```&country=United States``` - __Resources__: [List of - countries](https://chompthis.com/api/data/country.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true @@ -275,28 +225,25 @@ paths: - name: diet in: query description: | - Specify a required diet (optional) - - _Filters the search to only include food items that are considered compatible with the following diets: Vegan, Vegetarian, Gluten Free_ + #### Filter the search to only include branded foods that are considered compatible with a specific diet. - __Example__: Gluten Free - - __Resources__: [List of - diets](https://chompthis.com/api/data/lifestyle.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true schema: type: string + enum: + - Vegan + - Vegetarian + - Gluten Free - name: ingredient in: query description: | - Specify a required ingredient (optional) + #### Filter the search to only include branded foods that contain a specific ingredient. - __Example__: Salt - - __Resources__: [List of - ingredients](https://chompthis.com/api/data/ingredient.php) + **Example** + > ```&ingredient=Salt``` required: false style: form explode: true @@ -305,12 +252,12 @@ paths: - name: keyword in: query description: | - Specify a required keyword (optional) + #### Filter the search to only include branded foods that are associated with a specific keyword. - __Example__: Starbucks + **Example** + > ```&keyword=Organic``` - __Resources__: [List of - brands](https://chompthis.com/api/data/brand.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true @@ -319,12 +266,10 @@ paths: - name: mineral in: query description: | - Specify a required mineral (optional) - - __Example__: Potassium + #### Filter the search to only include branded foods that contain a specific mineral. - __Resources__: [List of - minerals](https://chompthis.com/api/data/mineral.php) + **Example** + > ```&mineral=Potassium``` required: false style: form explode: true @@ -333,12 +278,12 @@ paths: - name: nutrient in: query description: | - Specify a required nutrition label item (optional) + #### Filter the search to only include branded foods that contain a specific nutrient. - __Example__: Caffeine + **Example** + > ```&nutrient=Caffeine``` - __Resources__: [List of nutrition label - items](https://chompthis.com/api/data/nutrition.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true @@ -347,12 +292,10 @@ paths: - name: palm_oil in: query description: | - Specify a required palm oil ingredient (optional) + #### Filter the search to only include branded foods that contain a specific ingredient made using palm oil. - __Example__: E160a Beta Carotene - - __Resources__: [List of palm oil - ingredients](https://chompthis.com/api/data/palm-oil.php) + **Example** + > ```&palm_oil=E160a Beta Carotene``` required: false style: form explode: true @@ -361,12 +304,12 @@ paths: - name: trace in: query description: | - Specify a required trace ingredient (optional) + ### Filter the search to only include branded foods that contain a specific trace ingredient. - __Example__: Tree Nuts + **Example** + > ```&trace=Tree Nuts``` - __Resources__: [List of trace - ingredients](https://chompthis.com/api/data/trace.php) + **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. required: false style: form explode: true @@ -375,12 +318,10 @@ paths: - name: vitamin in: query description: | - Specify a required vitamin (optional) - - __Example__: Biotin + #### Filter the search to only include branded foods that contain a specific vitamin. - __Resources__: [List of - vitamins](https://chompthis.com/api/data/vitamin.php) + **Example** + > ```&vitamin=Biotin``` required: false style: form explode: true @@ -389,11 +330,10 @@ paths: - name: limit in: query description: | - Set maximum number of records you want the API to return. + #### Set maximum number of records you want the API to return. The default value is "**10**." - ___Note:__ The maximum value is 10._ - - __Example:__ 3 _(defaults to 10)_ + **Example** + > ```&limit=10``` required: false style: form explode: true @@ -413,11 +353,10 @@ paths: - name: page in: query description: | - Specify the search response page number. - - _Each page will contain up to 10 items._ + #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is "**1**." - __Example__: 1 _(default)_ + **Example** + > ```&page=1``` required: false style: form explode: true @@ -425,85 +364,65 @@ paths: type: integer responses: "200": - description: __Valid__ - Will return an object containing any matching foods. + description: "**Valid** - Will return an object containing any matching\ + \ foods. \n" content: application/json: schema: $ref: '#/components/schemas/BrandedFoodObject' "400": - description: __Validation error__ - Invalid parameters or request. + description: | + **Validation error** - Invalid parameters or request. "401": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. - _[More information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403": - description: __Forbidden__ - Disallowed entity. + description: | + **Unauthorized** - Invalid API key, unauthorized access, or usage limits exceeded. ***[More information »](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)*** "404": - description: __Not found__ - No food items exist that match your query parameters. + description: | + **Not found** - No food items were found. "500": - description: __Server error__ - Internal server error, request failed, or - base error. _[Contact us](https://chompthis.com/api/ticket-new.php) if - you see this._ + description: | + **Server error** - Internal server error, request failed, or base error. *Please **[contact us](https://chompthis.com/api/ticket-new.php)** if you see this.* security: - ApiKeyAuth: [] x-openapi-router-controller: swagger_server.controllers.default_controller - /ingredient/search.php: + /food/ingredient/search.php: get: summary: Get raw/generic food ingredient item(s) description: | - # Get data for a specific ingredient or a specific set of ingredients. + ## Get data for a specific ingredient or a specific set of ingredients. - __Example:__ ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=STRING/LIST&list=BOOLEAN&raw=BOOLEAN``` - operationId: ingredient_search_php_get - parameters: - - name: find - in: query - description: | - Specify the ingredient name(s). + **Example #1: Single Ingredient** + > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli``` - __Example #1:__ broccoli + **Example #2: Set of Ingredients** + > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli,mashed potatoes,chicken drumstick``` - __Example #2:__ broccoli,cauliflower,spinach + **Tips** + * Expose ingredient endpoints by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. - ___Important Note:__ Set the "is_list" parameter to true before passing in a comma-separated list of ingredients._ - required: true - style: form - explode: true - schema: - type: integer - - name: list + > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. + operationId: food_ingredient_search_php_get + parameters: + - name: find in: query - description: | - Specify if you are searching for multiple ingredients. - - _Setting this to true will configure this endpoint so that it accepts a comma-separated list of ingredients._ - - _By default, this endpoint expects a single ingredient._ - - __Example:__ true _(defaults to false)_ + description: "Search our database for a single ingredient or a specific set\ + \ of ingredients.\n\n**Example #1: Single Ingredient**\n> ```&find=raw broccoli```\n\ + \n**Example #2: Set of Ingredients**\n> ```&find=raw broccoli,buttermilk\ + \ waffle,mashed potatoes```\n\n**Important Notes** \n * Comma-separated\ + \ lists cannot contain more than **10 ingredients**. You must perform additional\ + \ API calls if you are looking up more than 10 ingredients.\n" required: true style: form explode: true schema: - type: boolean - - name: raw - in: query - description: | - Specify if you only want data for raw ingredients. - - __Example:__ true _(defaults to true)_ - required: false - style: form - explode: true - schema: - type: boolean + type: string - name: limit in: query description: | - Set maximum number of records you want the API to return. - - ___Important Note:__ Setting this to "1" will return 1 record per search term._ + #### Set maximum number of records you want the API to return, per search term. The default value is "**1**." - __Example:__ 1 _(defaults to 1, max is 3)_ + **Example** + > ```&limit=3``` required: false style: form explode: true @@ -515,25 +434,24 @@ paths: - 3 responses: "200": - description: __Valid__ - Will return an object containing any matching ingredient - foods. + description: "**Valid** - Will return an object containing any matching\ + \ ingredient foods. \n" content: application/json: schema: $ref: '#/components/schemas/IngredientObject' "400": - description: __Validation error__ - Invalid parameters or request. + description: | + **Validation error** - Invalid parameters or request. "401": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. - _[More information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403": - description: __Forbidden__ - Disallowed entity. + description: | + **Unauthorized** - Invalid API key, unauthorized access, or usage limits exceeded. ***[More information »](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)*** "404": - description: __Not found__ - No food items exist that match your query parameters. + description: | + **Not found** - No food items were found. "500": - description: __Server error__ - Internal server error, request failed, or - base error. _[Contact us](https://chompthis.com/api/ticket-new.php) if - you see this._ + description: | + **Server error** - Internal server error, request failed, or base error. *Please **[contact us](https://chompthis.com/api/ticket-new.php)** if you see this.* security: - ApiKeyAuth: [] x-openapi-router-controller: swagger_server.controllers.default_controller @@ -549,76 +467,68 @@ components: items: $ref: '#/components/schemas/BrandedFoodObject_items' description: Please read the description of each field in this API response - object example. By default, the value of each field is __null__. This indicates + object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists. example: items: - minerals: - minerals - minerals - components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true + package: + quantity: 0 + size: size keywords: - keywords - keywords country_details: - english_speaking: 2 - non_english_speaking: 6 + english_speaking: 7 + non_english_speaking: 1 + traces: + - traces + - traces description: description + diet_flags: + - ingredient: ingredient + is_allergen: true + ingredient_description: ingredient_description + compatibility_level: 4 + is_compatible: is_compatible + diet_label: diet_label + compatibility_description: compatibility_description + - ingredient: ingredient + is_allergen: true + ingredient_description: ingredient_description + compatibility_level: 4 + is_compatible: is_compatible + diet_label: diet_label + compatibility_description: compatibility_description + countries: + - countries + - countries has_english_ingredients: true palm_oil_ingredients: - palm_oil_ingredients - palm_oil_ingredients serving: - total: 5 size_fulltext: size_fulltext - size: 1 + size: size measurement_unit: measurement_unit nutrients: - chomp: - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - protein_conversion_factor: 7.4577447736837658709418974467553198337554931640625 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + allergens: + - allergens + - allergens packaging_photos: nutrition: small: small @@ -632,150 +542,99 @@ components: small: small thumb: thumb display: display + ingredient_list: + - ingredient_list + - ingredient_list + vitamins: + - vitamins + - vitamins diet_labels: vegetarian: confidence_description: confidence_description confidence: 9 name: name - compatibility_level: 5 + compatibility_level: 7 is_compatible: true vegan: confidence_description: confidence_description - confidence: 4 + confidence: 2 name: name - compatibility_level: 1 + compatibility_level: 5 is_compatible: true gluten_free: confidence_description: confidence_description - confidence: 6 + confidence: 2 name: name - compatibility_level: 9 + compatibility_level: 3 is_compatible: true + name: name ingredients: ingredients categories: - categories - categories - common_name: common_name barcode: barcode brand: brand - portions: - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote + brand_list: + - brand_list + - brand_list + - minerals: + - minerals + - minerals package: quantity: 0 - size: 6 + size: size + keywords: + - keywords + - keywords + country_details: + english_speaking: 7 + non_english_speaking: 1 traces: - traces - traces + description: description diet_flags: - ingredient: ingredient is_allergen: true ingredient_description: ingredient_description - compatibility_level: 8 + compatibility_level: 4 is_compatible: is_compatible diet_label: diet_label compatibility_description: compatibility_description - ingredient: ingredient is_allergen: true ingredient_description: ingredient_description - compatibility_level: 8 + compatibility_level: 4 is_compatible: is_compatible diet_label: diet_label compatibility_description: compatibility_description countries: - countries - countries - footnote: footnote - allergens: - - allergens - - allergens - calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 - ingredient_list: - - ingredient_list - - ingredient_list - name: name - brand_list: - - brand_list - - brand_list - - minerals: - - minerals - - minerals - components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true - keywords: - - keywords - - keywords - country_details: - english_speaking: 2 - non_english_speaking: 6 - description: description has_english_ingredients: true palm_oil_ingredients: - palm_oil_ingredients - palm_oil_ingredients serving: - total: 5 size_fulltext: size_fulltext - size: 1 + size: size measurement_unit: measurement_unit nutrients: - chomp: - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - protein_conversion_factor: 7.4577447736837658709418974467553198337554931640625 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + allergens: + - allergens + - allergens packaging_photos: nutrition: small: small @@ -789,81 +648,38 @@ components: small: small thumb: thumb display: display + ingredient_list: + - ingredient_list + - ingredient_list + vitamins: + - vitamins + - vitamins diet_labels: vegetarian: confidence_description: confidence_description confidence: 9 name: name - compatibility_level: 5 + compatibility_level: 7 is_compatible: true vegan: confidence_description: confidence_description - confidence: 4 + confidence: 2 name: name - compatibility_level: 1 + compatibility_level: 5 is_compatible: true gluten_free: confidence_description: confidence_description - confidence: 6 + confidence: 2 name: name - compatibility_level: 9 + compatibility_level: 3 is_compatible: true + name: name ingredients: ingredients categories: - categories - categories - common_name: common_name barcode: barcode brand: brand - portions: - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote - package: - quantity: 0 - size: 6 - traces: - - traces - - traces - diet_flags: - - ingredient: ingredient - is_allergen: true - ingredient_description: ingredient_description - compatibility_level: 8 - is_compatible: is_compatible - diet_label: diet_label - compatibility_description: compatibility_description - - ingredient: ingredient - is_allergen: true - ingredient_description: ingredient_description - compatibility_level: 8 - is_compatible: is_compatible - diet_label: diet_label - compatibility_description: compatibility_description - countries: - - countries - - countries - footnote: footnote - allergens: - - allergens - - allergens - calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 - ingredient_list: - - ingredient_list - - ingredient_list - name: name brand_list: - brand_list - brand_list @@ -877,165 +693,123 @@ components: items: $ref: '#/components/schemas/IngredientObject_items' description: Please read the description of each field in this API response - object example. By default, the value of each field is __null__. This indicates + object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists. example: items: - - protein_conversion_factor: 0.80082819046101150206595775671303272247314453125 + - protein_conversion_factor: 2.027123023002321833274663731572218239307403564453125 + score: score calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 + carbohydrate_value: 3.61607674925191080461672754609026014804840087890625 + protein_value: 7.061401241503109105224211816675961017608642578125 + fat_value: 9.301444243932575517419536481611430644989013671875 components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - diet_labels: - vegetarian: - confidence_description: confidence_description - confidence: 9 - name: name - compatibility_level: 5 - is_compatible: true - vegan: - confidence_description: confidence_description - confidence: 4 - name: name - compatibility_level: 1 - is_compatible: true - gluten_free: - confidence_description: confidence_description - confidence: 6 - name: name - compatibility_level: 9 - is_compatible: true name: name - description: description + search_term: search_term categories: - categories - categories footnote: footnote common_name: common_name nutrients: - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote portions: - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote - - protein_conversion_factor: 0.80082819046101150206595775671303272247314453125 + - protein_conversion_factor: 2.027123023002321833274663731572218239307403564453125 + score: score calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 + carbohydrate_value: 3.61607674925191080461672754609026014804840087890625 + protein_value: 7.061401241503109105224211816675961017608642578125 + fat_value: 9.301444243932575517419536481611430644989013671875 components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - diet_labels: - vegetarian: - confidence_description: confidence_description - confidence: 9 - name: name - compatibility_level: 5 - is_compatible: true - vegan: - confidence_description: confidence_description - confidence: 4 - name: name - compatibility_level: 1 - is_compatible: true - gluten_free: - confidence_description: confidence_description - confidence: 6 - name: name - compatibility_level: 9 - is_compatible: true name: name - description: description + search_term: search_term categories: - categories - categories footnote: footnote common_name: common_name nutrients: - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote portions: - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote @@ -1046,65 +820,33 @@ components: type: integer description: Package quantity size: - type: integer + type: string description: Package size description: An object containing basic packaging information about this item example: quantity: 0 - size: 6 + size: size BrandedFoodObject_serving: type: object properties: size: - type: integer + type: string description: Serving size measurement_unit: type: string - description: Serving measurement unit (e.g. if measure is 3 tsp, the unit - is tsp) + description: Measurement unit for each serving (e.g. if measure is 3 tsp, + the unit is tsp) size_fulltext: type: string description: Serving size description - total: - type: integer - description: Total servings description: An object containing serving information for this item example: - total: 5 size_fulltext: size_fulltext - size: 1 - measurement_unit: measurement_unit - BrandedFoodObject_nutrients_chomp: - type: object - properties: - name: - type: string - description: Nutrient name - measurement_unit: - type: string - description: The unit used for measure (e.g. if mesure is 3 tsp, the unit - is tsp) - per_100g: - type: number - description: Amount of the nutrient per 100g of food - per_serving: - type: number - description: Nutrient value per serving - total: - type: number - description: Total nutrient value - example: - total: 7.061401241503109105224211816675961017608642578125 - name: name + size: size measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - BrandedFoodObject_nutrients_usda: + BrandedFoodObject_nutrients: type: object properties: - id: - type: integer - description: Nutrient ID name: type: string description: Nutrient name @@ -1114,108 +856,24 @@ components: measurement_unit: type: string description: The unit used for the measure of this nutrient - min: - type: number - description: Minimum nutrient value - max: - type: number - description: Maximum nutrient value - median: - type: number - description: Median nutrient value + rank: + type: integer + description: Nutrient rank data_points: type: integer description: Number of observations on which the value is based - footnote: - type: string - description: Comments on any unusual aspect of the food nutrient. Examples - might include why a nutrient value is different than typically expected. - source: - type: string - description: Description of the nutrient source description: type: string - description: Description of how the food nutrient value was obtained + description: Description of the nutrient source + description: An object containing information for a specific nutrient found + in this food item example: - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 + data_points: 5 name: name measurement_unit: measurement_unit + rank: 1 description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - BrandedFoodObject_nutrients: - type: object - properties: - chomp: - type: array - description: An array containing an object for each nutrient data point - items: - $ref: '#/components/schemas/BrandedFoodObject_nutrients_chomp' - usda: - type: array - description: An array containing an object for each nutrient data point - as found in the USDA database - items: - $ref: '#/components/schemas/BrandedFoodObject_nutrients_usda' - description: An object containing nutrient information from multiple sources - example: - chomp: - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - BrandedFoodObject_calorie_conversion_factor: - type: object - properties: - protein_value: - type: number - description: The multiplication factor for protein - fat_value: - type: number - description: The multiplication factor for fat - carbohydrate_value: - type: number - description: The multiplication factor for carbohydrates - description: An object containing the multiplication factors to be used when - calculating energy from macronutrients for a specific food. - example: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 + per_100g: 6.02745618307040320615897144307382404804229736328125 BrandedFoodObject_diet_labels_vegan: type: object properties: @@ -1240,9 +898,9 @@ components: the Vegan diets example: confidence_description: confidence_description - confidence: 4 + confidence: 2 name: name - compatibility_level: 1 + compatibility_level: 5 is_compatible: true BrandedFoodObject_diet_labels_vegetarian: type: object @@ -1270,7 +928,7 @@ components: confidence_description: confidence_description confidence: 9 name: name - compatibility_level: 5 + compatibility_level: 7 is_compatible: true BrandedFoodObject_diet_labels_gluten_free: type: object @@ -1296,9 +954,9 @@ components: Gluten Free diets example: confidence_description: confidence_description - confidence: 6 + confidence: 2 name: name - compatibility_level: 9 + compatibility_level: 3 is_compatible: true BrandedFoodObject_diet_labels: type: object @@ -1316,19 +974,19 @@ components: confidence_description: confidence_description confidence: 9 name: name - compatibility_level: 5 + compatibility_level: 7 is_compatible: true vegan: confidence_description: confidence_description - confidence: 4 + confidence: 2 name: name - compatibility_level: 1 + compatibility_level: 5 is_compatible: true gluten_free: confidence_description: confidence_description - confidence: 6 + confidence: 2 name: name - compatibility_level: 9 + compatibility_level: 3 is_compatible: true BrandedFoodObject_diet_flags: type: object @@ -1363,7 +1021,7 @@ components: ingredient: ingredient is_allergen: true ingredient_description: ingredient_description - compatibility_level: 8 + compatibility_level: 4 is_compatible: is_compatible diet_label: diet_label compatibility_description: compatibility_description @@ -1441,69 +1099,6 @@ components: small: small thumb: thumb display: display - BrandedFoodObject_components: - type: object - properties: - name: - type: string - description: The kind of component, e.g. bone - pct_weight: - type: number - description: The weight of the component as a percentage of the total weight - of the food - gram_weight: - type: number - description: The weight of the component in grams - is_refuse: - type: boolean - description: Whether the component is refuse, i.e. not edible - data_points: - type: integer - description: The number of obersvations on which the measure is based - description: An object containing information on a specific component of this - food item - example: - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true - BrandedFoodObject_portions: - type: object - properties: - measurement_unit: - type: string - description: The unit used for measure (e.g. if mesure is 3 tsp, the unit - is tsp) - description: - type: string - description: Comments that provide more specificity on the measure. For - example, for a pizza measure the dissemination text might be 1 slice is - 1/8th of a 14 inch pizza. - modifier: - type: string - description: Qualifier of the measure (e.g. related to food shape or form) - (e.g. melted, crushed, diced) - gram_weight: - type: number - description: The weight of the measure in grams - data_points: - type: integer - description: The number of observations on which the measure is based - footnote: - type: string - description: Comments on any unusual aspects of the measure. Examples might - includes caveats on the usage of a measure, or reasons why a measure gram - weight is an unexpected value. - description: An object containing information on a specific food portion found - in this item - example: - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote BrandedFoodObject_country_details: type: object properties: @@ -1518,8 +1113,8 @@ components: description: An object containing additional information on the countries where this item is found example: - english_speaking: 2 - non_english_speaking: 6 + english_speaking: 7 + non_english_speaking: 1 BrandedFoodObject_items: type: object properties: @@ -1534,7 +1129,7 @@ components: description: The brand name that owns this item ingredients: type: string - description: Ingredients in order of highest value to least + description: This food item's ingredients from greatest quantity to least package: $ref: '#/components/schemas/BrandedFoodObject_package' serving: @@ -1545,12 +1140,11 @@ components: type: string description: An array of categories for this item nutrients: - $ref: '#/components/schemas/BrandedFoodObject_nutrients' - calorie_conversion_factor: - $ref: '#/components/schemas/BrandedFoodObject_calorie_conversion_factor' - protein_conversion_factor: - type: number - description: The multiplication factor used to calculate protein from nitrogen + type: array + description: An array containing nutrient informatio objects for this food + item + items: + $ref: '#/components/schemas/BrandedFoodObject_nutrients' diet_labels: $ref: '#/components/schemas/BrandedFoodObject_diet_labels' diet_flags: @@ -1561,18 +1155,6 @@ components: $ref: '#/components/schemas/BrandedFoodObject_diet_flags' packaging_photos: $ref: '#/components/schemas/BrandedFoodObject_packaging_photos' - components: - type: array - description: An array of objects containing the constituent parts of a food - (e.g. bone is a component of meat) - items: - $ref: '#/components/schemas/BrandedFoodObject_components' - portions: - type: array - description: An array of objects containing information on discrete amounts - of a food found in this item - items: - $ref: '#/components/schemas/BrandedFoodObject_portions' allergens: type: array description: An array of ingredients in this item that may cause allergic @@ -1616,11 +1198,11 @@ components: description: An array of trace ingredients that may be found in this item items: type: string - common_name: - type: string - description: Common names associated with this item. These generally clarify - what the item is (e.g. when the brand name is "BRAND's Spicy Enchilada" - the common name may be "Chicken enchilada") + vitamins: + type: array + description: An array of vitamins that are found in this item + items: + type: string description: type: string description: A description of this item @@ -1629,78 +1211,66 @@ components: description: An array of keywords that can be used to describe this item items: type: string - footnote: - type: string - description: Comments on any unusual aspects of this item. Examples might - include unusual aspects of the food overall. description: An object containing information for this specific item. example: minerals: - minerals - minerals - components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 - name: name - is_refuse: true + package: + quantity: 0 + size: size keywords: - keywords - keywords country_details: - english_speaking: 2 - non_english_speaking: 6 + english_speaking: 7 + non_english_speaking: 1 + traces: + - traces + - traces description: description + diet_flags: + - ingredient: ingredient + is_allergen: true + ingredient_description: ingredient_description + compatibility_level: 4 + is_compatible: is_compatible + diet_label: diet_label + compatibility_description: compatibility_description + - ingredient: ingredient + is_allergen: true + ingredient_description: ingredient_description + compatibility_level: 4 + is_compatible: is_compatible + diet_label: diet_label + compatibility_description: compatibility_description + countries: + - countries + - countries has_english_ingredients: true palm_oil_ingredients: - palm_oil_ingredients - palm_oil_ingredients serving: - total: 5 size_fulltext: size_fulltext - size: 1 + size: size measurement_unit: measurement_unit nutrients: - chomp: - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - - total: 7.061401241503109105224211816675961017608642578125 - name: name - measurement_unit: measurement_unit - per_100g: 5.63737665663332876420099637471139430999755859375 - per_serving: 2.3021358869347654518833223846741020679473876953125 - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - protein_conversion_factor: 7.4577447736837658709418974467553198337554931640625 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + - data_points: 5 + name: name + measurement_unit: measurement_unit + rank: 1 + description: description + per_100g: 6.02745618307040320615897144307382404804229736328125 + allergens: + - allergens + - allergens packaging_photos: nutrition: small: small @@ -1714,118 +1284,169 @@ components: small: small thumb: thumb display: display + ingredient_list: + - ingredient_list + - ingredient_list + vitamins: + - vitamins + - vitamins diet_labels: vegetarian: confidence_description: confidence_description confidence: 9 name: name - compatibility_level: 5 + compatibility_level: 7 is_compatible: true vegan: confidence_description: confidence_description - confidence: 4 + confidence: 2 name: name - compatibility_level: 1 + compatibility_level: 5 is_compatible: true gluten_free: confidence_description: confidence_description - confidence: 6 + confidence: 2 name: name - compatibility_level: 9 + compatibility_level: 3 is_compatible: true + name: name ingredients: ingredients categories: - categories - categories - common_name: common_name barcode: barcode brand: brand - portions: - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote - - data_points: 1 - modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 - measurement_unit: measurement_unit - description: description - footnote: footnote - package: - quantity: 0 - size: 6 - traces: - - traces - - traces - diet_flags: - - ingredient: ingredient - is_allergen: true - ingredient_description: ingredient_description - compatibility_level: 8 - is_compatible: is_compatible - diet_label: diet_label - compatibility_description: compatibility_description - - ingredient: ingredient - is_allergen: true - ingredient_description: ingredient_description - compatibility_level: 8 - is_compatible: is_compatible - diet_label: diet_label - compatibility_description: compatibility_description - countries: - - countries - - countries - footnote: footnote - allergens: - - allergens - - allergens - calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 - ingredient_list: - - ingredient_list - - ingredient_list - name: name brand_list: - brand_list - brand_list IngredientObject_nutrients: type: object properties: - usda: - type: array - description: An array containing an object for each nutrient data point - as found in the USDA database - items: - $ref: '#/components/schemas/BrandedFoodObject_nutrients_usda' - description: An object containing nutrient information from each source + name: + type: string + description: Nutrient name + per_100g: + type: number + description: Amount of the nutrient per 100g of food + measurement_unit: + type: string + description: The unit used for the measure of this nutrient + min: + type: number + description: Minimum nutrient value + max: + type: number + description: Maximum nutrient value + median: + type: number + description: Median nutrient value + rank: + type: integer + description: Nutrient rank + data_points: + type: integer + description: Number of observations on which the value is based + footnote: + type: string + description: Comments on any unusual aspect of the food nutrient. Examples + might include why a nutrient value is different than typically expected. + description: + type: string + description: Description of the nutrient source + description: An object containing information for a specific nutrient found + in this food item example: - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source + data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote + IngredientObject_calorie_conversion_factor: + type: object + properties: + protein_value: + type: number + description: The multiplication factor for protein + fat_value: + type: number + description: The multiplication factor for fat + carbohydrate_value: + type: number + description: The multiplication factor for carbohydrates + description: An object containing the multiplication factors to be used when + calculating energy from macronutrients for a specific food. + example: + carbohydrate_value: 3.61607674925191080461672754609026014804840087890625 + protein_value: 7.061401241503109105224211816675961017608642578125 + fat_value: 9.301444243932575517419536481611430644989013671875 + IngredientObject_components: + type: object + properties: + name: + type: string + description: The kind of component, e.g. bone + pct_weight: + type: number + description: The weight of the component as a percentage of the total weight + of the food + gram_weight: + type: number + description: The weight of the component in grams + is_refuse: + type: boolean + description: Whether the component is refuse, i.e. not edible + data_points: + type: integer + description: The number of obersvations on which the measure is based + description: An object containing information on a specific component of this + food item + example: + data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 + name: name + is_refuse: true + IngredientObject_portions: + type: object + properties: + measurement_unit: + type: string + description: The unit used for measure (e.g. if mesure is 3 tsp, the unit + is tsp) + description: + type: string + description: Comments that provide more specificity on the measure. For + example, for a pizza measure the dissemination text might be 1 slice is + 1/8th of a 14 inch pizza. + modifier: + type: string + description: Qualifier of the measure (e.g. related to food shape or form) + (e.g. melted, crushed, diced) + gram_weight: + type: number + description: The weight of the measure in grams + data_points: + type: integer + description: The number of observations on which the measure is based + footnote: + type: string + description: Comments on any unusual aspects of the measure. Examples might + includes caveats on the usage of a measure, or reasons why a measure gram + weight is an unexpected value. + description: An object containing information on a specific food portion found + in this item + example: + data_points: 1 + modifier: modifier + gram_weight: 1.024645700144157789424070870154537260532379150390625 + measurement_unit: measurement_unit + description: description + footnote: footnote IngredientObject_items: type: object properties: @@ -1838,146 +1459,132 @@ components: type: string description: An array of categories for this item nutrients: - $ref: '#/components/schemas/IngredientObject_nutrients' + type: array + description: An array containing nutrient informatio objects for this food + item + items: + $ref: '#/components/schemas/IngredientObject_nutrients' calorie_conversion_factor: - $ref: '#/components/schemas/BrandedFoodObject_calorie_conversion_factor' + $ref: '#/components/schemas/IngredientObject_calorie_conversion_factor' protein_conversion_factor: type: number description: The multiplication factor used to calculate protein from nitrogen - diet_labels: - $ref: '#/components/schemas/BrandedFoodObject_diet_labels' components: type: array description: An array of objects containing the constituent parts of a food (e.g. bone is a component of meat) items: - $ref: '#/components/schemas/BrandedFoodObject_components' + $ref: '#/components/schemas/IngredientObject_components' portions: type: array description: An array of objects containing information on discrete amounts of a food found in this item items: - $ref: '#/components/schemas/BrandedFoodObject_portions' + $ref: '#/components/schemas/IngredientObject_portions' common_name: type: string - description: Common names associated with this item. These generally clarify + description: Common name associated with this item. These generally clarify what the item is (e.g. when the brand name is "BRAND's Spicy Enchilada" the common name may be "Chicken enchilada") - description: - type: string - description: A description of this item footnote: type: string description: Comments on any unusual aspects of this item. Examples might - include unusual aspects of the food overall. + include unusual aspects of the food overall + search_term: + type: string + description: The original search term that found this food item + score: + type: string + description: A value that represents how similar the name of this food item + is to the original search term. The lower the value the closer this item's + name is to the original search term. description: An object containing information for this specific item. example: - protein_conversion_factor: 0.80082819046101150206595775671303272247314453125 + protein_conversion_factor: 2.027123023002321833274663731572218239307403564453125 + score: score calorie_conversion_factor: - carbohydrate_value: 6.8468526983526398765889098285697400569915771484375 - protein_value: 1.024645700144157789424070870154537260532379150390625 - fat_value: 1.489415909854170383397331534069962799549102783203125 + carbohydrate_value: 3.61607674925191080461672754609026014804840087890625 + protein_value: 7.061401241503109105224211816675961017608642578125 + fat_value: 9.301444243932575517419536481611430644989013671875 components: - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - - data_points: 3 - pct_weight: 9.0183481860707832566959041287191212177276611328125 - gram_weight: 6.438423552598546706349225132726132869720458984375 + - data_points: 1 + pct_weight: 4.1456080298839363962315474054776132106781005859375 + gram_weight: 7.3862819483858839220147274318151175975799560546875 name: name is_refuse: true - diet_labels: - vegetarian: - confidence_description: confidence_description - confidence: 9 - name: name - compatibility_level: 5 - is_compatible: true - vegan: - confidence_description: confidence_description - confidence: 4 - name: name - compatibility_level: 1 - is_compatible: true - gluten_free: - confidence_description: confidence_description - confidence: 6 - name: name - compatibility_level: 9 - is_compatible: true name: name - description: description + search_term: search_term categories: - categories - categories footnote: footnote common_name: common_name nutrients: - usda: - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source - - data_points: 1 - min: 2.027123023002321833274663731572218239307403564453125 - median: 7.3862819483858839220147274318151175975799560546875 - max: 4.1456080298839363962315474054776132106781005859375 - name: name - measurement_unit: measurement_unit - description: description - id: 9 - per_100g: 3.61607674925191080461672754609026014804840087890625 - footnote: footnote - source: source + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote + - data_points: 2 + min: 6.02745618307040320615897144307382404804229736328125 + median: 5.962133916683182377482808078639209270477294921875 + max: 1.46581298050294517310021547018550336360931396484375 + name: name + measurement_unit: measurement_unit + rank: 5 + description: description + per_100g: 0.80082819046101150206595775671303272247314453125 + footnote: footnote portions: - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote - data_points: 1 modifier: modifier - gram_weight: 6.96511769763884558415156789124011993408203125 + gram_weight: 1.024645700144157789424070870154537260532379150390625 measurement_unit: measurement_unit description: description footnote: footnote responses: "200BrandedResponse": - description: __Valid__ - Will return an object containing any matching foods. + description: "**Valid** - Will return an object containing any matching foods.\ + \ \n" content: application/json: schema: $ref: '#/components/schemas/BrandedFoodObject' "200IngredientResponse": - description: __Valid__ - Will return an object containing any matching ingredient - foods. + description: "**Valid** - Will return an object containing any matching ingredient\ + \ foods. \n" content: application/json: schema: $ref: '#/components/schemas/IngredientObject' "400Error": - description: __Validation error__ - Invalid parameters or request. + description: | + **Validation error** - Invalid parameters or request. "401Error": - description: __Unauthorized__ - Invalid API key or usage limits exceeded. _[More - information](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)_ - "403Error": - description: __Forbidden__ - Disallowed entity. + description: | + **Unauthorized** - Invalid API key, unauthorized access, or usage limits exceeded. ***[More information »](https://desk.zoho.com/portal/chompthis/kb/articles/what-is-a-rate-limit)*** "404Error": - description: __Not found__ - No food items exist that match your query parameters. + description: | + **Not found** - No food items were found. "500Error": - description: __Server error__ - Internal server error, request failed, or base - error. _[Contact us](https://chompthis.com/api/ticket-new.php) if you see - this._ + description: | + **Server error** - Internal server error, request failed, or base error. *Please **[contact us](https://chompthis.com/api/ticket-new.php)** if you see this.* securitySchemes: ApiKeyAuth: type: apiKey diff --git a/swagger_server/test/test_default_controller.py b/swagger_server/test/test_default_controller.py index 5061a41..a5c68f4 100644 --- a/swagger_server/test/test_default_controller.py +++ b/swagger_server/test/test_default_controller.py @@ -26,27 +26,14 @@ def test_food_branded_barcode_php_get(self): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - def test_food_branded_id_php_get(self): - """Test case for food_branded_id_php_get - - Get a branded food item using an ID number - """ - query_string = [('id', 56), - ('source', 'source_example')] - response = self.client.open( - '/api/v2/food/branded/id.php', - method='GET', - query_string=query_string) - self.assert200(response, - 'Response body is : ' + response.data.decode('utf-8')) - def test_food_branded_name_php_get(self): """Test case for food_branded_name_php_get Get a branded food item by name """ query_string = [('name', 'name_example'), - ('limit', 56)] + ('limit', 56), + ('page', 56)] response = self.client.open( '/api/v2/food/branded/name.php', method='GET', @@ -80,17 +67,15 @@ def test_food_branded_search_php_get(self): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - def test_ingredient_search_php_get(self): - """Test case for ingredient_search_php_get + def test_food_ingredient_search_php_get(self): + """Test case for food_ingredient_search_php_get Get raw/generic food ingredient item(s) """ - query_string = [('find', 56), - ('list', true), - ('raw', true), + query_string = [('find', 'find_example'), ('limit', 56)] response = self.client.open( - '/api/v2/ingredient/search.php', + '/api/v2/food/ingredient/search.php', method='GET', query_string=query_string) self.assert200(response,