daryl-uc / autopilot
dev-dev/1.0.0
2019-02-15 06:40 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-06-14 19:27:20 UTC
README
Set of API that allow CRM to communicate with AutoPilotHQ
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 0.0.3-oas3
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"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
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: autopilotapikey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('autopilotapikey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('autopilotapikey', 'Bearer'); $apiInstance = new Swagger\Client\Api\AccountInfoApi( // 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 ); try { $result = $apiInstance->getAccount(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountInfoApi->getAccount: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://private-anon-b40d4dece5-autopilot.apiary-mock.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AccountInfoApi | getAccount | GET /account | Get the Account Information from AutoPilot |
ContactAddOrUpdateApi | createOrUpdateContact | POST /contact | Create or update a contact |
ContactOperationApi | deleteContact | DELETE /contact/{contact-email} | Delete a contact from AutoPilot |
ContactOperationApi | getContactInfo | GET /contact/{contact-email} | Returns contact information from AutoPilot |
ContactOperationApi | getFirstContactSet | GET /contacts | Get first set of contacts present in AutoPilot |
ContactOperationApi | getNextContactSet | GET /contacts/{bookmark} | Get next set of contacts present in AutoPilot |
ContactSubscriptionApi | unsubscribeContact | POST /contact/{contact-email}/unsubscribe | Unsubscribe a contact in AutoPilot |
CustomFieldsApi | getCustomFields | GET /contacts/custom_fields | Get custom fields present in AutoPilot |
HooksApi | deleteHooks | DELETE /hooks | delete all hooks |
HooksApi | getHooks | GET /hooks | get all list of all hooks present in AutoPilot |
HooksApi | registerHooks | POST /hook | register a hook |
HooksApi | unregisterHook | DELETE /hook/{hook_id} | Unregister a hook |
ListOperationApi | addToList | POST /list/{list_id}/contact/{contact_email} | Add contact to list |
ListOperationApi | checkContactInList | GET /list/{list_id}/contact/{contact_email} | Check if contact is present in AutoPilot |
ListOperationApi | getAllList | GET /lists | Returns all list present in AutoPilot |
ListOperationApi | getFirstContactSetInList | GET /list/{list_id}/contacts | Get first set of contacts present in a list from AutoPilot |
ListOperationApi | getNextContactSetInList | GET /list/{list_id}/contacts/{bookmark} | Get next set of contacts present in a list from AutoPilot |
ListOperationApi | removeFromList | DELETE /list/{list_id}/contact/{contact_email} | Remove a contact from a list in AutoPilot |
SmartSegmentApi | getSegment | GET /smart_segments | get all list present in smart segment |
TriggersApi | addTriggers | POST /trigger/{trigger_id}/contact/{contact_email} | Add a contact to journey |
TriggersApi | getTriggers | GET /triggers | get all list of all journey with API triggers |
Documentation For Models
Documentation For Authorization
autopilotapikey
- Type: API key
- API key parameter name: autopilotapikey
- Location: HTTP header
Author
- daryl-uc