Skip to content

IONOS-Productivity/ionos-mail-notification-api-client

Repository files navigation

IONOSEventNotificationHandler

This is the API client for the Mail Notification API

Installation & Usage

Requirements

  • PHP 7.4 and later (should also work with PHP 8.0)
  • Java 11 or later

Regenerate the API client

Regenerate the API client with the latest changes in the API specification

  1. Pull last openapi definition from server
./pull_api_definition.sh api.example.lan:10443
  1. Install openapi generator
npm install
  1. Generate api for pulled openapi version
make php

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/ionos-productivity/ionos-mail-notification-api-client.git"
    }
  ],
  "require": {
    "ionos-productivity/ionos-mail-notification-api-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure HTTP basic authorization: basicAuth
$config = IONOS\MailNotificationAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new IONOS\MailNotificationAPI\Client\Api\EventAPIApi(
    // 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(),
    $config
);
$brand = 'brand_example'; // string
$wipeMessage = new \IONOS\MailNotificationAPI\Client\Model\WipeMessage(); // \IONOS\MailNotificationAPI\Client\Model\WipeMessage

try {
    $apiInstance->processRemoteWipeFinishedEvent($brand, $wipeMessage);
} catch (Exception $e) {
    echo 'Exception when calling EventAPIApi->processRemoteWipeFinishedEvent: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://API_HOST/easynextcloud-mail-notification

Class Method HTTP request Description
EventAPIApi processRemoteWipeFinishedEvent POST /event/{brand}/remote-wipe-finished Nextlcoud user gets informed that a remote wipe for a specific device has finished
EventAPIApi processRemoteWipeStartedEvent POST /event/{brand}/remote-wipe-started Nextlcoud user started a remote wipe for a specific device
EventAPIApi processShareByLinkEvent POST /event/{brand}/share-by-link Nextlcoud user shared a file with other users via list of receiver email addresses
EventAPIApi processShareWithOtherUsersEvent POST /event/{brand}/share-with-other-users Nextlcoud user shared a file with other users via list of receiver user ids in uuid format

Models

Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

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

  • API version: 1.0.0-20241129122727
    • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen