Download the PHP package endeavour/groeigids-api-client without Composer
On this page you can find all versions of the php package endeavour/groeigids-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download endeavour/groeigids-api-client
More information about endeavour/groeigids-api-client
Files in endeavour/groeigids-api-client
Package groeigids-api-client
Short Description Api client for importing GroeiGids articles
License MIT
Informations about the package groeigids-api-client
Groeigids API client
The Groeigids API Client is a PHP library designed to interact with the Elkander Groeigids API, making it easy to fetch and manage articles and themes. Swagger documentation of the API can be found here.
Features
- Fetch articles and themes from the Groeigids API
- JSON schema validation for API responses
- Support for query parameters and sorting
- Custom exceptions for error handling
Requirements
- PHP 8.1+
- Composer
- A valid API key for the Groeigids API
- A PSR-18 compatible HTTP client
- A PSR-17 compatible HTTP factory implementation
Installation
To install the Groeigids API Client, use Composer:
Configuration
To run integration tests, a .env file should be created in the root of the project with the following content:
Usage
To use the Groeigids API Client, create an instance of the GroeigidsApiClient
class:
Now fetching articles and themes is as simple as calling the fetchArticles
and fetchThemeArticles
methods:
The fetchArticles
and fetchThemeArticles
methods accept an optional array of query parameters:
The fetchArticles
and fetchThemeArticles
methods also accept an optional TypedArray object containing sorting parameters:
Other functions are available to fetch articles by ID, by breadcrumb or those modified after a certain date:
Testing
To run the unit tests, use PHPUnit (make sure a .env file is present in the root of the project):
Contributing
Contributions are welcome!
Licence
This project is licensed under the MIT License.
All versions of groeigids-api-client with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
opis/json-schema Version ^2.3