datalinx/squalomail-php-sdk

v1.3.0 2022-10-21 08:42 UTC

README

Packagist PHP Version Support Packagist Version Packagist Downloads Tests Conventional Commits Packagist License

About

Disclaimer: This is not an official SDK.

With this package you can use the SqualoMail API in your PHP project.

See the changelog here.

Requirements

  • PHP >= 7.4
  • CURL and JSON PHP extensions
  • Ubuntu is tested and supported, but should also work on Windows

Installing

Download it with composer:

composer require datalinx/squalomail-php-sdk

Usage

$api = new API('your API key here');

$request = new CreateRecipient($api);
$request->email = 'john@example.com';
$request->name = 'John';
$request->surname = 'Doe';

try {
    $response = $request->send();
    
    // Subscribed, see the CreateRecipientResponse class for details
    echo $response->getRecipient()->id;
}
catch (Exception $exception) {
    echo 'Oops, something went wrong: '. $exception->getMessage();
}

Requests implementation

All API endpoints are specified here.
However, only the following are implemented in this package currently.

Contributing

If you have some suggestions how to make this package better, please open an issue or even better, submit a pull request.

Should you want to contribute, please see the development guidelines in the DataLinx PHP package template.

Changelog

All notable changes to this project are automatically documented in the CHANGELOG.md file using the release workflow, based on the release-please GitHub action.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

For all this to work, commit messages must follow the Conventional commits specification, which is also enforced by a Git hook.

Developer documentation