I want to call the method "find_id_for_barcode"
I modified the fatsecret Python package by
walexnelson to include the method. It should be simple enough, but no matter what barcode I pass in, it always returns "None"
The barcode is valid, e.g., 77567153012, since I tested it in Postman already, and it returned an actual food Id.
Below is my edition to the wrapper. Any ideas and help are much appreciated. Thx.
def food_get_food_id(self, barcode, region):
params = {'method': 'food.find_id_for_barcode', 'barcode': barcode, 'region': region, 'format': 'json'}
response = self.session.get(self.api_url, params=params)
return self.valid_response(response)