openfoodfacts 3.3.3 copy "openfoodfacts: ^3.3.3" to clipboard
openfoodfacts: ^3.3.3 copied to clipboard

Dart package for the Open Food Facts API, a food products database made by everyone, for everyone.

Changelog #

3.3.3 - 2024-01-31 #

Bug Fixes #

  • nutriment persize serving (#873) (31f9fab)
  • added added-sugars nutrient (#862)

3.3.2 - 2024-01-12 #

Bug Fixes #

  • unit test value + better json decode (#865) (565c0fa)

3.3.1 - 2024-01-07 #

Bug Fixes #

3.3.0 - 2023-12-24 #

Features #

  • 831 - Open Prices API - "get prices" (#845) (eaeb1aa)
  • simplified access to raw product images (#839) (3350251)

Bug Fixes #

  • If product.images is null, getProductImageIdsshouldn't crash (#857) (02abab3)
  • unit test with updated expected values (#858) (0482f63)

3.2.1 - 2023-12-03 #

Bug Fixes #

3.2.0 - 2023-11-28 #

Features #

  • 620 - autocomplete for all taxonomy names and fuzziness levels (#835) (046c418)
  • 620 - Elastic Search autocomplete for categories (#834) (1672f1a)
  • 836 - localizable and clickable server error (#837) (a40101c)
  • new field pageCount for searchResult (#823) (1d88bbf)
  • new localized product fields for generic name (#828) (a98cfcb)

Bug Fixes #

  • 829 - no more crash if the user name is not ASCII/ISO-8859-1 (#830) (8a23aee)

3.1.0 - 2023-10-28 #

Features #

  • 810 - 6 new localized product fields (#811) (df85a38)

Bug Fixes #

  • 816 - use localized versions of productName and ingredientsText (#817) (60f7d1e)

3.0.0 - 2023-09-30 #

⚠ BREAKING CHANGES #

  • 801 - more url flexibility with non static UriHelper (#803)
  • fix for the uk/gb country code case (#795)
  • A valid user agent is now required (#790)
  • removed deprecated code (#791)
  • 742 - robotoff - countries instead of country (#792)

Features #

  • 69 - method to get a server type from its off tag (#796) (0bd8f90)
  • 801 - more url flexibility with non static UriHelper (#803) (7753cb0)
  • 802 - new "get product" method specific to OBF OPF OPFF (#806) (e824de2)
  • A valid user agent is now required (#790) (a26ec2a)
  • insight - method to get an insight annotation from an int value (#797) (fdc6381)
  • method to get the Uri host (e.g. for ping) (#800) (081f0b9)
  • product "getAttribute" method (#799) (a179dc5)
  • specified minimum size for uploaded images (for pre-checks) (#798) (3cf14f2)

Bug Fixes #

2.10.1 - 2023-08-17 #

Bug Fixes #

  • reset password checks with languages (#787) (0fee449)

2.10.0 - 2023-08-12 #

Features #

  • Reset password: allow to receive "translated" email (#781) (a82a699)

Bug Fixes #

2.9.0 - 2023-08-09 #

Features #

  • Multipart requests: ensure to always get the full response (#779) (e53c7fd)

2.8.0 - 2023-08-08 #

Features #

  • Registration/Password lost: better catch 504 errors from the server (#777) (8cd4a35)

Bug Fixes #

2.7.4 - 2023-08-03 #

Bug Fixes #

  • 764 - upgraded sdk and http dependency (#770) (adcd147)

2.7.3 - 2023-07-20 #

Bug Fixes #

  • issue with converting LocalizedTags to JSON (#766) (80c3ddb)

2.7.2 - 2023-07-19 #

Bug Fixes #

  • issue with JSON conversion of packagings data (#762) (01c1d7b)

2.7.1 - 2023-07-12 #

Bug Fixes #

2.7.0 - 2023-07-12 #

Features #

  • Allow to pass insight_types to api/v1/questions/$barcode (#748) (cf9dd14)
  • Allow to pass a country and/or a language to the register user method (#754) (05c5c12)

Bug Fixes #

2.6.0 - 2023-06-14 #

Features #

2.5.2 - 2023-06-03 #

Bug Fixes #

  • "InsightAnnotation" with better enum syntax (#737) (30601b1)
  • new "KP action" enum (#730)

2.5.1 - 2023-05-21 #

Bug Fixes #

  • typo for mono and poly unsaturated fat tags (#732) (04b0f16)

2.5.0 - 2023-04-16 #

Features #

  • 719 - Suggestion Manager with suggestions for the latest input (#720) (5a31a09)

Bug Fixes #

  • 715 - downgraded "path" in order to match "flutter_test" (#725) (58d9a10)
  • Refactor Robotoff methods (#723) (7a71cbb)
  • robotoff deprecated method calls in tests (#724) (1cc8f18)

2.4.0 - 2023-03-08 #

Features #

Bug Fixes #

  • 712 - optional User parameter for get random robotoff questions (#713) (8ff23d2)

2.3.1 - 2023-02-18 #

Bug Fixes #

  • rollback to dart 2.17 / flutter 3.0.5 (#705) (5c15fd0)

2.3.0 - 2023-02-16 #

Features #

  • 695 - New API V3 suggestions for taxonomies (#696) (c0ffe94)
  • 699 - new class MatchedScoreV2 with better perf than MatchedProductV2 (#702) (5a3dba9)

2.2.1 - 2023-01-27 #

Bug Fixes #

2.2.0 - 2023-01-26 #

Features #

  • 688 - new method "getProductImageIds" (#689) (71e4067)

2.1.2 - 2023-01-09 #

Bug Fixes #

2.1.1 - 2023-01-09 #

Bug Fixes #

2.1.0 - 2023-01-05 #

Features #

Bug Fixes #

2.0.1 - 2023-01-03 #

Bug Fixes #

  • 643 - updated the copyright year in the LICENSE (#672) (a34ab62)

2.0.0 - 2023-01-01 #

⚠ BREAKING CHANGES #

  • 658 - api version is now required for barcode and search queries (#667)
  • 450 - finalizing the breaking changes (#656)
  • 450 - import only "openfoodfacts.dart"; all code in "src" folder (#655)
  • 450 - Name source files using "lowercase_with_underscores" (#653)

Features #

  • 450 - import only "openfoodfacts.dart"; all code in "src" folder (#655) (d05d49c)
  • 450 - Name source files using "lowercase_with_underscores" (#653) (cc4eb2c)
  • 659 - support of product field "packagingsComplete" (#664) (ddd61a3)
  • 662 - new packaging fields "quantityPerUnit" and weightMeasured" (#665) (c5335b7)

Bug Fixes #

  • 617 - user related queries now support api v3 (#666) (11f678a)
  • 650 - less server demanding nova integration test (#668) (b6379ce)

Code Refactoring #

  • 450 - finalizing the breaking changes (#656) (c8e8e37)
  • 658 - api version is now required for barcode and search queries (#667) (c7f3b1d)

1.30.1 - 2022-12-25 #

Bug Fixes #

1.30.0 - 2022-12-25 #

Features #

Bug Fixes #

  • 634 - mapped tag 'energy' to Nutrient energyKj. (#644) (3957139)

1.29.0 - 2022-12-09 #

Features #

Bug Fixes #

1.28.0 - 2022-11-22 #

Features #

Bug Fixes #

1.27.1 - 2022-11-06 #

Bug Fixes #

1.27.0 - 2022-10-25 #

Features #

Bug Fixes #

1.26.2 - 2022-10-23 #

Bug Fixes #

  • #565 - added product field "nutrition data", better null value management (#595) (6e2df43)
  • #592 - KnowledgePanelTextElement - 'type' instead of 'text_type' (#593) (10f51cc)
  • Sending credentials to robotff (#590) (2b09926)

1.26.1 - 2022-10-16 #

Bug Fixes #

  • Also return [LoginStatus] when not logged in (#585) (e97f877)

1.26.0 - 2022-10-13 #

Features #

  • #566 - refactored Nutriments as Map with new Nutrient class (#570) (d30108f)
  • #573 - getRandomRobotoffQuestion with optional insight types (#574) (c8692c1)
  • #579 - new method to log in, that returns data about user (#583) (7994f45)

Bug Fixes #

  • #565 - added 'nutrition_data' flag and energy fields (#568) (bbb149f)
  • ImageHelper - new methods with ImageSize parameters + minor fix (#572) (24ec991)
  • KP panel groups sometimes have null title (#576) (bf66f28)
  • make GitHub Projects more resilient (#558) (fe319e0)

1.25.0 - 2022-09-23 #

Features #

Bug Fixes #

  • imageHelper - minor fix about Windows; deprecated methods (#545) (eb0ac81)
  • integration tests around "getTaxonomy" (#563) (a826add)

1.24.0 - 2022-08-15 #

Features #

Bug Fixes #

1.23.0 - 2022-07-15 #

Features #

Bug Fixes #

  • Removed over a year old deprecated methods/parameters (#512) (e6108dc)

1.22.0 - 2022-07-10 #

Features #

Bug Fixes #

  • toBeCompleted - additional tests regarding the retrieved state tags (#508) (ae1b8bc)

1.21.0 - 2022-07-06 #

Features #

  • #503 - added the "all to-be-completed products" configuration (#504) (b7c16ed)

Bug Fixes #

  • toBeCompleted - fixed uri and parameters for to be completed and user queries (#506) (67e2137)

1.20.0 - 2022-06-29 #

Features #

1.19.0 - 2022-06-22 #

Features #

  • #481 - added product fields embCodes and manufacturingPlaces (#490) (a30e7a5)
  • saveProduct with language and country (#491) (6e7d60e)

1.18.2 - 2022-06-17 #

Bug Fixes #

1.18.1 - 2022-06-07 #

Bug Fixes #

1.18.0 - 2022-06-03 #

Features #

  • new product field comparedToCategory (#474) (1d59448)

1.17.1 - 2022-05-26 #

Bug Fixes #

  • fix: Server not recognizing user additions (#472) (52473d7)

1.17.0 - 2022-05-20 #

Features #

1.16.0 - 2022-04-23 #

Features #

  • Expose to Attribute related Knowledge-panel panelID (#456) (f49a94c)

1.15.0 - 2022-04-19 #

Features #

  • Barcodes validation for EAN8 & EAN13 (#444) (0d3ac02)
  • README.md with a list of known apps using the SDK (#435) (c25dece)
  • Support for Product - No nutrition data field (#423) (c6ace40)
  • Username max length (#442) (14eaec0)

Bug Fixes #

1.14.0 - 2022-03-15 #

Features #

  • #410 - refactored TaxonomyCountry with simplified fields (#412) (dc77db3)
  • Support for source fields in the Knowledge panel API (#409) (6a065fd)

Bug Fixes #

1.13.0 - 2022-03-04 #

Features #

Bug Fixes #

1.12.0 - 2022-02-02 #

Features #

  • #348 - new methods getTaxonomyTranslationUri and getCrowdinUri (#372) (057e0a3)
  • #369 - more flexibility for product query version (#374) (51fdebc)
  • #370 - added "uuid" to configuration (#378) (2be52e0)
  • #370 - added app_name and app_version to http queries (as parameters) (#376) (d4c6ef9)
  • new method getProductString, api V0 and V2, new product and ingredient fields (#371) (82547f6)

1.11.1 - 2022-01-16 #

Bug Fixes #

  • Rename enum so it doesn't conflict with Size class from geometry.dart (#366) (527b2e7)

1.11.0 - 2022-01-15 #

Features #

1.10.0 - 2022-01-13 #

Features #

  • new method "getOrderedNutrientsJsonString" (#362) (516ccfa)

1.9.1 - 2022-01-08 #

Bug Fixes #

1.9.0 - 2022-01-07 #

Features #

1.8.1 - 2021-12-28 #

Bug Fixes #

1.8.0 - 2021-12-20 #

Features #

  • Initial support for Folksonomy Engine (Beta) (#332) (f7b254e)
  • Added globalUser to OpenFoodAPIConfiguration (#329) (e246d9e)

Bug Fixes #

  • Added missing product fields to ProductField enum (#331) (4bbd66c)
  • Don't pass country code if it's null (#324) (5f9447c)

1.7.0 - 2021-12-15 #

Features #

  • #306 - unselect product image, added "user" parameter to WRITE methods (#319) (1c82e33)

1.6.0 - 2021-12-14 #

Features #

  • #307 - added 21 enum values for advanced search parameters (#313) (55f3fa5)
  • Allow to get OpenFoodFactsCountry from countryCode (#314) (8b6c9bc)

Bug Fixes #

1.5.0 - 2021-12-09 #

Features #

1.4.0 - 2021-11-19 #

Features #

  • #233 - new class OpenFoodFactsCountry, clearer than "cc" (#292) (3dda3f4)

1.3.9 - 2021-11-17 #

Features #

  • Add a taxonomy API for labels (#277)
  • Add additives, countries, and languages taxonomy APIs (#278)
  • Add queries to get the roots from the server (#287)
  • Add support for the new "Image Refresh" API (#289)
  • Add nutrient order and list (#272)
  • Added eco-score and nutri-score categories (ProductImprovement) (#191)

Bug Fixes #

  • Update to latest KnowledgePanel API changes (#294) (5163db5)
  • Add additives, countries, and languages taxonomy APIs (#274)
  • Allow to send deviceId to InsightAnnotations API and allow anonymous user (#286)

1.3.8 22.10.2021 #

  • More updates to KnowledgePanel APIs

1.3.7 12.10.2021 #

  • Update KnowledgePanel API to comply to the latest Backend changes.

1.3.6 10.10.2021 #

  • Fix issue with Nutriments JSON conversion related to microgram units
  • Support password reset
  • Add page, pageSize and sortOption in ProductListQueryConfiguration

1.3.5 26.09.2021 #

  • Improve wrong username/password error messages in Status

1.3.4 24.09.2021 #

  • Add ability to check whether a product attribute is marked as important in user's personal preferences

1.3.3 16.09.2021 #

  • Add ability to request the product_name_languages and ingredients_text_languages fields
  • Introduce OpenFoodAPISettings to improve API configuration support
  • Allow user agent to be passed via HTTP header
  • Added getProductImprovements to the product model
  • Add missing carbohydratesUnit and fatUnit fields in the Nutriements class
  • Fix alchohol tags in the Nutriments class
  • Fix write API for nutrient fields

1.3.2 25.07.2021 #

  • Fixed completely toJson and fromJson for the fields in multiple languages

1.3.1 22.07.2021 #

  • Fixed toJson and fromJson for the fields in multiple languages

1.3.0 21.07.2021 #

  • Added explicit parameter WithoutAdditives to replace ContainsAdditives (deprecated)
  • Added new InvalidBarcodes class
  • Simplified product search tests
  • Added several nutrients
  • Added ability to request and set multiple translated product fields at once (breaking change)
  • Added support for product list queries
  • Added PnnsGroup2 filter to ProductSearchQueryConfiguration, deprecated PnnsGroupQueryConfiguration
  • Deprecated useless parameters OutputFormat and SearchSimple
  • Added new feature to get the Ecoscore description in HTML
  • Added comments to several classes and methods

1.2.0 08.07.2021 #

  • product_name_de, productNameEN, ... are now deprecated. Use productNameTranslated instead
  • Added the agribalyse field in EcoscoreData
  • Added support for the missing_data_warning field, to inform users that the ecoscore may be improved
  • Added support for user management
  • Added dart-doc documentation
  • Added suggestion for states, languages, labels, categories and more.

1.1.0-beta 30.03.2021 #

  • Renamed SendImage imageUrl parameter to imageUri as it is an Uri (breaking change)
  • New product preferences and matching classes for personalized search (thanks to monsieurtanuki)
  • Added missing values for IngredientsAnalysisTags, and renamed some values to match API names (breaking change)
  • Fixed image upload and added PACKAGING image type

1.0.2-beta 11.03.2021 #

  • Added support for new fields (images URLs, vegan/vegetarian/from palm oil ingredients, categories, labels and packaging)
  • Fixed test mode for addProductImage

1.0.1-beta 08.03.2021 #

  • API method for searching products does not require a user being passed

1.0.0-beta 07.03.2021 #

  • Migrated SDK to null safety
  • Updated test instructions in README.md
  • Improved Github Action validation

0.3.15+3 01.03.2021 #

  • Greatly improved code quality and readability

0.3.15+2 08.02.2021 #

  • fix additional issue with EcoScoreData JSON generation
  • use Github action to test changes
  • fix test output (avoid chatty tests)
  • add support for OCR ingredients

0.3.15+1 04.02.2021 #

  • fix issue with images URLs

0.3.15 04.02.2021 #

  • Refactored tests to use the Open Food Facts test database (thanks to Mohamed Boussaid)
  • Added packaging image type
  • Allow setting the country code cc field
  • Added countries and countries tags to Product (thanks to Mohamed Boussaid)
  • Allow anonymous photo upload
  • Fixed product JSON generation for Eco-Score data (thanks to Peter Tran-Jørgensen)

0.3.14+1 07.01.2021 #

  • Refactored Attribute & AttributeGroup
  • Removed ProductFields.ECOSCORE_ALPHA as deprecated

0.3.14 01.01.2021 #

  • Added support for Ecoscore (thanks to Frédéric Julian)

0.3.13+2 2.12.2020 #

  • nullable product name hotfix

0.3.13+1 24.11.2020 #

  • product upload hotfix

0.3.13 20.11.2020 #

  • Extended micronutrients support (thanks to Ilia (Elliot) Tikhomirov)
  • product attribute: lastModified

0.3.12+2 26.10.2020 #

  • Fixed save product. NULL values won't be sent.

0.3.12+1 27.09.2020 #

  • Fixed image upload

0.3.12 27.09.2020 #

  • Added AttributeGroups

0.3.11+1 19.09.2020 #

  • Fixed SearchResult

0.3.11 19.09.2020 #

  • Added userPreferences
  • Product image upload fixed (Thanks to Peter Tran-Jørgensen)

0.3.10 02.08.2020 #

  • Added energyKcal and energyKcal100g

0.3.9 30.07.2020 #

  • Added EnvironmentImpactLevels
  • Rewrote NutrientLevels

0.3.8 27.07.2020 #

  • Fixed typos in PnnsGroup2 ids

0.3.7 17.07.2020 #

  • Added allergens
  • Introduced PNNS groups and PnnsGroup2 queries

0.3.6 12.07.2020 #

  • fixed Json product generation (additives, selectedImages)

0.3.5 28.06.2020 #

  • fixed servingQuantity issue introduced in 0.3.4

0.3.4 25.06.2020 #

  • selectedImages toJson implementation
  • codebase improvements

0.3.3 25.06.2020 #

  • ingredient percentage parsing fixed

0.3.2 19.05.2020 #

  • dart:ui - dependencies removed
  • search result decoding and parsing errors fixed

0.3.1 30.04.2020 #

  • Added documentation form version 0.3.0
  • Updated README.md

0.3.0 30.04.2020 #

  • Support for more than 180 languages
  • New query / search principle - ProductQueryConfiguration : In order to optimize the queries you can now set the return language and fields list through ProductQueryConfiguration (Default Behaviour)
  • getProductRaw() is still available (Old Behaviour)

0.2.1 14.04.2020 #

  • expose robotoff and helper classes

0.2.0 13.04.2020 #

  • added robotoff support, new service methods: getProductInsights(), getRobotoffQuestionsForProduct(), getRandomRobotoffQuestion(), postInsightAnnotation(), getIngredientSpellingCorrection(),
  • added images field
  • added documentation.md

0.1.16 05.03.2020 #

  • added brandsTags to get brands as a list

0.1.15 24.02.2020 #

  • added serving size and nutriment serving sizes

0.1.14 25.01.2020 #

  • search products by tags
  • search products with / without additives
  • search products with keywords

0.1.13 24.11.2019 #

  • added support for Spanish

0.1.12 18.11.2019 #

  • nutrient levels added

0.1.11 9.10.2019 #

  • additives management implemented
  • added Nutriscore to product
  • bugfix: ingredientText language dependent

0.1.10 5.10.2019 #

  • nutriments management implemented

0.1.9 21.09.2019 #

  • get product image by field, size and language

0.1.8 13.09.2019 #

  • http: 0.12.0

0.1.7 13.09.2019 #

  • Bugfix: search result page - json parse error fixed (string vs. int)
  • json_annotation: 3.0.0
  • build_runner: 1.6.9
  • json_serializable: 3.2.2

0.1.6 06.06.2019 #

  • Bugfix: ingredients percent json parse error fixed (string vs. int)

0.1.5 28.05.2019 #

  • getProduct() fixed null-pointer for non existing product.
  • searchProducts() english URL now working. (-> world)

0.1.4 19.05.2019 #

  • getProduct() chooses a language dependent host (world, de, ..)
  • Bugfix: getProduct() won't fail if no images are provided

0.1.3 5.05.2019 #

  • searchProducts() with language support

0.1.2 5.05.2019 #

  • Ingredients.dart more type safe (THX to dynamic)

0.1.1 5.05.2019 #

  • class SearchResult now visible

0.1.0 4.05.2019. #

  • service method searchProducts() implemented.

0.0.10 28.03.2019 #

the test package dependency has been moved to flutter_test.

0.0.9 16.03.2019. #

dependency version upgrade to:

  • json_annotation: 2.0.0
  • build_runner: 1.2.6
  • json_serializable: 2.0.2

0.0.8 16.11.2018. #

  • getProduct() provides ingredients and images for a given language.
  • getProductRaw() provides all data fields without preparation.

0.0.6 27.10.2018. #

  • set dependency versions as range

0.0.5 25.10.2018. #

  • upgrade of http 0.12.0
  • upgrade of build_runner 1.0.0

0.0.4 16.10.2018. #

  • class Image changed to ProductImage for a easier namespace resolving.

0.0.3 12.10.2018. #

  • model of selected product images changed.

0.0.2 3.10.2018. #

  • Service saveProduct() can handle to add and to edit a product.
  • Added traces to a product

0.0.1 18.09.2018. #

initial version with these API services:

  • add a new product
  • add a new product image
  • get an existing product
150
likes
0
points
3.91k
downloads

Publisher

verified publisheropenfoodfacts.org

Weekly Downloads

Dart package for the Open Food Facts API, a food products database made by everyone, for everyone.

Repository (GitHub)
View/report issues

Topics

#nutriscore #ecoscore #nutrition #food #ingredients

Funding

Consider supporting this project:

donate.openfoodfacts.org
opencollective.com

License

unknown (license)

Dependencies

http, json_annotation, meta, path

More

Packages that depend on openfoodfacts