Download the PHP package asm/eprel-api-client without Composer
On this page you can find all versions of the php package asm/eprel-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asm/eprel-api-client
More information about asm/eprel-api-client
Files in asm/eprel-api-client
Package eprel-api-client
Short Description Eprel API Client
License MIT
Homepage https://github.com/maschmann/eprel-public-api-client
Informations about the package eprel-api-client
EPREL API Client for PHP
A modern, fluent, and strongly-typed PHP client to interact with the EPREL (European Product Database for Energy Labelling) Public API.
What is EPREL?
The Europäische Produktdatenbank für Energieverbrauchskennzeichnung (European Product Database for Energy Labelling) is a database managed by the European Commission. It allows consumers to search for and verify the energy labels and product information sheets of appliances sold within the EU (e.g., refrigerators, washing machines, televisions, etc.).
This library allows you to seamlessly integrate the public search and retrieval capabilities of the EPREL database into your PHP applications.
Requirements
- PHP 8.4 or higher
- A PSR-18 compatible HTTP Client (e.g., Guzzle)
- A PSR-17 compatible HTTP Factory
- (Optional but recommended) A PSR-6 compatible Cache Implementation (defaults to an in-memory array cache)
Installation
You can install the package via composer:
Usage
Basic Initialization
You can initialize the client using an array of parameters or through a fluent configuration interface.
Searching for Products
You can retrieve a paginated list of products matching specific filter criteria (like the product group or energy class).
Fetching Product Details
To retrieve the complete details, technical parameters, and URLs for the energy labels of a specific product, use its EPREL registration number.
Caching
To avoid hitting rate limits and to significantly improve your application's performance, it is highly recommended to inject a persistent PSR-6 Cache Item Pool.
By default, the client uses an in-memory ArrayAdapter which only persists data for the duration of the current PHP script execution.
Development & Testing
This library comes with a Dockerized environment for easy development and testing.
License
The MIT License (MIT). Please see License File for more information.
All versions of eprel-api-client with dependencies
guzzlehttp/guzzle Version ^7.8
symfony/console Version ^7.0
symfony/yaml Version ^7.0
psr/cache Version ^3.0
psr/log Version ^3.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
symfony/cache Version ^7.0