PHP client to consume docs-dispatcher.io API services
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.50
- phpunit/phpunit: ^10
This package is auto-updated.
Last update: 2024-09-26 12:22:49 UTC
README
DocsDispatcher PHP Client
Versions
SDK version | PHP version | Branch |
---|---|---|
v0.1.x | 7.2+ | php-7x |
v0.2.x | 8.1+ | develop |
Installation
$ composer require docs-dispatcher.io/sdk
Getting started
Concepts
This library relays on the following concepts in order to be able to use it with a minimal knowledge of the API itself.
Authentication
Only supported provider is Basic Auth for now.
Service(s)
A service is an API endpoint having its own parameters. For a detailed list of them, please read the API documentation, also available as Swagger format.
ServiceMediator
A single class that will be in charge to temporary store your defined services and their corresponding configurations in order to build the request to be sent to the API.
Client
The class that actually triggers calls to API. It decorates a GuzzleHttp\Client
instance.
Usage
A realistic usage can be found in the attached sample file exemple.php
. For more details about configuring each services, please refer to the API documentation.