ProductsApi class

Simple Products API using Dio All product-related API calls in a single file

Constructors

ProductsApi()
factory

Properties

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

Methods

clearAuthToken() → void
delete(String path, {Map<String, dynamic>? queryParameters}) Future<Response>
Generic DELETE request
get(String path, {Map<String, dynamic>? queryParameters}) Future<Response>
Generic GET request
getFullStatusOfProduct(String barcode) Future<Response>
Get full status of product (scan endpoint)
getPersonalizedRelatedProducts(String barcode) Future<Response>
Get personalized related products
getProductDetail({required String barcode, String? l3category, String? source}) Future<ProductDetails>
Get product details by barcode (makes parallel calls to pd_new and pd_extra)
getProductTags() Future<Response>
Get product filter tags
getRelatedProducts(String barcode) Future<Response>
Get related products
getTagDetails(String tagType, String tag) Future<Response>
Get tag details
getTags({required String tagType}) Future<Response>
Get tags by type (allergens, dietary, etc.)
getThumbsFeedback(String barcode) Future<Response>
Get thumbs feedback for a product
getTopSearches() Future<Response>
Get top searches
isProductExists(String barcode) Future<Response>
Check if product exists in database
isProductExistsInLiveNew(String barcode, {String type = 'food'}) Future<Response>
Check if product exists in live (deprecated - use isProductExistsInLiveNew) Check if product exists (new version)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String path, {dynamic data, Map<String, dynamic>? queryParameters}) Future<Response>
Generic POST request
postThumbsFeedback(Map<String, dynamic> body) Future<Response>
Post thumbs up/down feedback
put(String path, {dynamic data, Map<String, dynamic>? queryParameters}) Future<Response>
Generic PUT request
setAuthToken(String token) → void
toString() String
A string representation of this object.
inherited
updateRDA({required String barcode, required String servingSize}) Future<Response>
Update RDA (Recommended Daily Allowance) panel
updateThumbsFeedback(Map<String, dynamic> body, dynamic id) Future<Response>
Update thumbs feedback

Operators

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