kerekit/salesautopilot-api

API client for SalesAutopilot email marketing

v1.0.3 2022-03-29 16:51 UTC

This package is auto-updated.

Last update: 2024-08-29 05:56:33 UTC


README

Features:

  • Provides basic delete(), get(), post() and put() methods for any resource.
  • Handles authentication from constructor arguments.
  • Formats requests and parses responses, throws generic Error instance if fails.

Installation

Install the latest version with

$ composer require kerekit/salesautopilot-api

Basic Usage

<?php

use Kerekit\SalesAutopilotApi\Client;

// Init API client with credentials
$api = new Client ('my-username', 'my-api-key');

// Get subscribers by list ID
$list = $api->get ('list/1234');

// Output first subscriber's (if any) email address
$subscriber = reset ($list);
if ($subscriber === false) {
    echo "No subscriber on the list.\n";
} else {
    echo "First subscriber on the list has the email: '$subscriber[email]'\n";
}

API documentation

See the official API documentation for available resources, parameters, request and response examples.