openfoodfacts library

Classes

AbstractQueryConfiguration
Abstract Query Configuration, that helps build API URI
Additives
Allergens
List of known allergens for a Product.
AllergensParameter
List of allergens to filter in and out.
Attribute
AttributeGroup
AutocompleteManager
Manager that returns the suggestions for the latest input.
Autocompleter
Interface that provides autocomplete suggestions.
AutocompleteSearchResult
Result of an autocomplete search on the Elastic Search API.
AutocompleteSingleResult
Single item result of an autocomplete search on the Elastic Search API.
AvailableAttributeGroups
Referential of attribute groups, with loader.
AvailablePreferenceImportances
Referential of preference importance, with loader.
AvailableProductPreferences
Referential for product preferences: attribute groups and importance.
BadgeBase
Events API: badge.
BarcodeParameter
"Barcodes" search API parameter.
BarcodeValidator
Correction
EcoscoreAdjustments
EcoscoreData
EventsAPIClient
Client calls of the Events API (Open Food Facts).
EventsBase
Events API: event.
FolksonomyAPIClient
Client calls of the Folksonomy API (Open Food Facts)
GetLocationsParameters
Parameters for the "get locations" API query.
GetLocationsResult
List of location objects returned by the "get locations" method.
GetPricesParameters
Parameters for the "get prices" API query.
GetPricesResult
List of price objects returned by the "get prices" method.
HttpHelper
General functions for sending http requests (post, get, multipart, ...)
ImageHelper
Helper class related to product pictures
Ingredient
IngredientsAnalysisParameter
Ingredients Analysis search API parameter.
IngredientsAnalysisTags
Insight
InsightsResult
IntakeRecommendation
InvalidBarcodes
Invalid barcode blacklist
JsonHelper
Helper class around product field conversion to/from JSON
KeyStats
Folksonomy: statistics around a tag key.
KnowledgePanel
KnowledgePanels are a standardized and generic units of information that the client can display on the product page.
KnowledgePanelActionElement
"Contribute action" element of the Knowledge panel.
KnowledgePanelElement
KnowledgePanelElement is a single unit of KnowledgePanel that can be rendered on the client.
KnowledgePanelGeoPointer
Element representing a geo location of a map pointer.
KnowledgePanelImageElement
Image that represents the KnowledgePanel.
KnowledgePanelLatLng
Element representing a lat/long positioning of a map pointer.
KnowledgePanelPanelGroupElement
Element representing a Panel group that contains 1+ KnowledgePanels.
KnowledgePanelPanelIdElement
Element representing a Panel Id of a KnowledgePanel. This element is a Knowledge panel itself, the KnowledgePanel can be found in the list of Knowledge panels using the id.
KnowledgePanels
An object containing all KnowledgePanels in the form of a map.
KnowledgePanelTableCell
Provides the values for each table cell inside a KnowledgePanel table.
KnowledgePanelTableColumn
A descriptor that describes the type and label of each column.
KnowledgePanelTableElement
Element representing a tabular data for the KnowledgePanel.
KnowledgePanelTableRowElement
A table row inside Table element of KonwledgePanel
KnowledgePanelTextElement
Description element of the Knowledge panel.
KnowledgePanelWorldMapElement
Element representing a world map.
LanguageHelper
Helper class around OpenFoodFactsLanguage
LeaderboardEntry
Events API: leaderboard entry.
LocalizedTag
Tag with localizations (in English and an additional language).
Location
Location object in the Prices API.
LoginStatus
Status after an attempt to log in.
MatchedProduct
MatchedProductV2
Score of a product according to preferences, with a Product field.
MatchedScoreV2
Score of a product according to preferences.
MaybeError<T>
Contains a successful value OR an error.
NutrientLevels
Nutriments
Values in nutrients.
NutrimentsHelper
Helper class for energy computations and checks
OcrIngredientsResult
Result from OCR applied to ingredients.
OcrPackagingResult
Result from OCR applied to packaging.
OldProductResult
Product Result (old style).
OpenFoodAPIClient
Client calls of the Open Food Facts API
OpenFoodAPIConfiguration
Allows to configure the behavior of the package.
OpenFoodSearchAPIClient
Client calls of the Open Food Facts Elastic Search API.
OpenPricesAPIClient
Client calls of the Open Prices API.
OrderBy<T extends OrderByField>
"Order by" clause for "get list" methods (e.g. "get prices")
OrderByField
"Order by" field for "get list" methods (e.g. "get prices")
OrderedNutrient
Nutrient, as a hierarchically ordered and localized entity.
OrderedNutrients
Nutrients, as hierarchically ordered and localized entities.
OriginsOfIngredients
Packaging
PageNumber
"Page number" search API parameter
PageSize
"Page size" search API parameter
Parameter
Abstract search API parameter, to be used in the search URI
PnnsGroup2Filter
PnnsGroup2 search API parameter
PreferenceImportance
Importance level when we match products to preferences. Will be loaded in JSON as a list of increasingly important items.
Price
Price object.
PriceProduct
Product object in the Prices API.
Product
This class contains most of the data about a specific product.
ProductFreshness
Freshness of a Product.
ProductHelper
Helper class around Product fields
ProductImage
Product image. Can be "main" (e.g. "front_fr") or "raw" (e.g. "picture #9").
ProductPackaging
Packaging component for a product, e.g. recyclable bottle made of glass.
ProductPreferencesManager
Manager of the product preferences: referential and app/user preferences.
ProductPreferencesSelection
Where the preferences regarding the importance of attributes are accessed
ProductQueryConfiguration
Query Configuration for single barcode
ProductQueryVersion
Api version for product queries
ProductResultFieldAnswer
API V3 answer for one field.
ProductResultV3
API V3 answer from a call to /api/v3/product/$barcode.
ProductSearchQueryConfiguration
Query Configuration for search parameters
ProductStats
Folksonomy: statistics about the tag keys on a product.
ProductTag
Folksonomy product tag: for this barcode, that value is set for that key.
Proof
Proof of a price.
RecommendedDailyIntake
Recommended daily intake amounts
RobotoffAPIClient
RobotoffQuestion
RobotoffQuestionResult
SearchResult
SearchTerms
Term list search API parameter
SendImage
Session
Price session.
SignUpStatus
The response from a call to the OpenFoodAPIClient.register method The status may be:
SortBy
Sort search API parameter
SpellingCorrection
StatesTagsParameter
States Tags as completed or to-be-completed.
Status
SuggestionManager
Manager that returns the suggestions for the latest input.
TagFilter
Tag filter ("LIST contains/without ITEM") search API parameter
TagI18N
A tag with internationalisation.
TagTypeAutocompleter
Autocomplete suggestions for TagType.
TaxonomyAdditive
A JSON-serializable version of a Additive taxonomy result.
TaxonomyAdditiveQueryConfiguration
Configuration to get additives
TaxonomyAllergen
A JSON-serializable version of a Allergen taxonomy result.
TaxonomyAllergenQueryConfiguration
Configuration for allergens API query.
TaxonomyCategory
A JSON-serializable version of a category taxonomy result.
TaxonomyCategoryQueryConfiguration
TaxonomyCountry
A JSON-serializable version of a Country taxonomy result.
TaxonomyCountryQueryConfiguration
Configuration for countries API query.
TaxonomyIngredient
A JSON-serializable version of a Ingredient taxonomy result.
TaxonomyIngredientQueryConfiguration
TaxonomyLabel
A JSON-serializable version of a Label taxonomy result.
TaxonomyLabelQueryConfiguration
TaxonomyLanguage
A JSON-serializable version of a Language taxonomy result.
TaxonomyLanguageQueryConfiguration
Configuration for languages API query.
TaxonomyNameAutocompleter
Autocomplete suggestions for TaxonomyNames.
TaxonomyNova
A JSON-serializable version of a Nova taxonomy result.
TaxonomyNovaQueryConfiguration
Configuration for nova API query.
TaxonomyOrigin
A JSON-serializable version of an Origin taxonomy result.
TaxonomyOriginQueryConfiguration
Configuration for origins API query.
TaxonomyPackaging
A JSON-serializable version of a Packaging taxonomy result.
TaxonomyPackagingMaterial
A JSON-serializable version of a Packaging Material taxonomy result.
TaxonomyPackagingMaterialQueryConfiguration
Configuration for packaging materials API query.
TaxonomyPackagingQueryConfiguration
Configuration for packaging API query.
TaxonomyPackagingRecycling
A JSON-serializable version of a Packaging Recycling taxonomy result.
TaxonomyPackagingRecyclingQueryConfiguration
Configuration for packaging recycling API query.
TaxonomyPackagingShape
A JSON-serializable version of a Packaging Shape taxonomy result.
TaxonomyPackagingShapeQueryConfiguration
Configuration for packaging shapes API query.
TermCorrections
TitleElement
An element representing the title of the KnowledgePanel which could consist of a text title, subtitle and an icon.
UnitHelper
Helper class for conversions to/from Unit
UriHelper
Helper class for constructing urls with the in the OpenFoodAPIConfiguration specified settings
UriProductHelper
UriHelper specific for products (e.g. off, obf, opf, opff).
UriReader
Abstract reader of URI data, declined in "not web" and "web" versions
User
UserAgent
WithoutAdditives
"Without Additives" search API parameter

