Download the PHP package aliirfaan/citronel-external-service without Composer
On this page you can find all versions of the php package aliirfaan/citronel-external-service. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aliirfaan/citronel-external-service
More information about aliirfaan/citronel-external-service
Files in aliirfaan/citronel-external-service
Download aliirfaan/citronel-external-service
More information about aliirfaan/citronel-external-service
Files in aliirfaan/citronel-external-service
Vendor aliirfaan
Package citronel-external-service
Short Description Consume external APIs using a standard interface using Laravel http client. Log requests and responses for API calls in database and log file for auditing/debugging purposes.
License MIT
Package citronel-external-service
Short Description Consume external APIs using a standard interface using Laravel http client. Log requests and responses for API calls in database and log file for auditing/debugging purposes.
License MIT
Please rate this library. Is it a good library?
Informations about the package citronel-external-service
Citronel external service
Consume external APIs using a standard interface.
Features
- Contract class to consume external APIs.
- Takes configuration from a configuration file that follows a standard format.
- Helper function for caching responses.
- Helper classes for events and subscribers.
- You can use
aliirfaan/citronel-external-service-generatorpackage as dev dependency to generate config file, service class, migrations, models, events, listeners for your external service.
Requirements
Installation
-
Install the package using composer:
- Install the package with dev dependency:
Contracts
- AbstractExternalService.php
Your main service class must extend this abstract class.
Traits
-
ExternalServiceLogTrait
Use this trait if we want to log request and responses for external services -
ExternalServiceEventTrait
Use this trait in your event class - ExternalServiceEventSubscriberTrait
Use this trait in your subscriber class
Steps
- Create a configuration file with proper values for your external service that follows the format expected by the
AbstractExternalService. - Create your service class and extend
AbstractExternalService. - Use
ExternalServiceLogTraitif you want to log requests and responses. This trait expects events, listeners and models to exist for the external service. - Use
ExternalServiceCacheTraitif you want to cache requests and responses.
Usage
An example of how to consume an example external service httpbin.
Configuration
app/config/http-bin.config
Service class
All versions of citronel-external-service with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0.0
The package aliirfaan/citronel-external-service contains the following files
Loading the files please wait ...