openfoodfacts / openfoodfacts-php

PHP wrapper for Open Food Facts
https://packagist.org/packages/openfoodfacts/openfoodfacts-php
MIT License
58 stars 34 forks source link

Specific Document Types and Raw Data #16

Closed Dwarfex closed 4 years ago

Dwarfex commented 4 years ago

Update: The code now uses the existing (but unused) specific Document Types depending on the API called. Former type was "OpenFoodFacts\Document".

The types now used are:

these types extend the old generic "Document"-Type. So checks for the class "Document" are still valid. This is more a cosmetic code cleaning thing.

New Functionality: Raw Data Document::class->getData();

Returns a alphabetically and numberly ordered array representation of the Document Helpful for f.e. debugging.

Product API Added Product API(https://world.openproductsfacts.org/) for usage