openfoodfacts / openfoodfacts-laravel

Open Food Facts API wrapper for Laravel
MIT License
151 stars 17 forks source link

Allow use of Open Beauty Facts #53

Open davidjr82 opened 5 months ago

davidjr82 commented 5 months ago

Problem

OpenFoodFacts has different APIs, for example, the beauty API for Cosmetic products. The API is 98% similar to food API.

Right now the package can only use the food API because it is harcoded in the parameter of the method setApi in OpenFoodFactsApiWrapper and the is no way to change it since it is called directly from the constructor.

Proposed solution

Allow to modify the API to query the beauty (cosmetic) products instead of the food products.