\DrewM\MailChimpBatch

A MailChimp Batch operation.

http://developer.mailchimp.com/documentation/mailchimp/reference/batches/

Summary

Methods
Properties
Constants
__construct()
delete()
get()
patch()
post()
put()
execute()
check_status()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$MailChimp
$operations
$batch_id
N/A

Properties

$MailChimp

$MailChimp : 

Type

$operations

$operations : 

Type

$batch_id

$batch_id : 

Type

Methods

__construct()

__construct(\DrewM\MailChimp\MailChimp  $MailChimp,   $batch_id = null) 

Parameters

\DrewM\MailChimp\MailChimp $MailChimp
$batch_id

delete()

delete(string  $id, string  $method) : void

Add an HTTP DELETE request operation to the batch - for deleting data

Parameters

string $id

ID for the operation within the batch

string $method

URL of the API request method

get()

get(string  $id, string  $method, array  $args = array()) : void

Add an HTTP GET request operation to the batch - for retrieving data

Parameters

string $id

ID for the operation within the batch

string $method

URL of the API request method

array $args

Assoc array of arguments (usually your data)

patch()

patch(string  $id, string  $method, array  $args = array()) : void

Add an HTTP PATCH request operation to the batch - for performing partial updates

Parameters

string $id

ID for the operation within the batch

string $method

URL of the API request method

array $args

Assoc array of arguments (usually your data)

post()

post(string  $id, string  $method, array  $args = array()) : void

Add an HTTP POST request operation to the batch - for creating and updating items

Parameters

string $id

ID for the operation within the batch

string $method

URL of the API request method

array $args

Assoc array of arguments (usually your data)

put()

put(string  $id, string  $method, array  $args = array()) : void

Add an HTTP PUT request operation to the batch - for creating new items

Parameters

string $id

ID for the operation within the batch

string $method

URL of the API request method

array $args

Assoc array of arguments (usually your data)

execute()

execute(integer  $timeout = 10) : array|false

Execute the batch request

Parameters

integer $timeout

Request timeout in seconds (optional)

Returns

array|false —

Assoc array of API response, decoded from JSON

check_status()

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.

Parameters

string $batch_id

ID of the batch about which to enquire

Returns

array|false —

Assoc array of API response, decoded from JSON