ec/cns-client

European Commision / Corporate Notification System (CNS) REST API Client

0.0.1 2022-12-26 16:14 UTC

This package is auto-updated.

Last update: 2024-12-26 20:51:57 UTC


README

Version v1.2.0 of Corporate Notification System (CNS) REST API.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new EC\CNS\Client\Api\ClientSystemsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$client_system_key = 'client_system_key_example'; // string | The unique client system key identifier.
$client_system_password = 'client_system_password_example'; // string | Client System Password.
$white_list_request = new \EC\CNS\Client\Model\WhiteListRequest(); // \EC\CNS\Client\Model\WhiteListRequest | Smtp addresses list for a Client System.

try {
    $result = $apiInstance->addWhiteList($client_system_key, $client_system_password, $white_list_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClientSystemsApi->addWhiteList: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to /cns/services/rest

Models

Authorization

All endpoints do not require authorization.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

DIGIT-CNS-SUPPORT@ec.europa.eu

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.2.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen