dbout/dendreo-sdk-php

Dendreo SDK for interacting with the REST APIs.

v1.0.0-alpha.3 2025-03-30 12:27 UTC

README

Logo Dendreo

Dendreo SDK for PHP

Latest Version Coverage Status Total Downloads Tests status

Click here to read the Dendreo API documentation

Warning

This version is considered a beta release. While we have done our best to ensure stability and functionality, there may still be bugs, incomplete features, or breaking changes in future updates.

The Dendreo SDK for PHP makes it easy for developers to access Dendreo Web Services in their PHP code. You can get started in minutes by installing the SDK through Composer or by downloading a single zip or phar file from our latest release.

Dendreo is developed by a French company, so the majority of the code (models, properties,...) are in French to keep consistency with the API.

Please note that this SDK is developed by a developer who does not work at Dendreo. If you have any questions directly related to Dendreo, please contact support : https://www.dendreo.com/contact.

Resources

Supported API

The library supports all APIs under the following services.

Several APIs are not developed at the moment. If you want to use an API that is not available, you can open an issue.

Service Endpoint Supported
Catégories de Module /api/categories_module.php
Types de produit /api/categories_produit.php
Modules / Produits /api/modules.php
Sessions Permanentes /api/sessions_permanentes.php
Formateurs /api/formateurs.php
Entreprises /api/entreprises.php
Contacts /api/contacts.php
Particuliers /api/contacts.php / /api/particuliers.php
Participants /api/participants.php
Tâches /api/taches.php
Etapes /api/etapes.php
Centres de formation /api/centres_de_formation.php
Salles de formation /api/salles_de_formation.php
Actions de Formation /api/actions_de_formation.php
Créneaux /api/creneaux.php
Inscription d'un participant /api/laps.php
Réponses aux Questionnaires de Satisfaction /api/reponses_questionnaire_satisfaction.php
Entreprises liées /api/laes.php
Intervention d'un Formateur /api/lafs.php
Intervention d'un Formateur par créneau /api/lcfs.php
Programmation d'un module /api/lams.php
Gérer les inscriptions aux modules /api/lmps.php
Gérer la présence des participants /api/lcps.php
Évaluations des Participants /api/evaluations.php
Souhaits des Participants /api/souhaits.php
Financeurs (externes) /api/financeurs.php
Financements /api/financements.php
Factures /api/factures.php
Règlements /api/reglements.php
Export Comptable /api/export_comptable.php

Installation

Requirements

  • Dendreo username
  • API key
  • PHP 8.2 or later
  • cURL with SSL support
  • The PHP extensions: ctype, curl, json, mbstring and openssl.

Installation

You can use Composer. Follow the installation instructions if you do not already have composer installed.

composer require dbout/dendreo-sdk-php

In your PHP script, make sure you include the autoloader:

require __DIR__ . '/vendor/autoload.php';

Using the library

Before using a service, you must create a singleton instance of the Client. This instance will then be used by the various services to make requests to Dendreo :

$client = new \Dbout\DendreoSdk\Client();

$client->setUsername('my-username');
$client->setApiKey('the-api-key');

$contactService = new \Dbout\DendreoSdk\Service\Contacts($client);

$newContact = new \Dbout\DendreoSdk\Model\ContactsCreateOrUpdateRequest();
$newContact->setEmail('test@gmail.com');
$newContact->setNom('Norman');
$newContact->setPrenom('Foster');
$newContact->setFonction('Architect');

$result = $contactService->create($newContact);

All services work the same way, there is nothing more to know:)

Add proxy

If you want to use a proxy, you can use the Config class in this way :

$config = new \Dbout\DendreoSdk\Config();
$config->setProxy('https://my-proxy.com');

$client = new \Dbout\DendreoSdk\Client($config);

$client->setUsername('my-username');
$client->setApiKey('the-api-key');

Getting help/support

This SDK is developed by a developer who does not work at Dendreo. Thus:

Contributing

💕 🦄 We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements. Have a look at our contributing guidelines to find out how to raise a pull request.

Licence

Licensed under the MIT license, see LICENSE.