PHP Класс DrewM\MailChimp\Batch

http://developer.mailchimp.com/documentation/mailchimp/reference/batches/
Автор: Drew McLellan ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( MailChimp $MailChimp, $batch_id = null )
check_status ( string $batch_id = null ) : array | false Check the status of a batch request. If the current instance of the Batch object was used to make the request, the batch_id is already known and is therefore optional.
delete ( string $id, string $method ) : void Add an HTTP DELETE request operation to the batch - for deleting data
execute ( integer $timeout = 10 ) : array | false Execute the batch request
get ( string $id, string $method, array $args = [] ) : void Add an HTTP GET request operation to the batch - for retrieving data
patch ( string $id, string $method, array $args = [] ) : void Add an HTTP PATCH request operation to the batch - for performing partial updates
post ( string $id, string $method, array $args = [] ) : void Add an HTTP POST request operation to the batch - for creating and updating items
put ( string $id, string $method, array $args = [] ) : void Add an HTTP PUT request operation to the batch - for creating new items

Приватные методы

Метод Описание
queueOperation ( string $http_verb, string $id, string $method, array $args = null ) : void Add an operation to the internal queue.

Описание методов

__construct() публичный Метод

public __construct ( MailChimp $MailChimp, $batch_id = null )
$MailChimp MailChimp

check_status() публичный Метод

Check the status of a batch request. If the current instance of the Batch object was used to make the request, the batch_id is already known and is therefore optional.
public check_status ( string $batch_id = null ) : array | false
$batch_id string ID of the batch about which to enquire
Результат array | false Assoc array of API response, decoded from JSON

delete() публичный Метод

Add an HTTP DELETE request operation to the batch - for deleting data
public delete ( string $id, string $method ) : void
$id string ID for the operation within the batch
$method string URL of the API request method
Результат void

execute() публичный Метод

Execute the batch request
public execute ( integer $timeout = 10 ) : array | false
$timeout integer Request timeout in seconds (optional)
Результат array | false Assoc array of API response, decoded from JSON

get() публичный Метод

Add an HTTP GET request operation to the batch - for retrieving data
public get ( string $id, string $method, array $args = [] ) : void
$id string ID for the operation within the batch
$method string URL of the API request method
$args array Assoc array of arguments (usually your data)
Результат void

patch() публичный Метод

Add an HTTP PATCH request operation to the batch - for performing partial updates
public patch ( string $id, string $method, array $args = [] ) : void
$id string ID for the operation within the batch
$method string URL of the API request method
$args array Assoc array of arguments (usually your data)
Результат void

post() публичный Метод

Add an HTTP POST request operation to the batch - for creating and updating items
public post ( string $id, string $method, array $args = [] ) : void
$id string ID for the operation within the batch
$method string URL of the API request method
$args array Assoc array of arguments (usually your data)
Результат void

put() публичный Метод

Add an HTTP PUT request operation to the batch - for creating new items
public put ( string $id, string $method, array $args = [] ) : void
$id string ID for the operation within the batch
$method string URL of the API request method
$args array Assoc array of arguments (usually your data)
Результат void