Extensions

ImageAngleExtension
ImageSizeExtension
NutrientLevelExtension
OpenFoodFactsLanguageExtension

Constants

fieldsAllLanguages → const Set<ProductField>
fieldsInLanguages → const Set<ProductField>
uriHelperEventsProd → const UriHelper
Uri of the main requests to the backend (Events).
uriHelperEventsTest → const UriHelper
Uri of the test requests to the backend (Events).
uriHelperFolksonomyProd → const UriHelper
Uri of the main requests to the backend (Folksonomy).
uriHelperFolksonomyTest → const UriHelper
Uri of the test requests to the backend (Folksonomy) - does not work :-(
uriHelperFoodProd → const UriProductHelper
Uri of the main requests to the backend (OFF).
uriHelperFoodTest → const UriProductHelper
Uri of the test requests to the backend (OFF).
uriHelperRobotoffProd → const UriHelper
Uri of the main requests to the backend (RobotOff).
uriHelperRobotoffTest → const UriHelper
Uri of the test requests to the backend (RobotOff).

Functions

convertFieldsToStrings(List<ProductField> fields, List<OpenFoodFactsLanguage> languages) List<String>
NOTE: if one of the fields is IN_LANGUAGES and languages is empty - the function will throw.
ingredientSpecialPropertyStatusFromJson(dynamic json) IngredientSpecialPropertyStatus?
ingredientSpecialPropertyStatusToJson(IngredientSpecialPropertyStatus? status) String?

Enums

AllergensTag
Main allergens.
Currency
Currency of the price.
EcoscoreStatus
Evaluation
Evaluation of the panel, depicting whether the content of the panel is good/bad/neutral for the topic to which the panel applies.
Fuzziness
Fuzziness Level for Elastic Search API.
GetLocationsOrderField
Field for the "order by" clause of "get locations".
GetPricesOrderField
Field for the "order by" clause of "get prices".
Grade
Grade of the panel, depicting the level of impact the product has on the corresponding topic.
ImageAngle
Angle for image rotation.
ImageField
ImageSize
IngredientSpecialPropertyStatus
InsightAnnotation
InsightType
KnowledgePanelAction
Possible needed contribute actions.
KnowledgePanelColumnType
The type of Knowledge panel table column.
KnowledgePanelElementType
The type of Knowledge panel.
KnowledgePanelSize
Size of the KnowledgePanel, if small the client must display the panel in a compact size.
KnowledgePanelTextElementType
The type of Knowledge panel text description.
Level
Level of information conveyed by this KnowledgePanel.
LocationOSMType
Type of the OpenStreetMap location object.
MatchedProductStatus
Match and score of a Product vs. Preferences
MatchedProductStatusV2
Match and score of a Product vs. Preferences, v2
Nutrient
Nutrient
NutrientLevel
OcrField
OpenFoodFactsCountry
Countries.
OpenFoodFactsLanguage
Available languages
PalmOilFreeStatus
PerSize
Used for nutrient values: for which size of the product?
PnnsGroup1
PNNS food groups
PnnsGroup2
PNNS food subgroups.
PricePer
Price Per.
ProductField
Fields of a Product
ProductImprovement
Possible improvements on a Product given its current data
ProductImprovementCategory
Category: what would this ProductImprovement help compute?
ProductState
States of a Product. To be used in search API, with StatesTagsParameter.
ProofType
Type of a Proof.
RobotoffQuestionOrder
Order for Robotoff questions.
ServerType
Type of Server (e.g. "food facts", "beauty facts", ...).
SignUpStatusError
A list of errors returned by the server
SortOption
Possible sort options for search API
TagFilterType
Filter types for advanced search parameters
TagType
TaxonomyAdditiveField
Fields of an TaxonomyAdditive
TaxonomyAllergenField
Fields of an TaxonomyAllergen
TaxonomyCategoryField
Fields of a TaxonomyCategory
TaxonomyCountryField
Fields of an TaxonomyCountry
TaxonomyIngredientField
Fields of an TaxonomyIngredient
TaxonomyLabelField
Fields of an TaxonomyLabel
TaxonomyLanguageField
Fields of an TaxonomyLanguage
TaxonomyName
Taxonomy Name for Elastic Search API.
TaxonomyNovaField
Fields of a TaxonomyNova
TaxonomyOriginField
Fields of a TaxonomyOrigin
TaxonomyPackagingField
Fields of an TaxonomyPackaging
TaxonomyPackagingMaterialField
Fields of a TaxonomyPackagingMaterial
TaxonomyPackagingRecyclingField
Fields of a TaxonomyPackagingRecycling
TaxonomyPackagingShapeField
Fields of a TaxonomyPackagingShape
TitleElementType
Type of title element.
Unit
Unit of measurement for nutrients
VeganStatus
VegetarianStatus