FolksonomyAPIClient class

Client calls of the Folksonomy API (Open Food Facts)

cf. https://api.folksonomy.openfoodfacts.org/docs

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addProductTag({required String barcode, required String key, required String value, String? ownerIfPrivate, required String bearerToken, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<MaybeError<bool>>
deleteProductTag({required String barcode, required String key, required int version, String? owner, required String bearerToken, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<MaybeError<bool>>
getAuthenticationToken({required String username, required String password, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<MaybeError<String>>
Authentication: provide username/password and get a bearer token in return.
getKeys({String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<Map<String, KeyStats>>
Returns the list of tag keys with statistics.
getProducts({required String key, String? value, String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<Map<String, String>>
Returns all the products with that key.
getProductStats({String? key, String? value, String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<List<ProductStats>>
Returns all the ProductStats, with an optional filter.
getProductTag({required String barcode, required String key, String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<ProductTag?>
Returns the ProductTag for this product and this tag key
getProductTags({required String barcode, String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<Map<String, ProductTag>>
Returns all the ProductTags for this product
getProductTagVersions({required String barcode, required String key, String? owner, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<List<ProductTag>>
Returns the versions of ProductTag for this barcode and key.
getProductTagWithSubKeys({required String barcode, required String key, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<Map<String, ProductTag>>
Returns all the ProductTags for this product, with their subkeys.
hello({UriHelper uriHelper = uriHelperFolksonomyProd}) Future<void>
"hello world"
ping({UriHelper uriHelper = uriHelperFolksonomyProd}) Future<void>
updateProductTag({required String barcode, required String key, required String value, required int version, String? ownerIfPrivate, required String bearerToken, UriHelper uriHelper = uriHelperFolksonomyProd}) Future<MaybeError<bool>>
productTag.version must be equal to previous version + 1