Skip to content

Latest commit

 

History

History
271 lines (188 loc) · 7.57 KB

ListsApi.md

File metadata and controls

271 lines (188 loc) · 7.57 KB

Swagger\Client\ListsApi

All URIs are relative to https://api.bombbomb.com/v2

Method HTTP request Description
addNewList POST /lists/ Add list.
clearList PUT /lists/{listId}/clear Clear Contacts from List
copyListContacts POST /lists/{listId}/copy Copy All Contacts from a List
getAllLists GET /lists/ Get all Lists
suppressAllInList PUT /lists/{listId}/suppress Suppress All Contacts from List

addNewList

addNewList($listName)

Add list.

Add a list to the users account.

Example

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

// Configure OAuth2 access token for authorization: BBOAuth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ListsApi(
    // 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
);
$listName = "listName_example"; // string | Name of the new list being added

try {
    $apiInstance->addNewList($listName);
} catch (Exception $e) {
    echo 'Exception when calling ListsApi->addNewList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
listName string Name of the new list being added

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

clearList

clearList($listId)

Clear Contacts from List

Clears all contacts from a list.

Example

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

// Configure OAuth2 access token for authorization: BBOAuth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ListsApi(
    // 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
);
$listId = "listId_example"; // string | The list to be cleared.

try {
    $apiInstance->clearList($listId);
} catch (Exception $e) {
    echo 'Exception when calling ListsApi->clearList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
listId string The list to be cleared.

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

copyListContacts

copyListContacts($fromListId, $listId)

Copy All Contacts from a List

Copy all contacts from a list.

Example

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

// Configure OAuth2 access token for authorization: BBOAuth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ListsApi(
    // 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
);
$fromListId = "fromListId_example"; // string | The list to be cleared.
$listId = "listId_example"; // string | The list to be cleared.

try {
    $apiInstance->copyListContacts($fromListId, $listId);
} catch (Exception $e) {
    echo 'Exception when calling ListsApi->copyListContacts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
fromListId string The list to be cleared.
listId string The list to be cleared.

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAllLists

getAllLists()

Get all Lists

Get all the lists for a specific user.

Example

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

// Configure OAuth2 access token for authorization: BBOAuth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ListsApi(
    // 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 {
    $apiInstance->getAllLists();
} catch (Exception $e) {
    echo 'Exception when calling ListsApi->getAllLists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

suppressAllInList

suppressAllInList($listId)

Suppress All Contacts from List

Suppresses all contacts in a list.

Example

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

// Configure OAuth2 access token for authorization: BBOAuth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ListsApi(
    // 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
);
$listId = "listId_example"; // string | The list to be cleared.

try {
    $apiInstance->suppressAllInList($listId);
} catch (Exception $e) {
    echo 'Exception when calling ListsApi->suppressAllInList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
listId string The list to be cleared.

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]