PHP 클래스 Sailthru_Client

파일 보기 프로젝트 열기: sailthru/sailthru-php5-client 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$api_key string Sailthru API Key
$api_uri string Sailthru API URL, can be different for different users according to their settings
$http_request_type string cURL or non-cURL request
$secret string Sailthru Secret
$user_agent_string String User agent making request to Sailthru API server Even, if you modify user-agent, please try to include 'PHP5' somewhere in the user-agent

공개 메소드들

메소드 설명
__construct ( string $api_key, string $secret, string $api_uri = false, array $options = null ) Instantiate a new client; constructor optionally takes overrides for api_uri and whether to share the version of PHP that is being used.
apiDelete ( string $action, array $data, $options = [] ) : array Perform an API DELETE request, using the shared-secret auth hash.
apiGet ( string $action, array $data = [], $method = 'GET', $options = [] ) : array Perform an API GET request, using the shared-secret auth hash.
apiPost ( string $action, array $data, array $binary_data_param = [], array $options = [] ) : array Perform an API POST (or other) request, using the shared-secret auth hash.
cancelBlast ( $blast_id ) : array Cancel a scheduled Blast
cancelSend ( string $send_id ) : array Cancel a send that was scheduled for a future time.
deleteAlert ( $email, $alert_id ) : array Remove an alert from a user's settings.
deleteBlast ( $blast_id ) : array Delete Blast
deleteList ( string $list ) : array Deletes a list.
deleteTemplate ( string $template_name ) : array Delete a template.
getAlert ( String $email ) : array Retrieve a user's alert settings.
getBlast ( $blast_id ) : array Get Blast information
getBlasts ( array $options ) : array Get info on multiple blasts
getConnectTimeout ( )
getEmail ( string $email, array $options = [] ) : array Return information about an email address, including replacement vars and lists.
getInclude ( string $include_name, array $options = [] ) : array Fetch information about an include
getIncludes ( ) : array Fetch name of all existing includes
getJobStatus ( String $job_id ) : array Get status of a job
getLastRateLimitInfo ( string $action, string $method ) : array get the rate limit information for the very last call with given action and method
getLastResponseInfo ( ) : array get information from last server response when used with cURL returns associative array as per http://us.php.net/curl_getinfo
getList ( string $list ) : array Get information about a list.
getLists ( ) : array Get information about all lists
getSend ( string $send_id ) : array Get the status of a send.
getTemplate ( string $template_name, array $options = [] ) : array Fetch information about a template
getTemplateFromRevision ( $revision_id )
getTemplates ( ) : array Fetch name of all existing templates
getTimeout ( )
getTriggerByEvent ( string $event ) : array Get information on a trigger
getTriggerById ( string $trigger_id ) : array Get information on a trigger
getTriggerByTemplate ( string $template, string $trigger_id = null ) : array Get information on a trigger
getTriggers ( ) : array Get Triggers
getUserByKey ( String $id, String $key, array $fields = [] ) : array Get user by specified key
getUserBySid ( String $id ) : array Get user by Sailthru ID
multisend ( string $template_name, array $emails, array $vars = [], array $evars = [], array $options = [] ) : array Remotely send an email template to multiple email addresses.
postEvent ( string $id, string $event, array $options = [] ) : array Notify Sailthru of an event
postEventTrigger ( string $event, integer $time, string $time_unit, string $zephyr ) : array Create a trigger for events
postTrigger ( string $template, integer $time, string $time_unit, string $event, string $zephyr ) : array Create a trigger for templates
previewBlastWithEmail ( $blast_id, $send_email ) : array Get an email preview of a blast.
previewBlastWithHTML ( $blast_id, $email ) : array Get an HTML preview of a blast.
previewContentWithEmail ( $content_html, $send_email ) : array Get an email preview of content_html.
previewContentWithHTML ( $content_html, $email ) : array Get an HTML preview of content_html.
previewRecurringBlastWithEmail ( $blast_repeat_id, $send_email ) : array Get an email preview of a recurring blast.
previewRecurringBlastWithHTML ( $blast_repeat_id, $email ) : array Get an HTML preview of a recurring blast.
previewTemplateWithEmail ( $template, $send_email ) : array Get an email preview of a template.
previewTemplateWithHTML ( $template, $email ) : array Get an HTML preview of a template.
processBlastQueryJob ( integer $blast_id, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Export blast data in CSV format
processExportListJob ( String $list, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Process a export list job
processImportJob ( String $list, String $emails, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Process import job from given email string CSV
processImportJobFromFile ( String $list, $file_path, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Process import job from given file path of a CSV or email per line file
processPurchaseImportJobFromFile ( String $file_path, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Process purchase import job from given file path of an email per line JSON file
processSnapshotJob ( array $query, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Process a snapshot job
processUpdateJob ( String $context, $value, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $file_params = [], array $options = [] ) : array Perform a bulk update of any number of user profiles from given context: String CSV, file, URL or query
processUpdateJobFromEmails ( String $emails, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Perform a bulk update of any number of user profiles from emails CSV
processUpdateJobFromFile ( $file, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Perform a bulk update of any number of user profiles from given file
processUpdateJobFromQuery ( Array $query, array $update = [], String $report_email = false, String $postback_url = false, array $options = [] ) Perform a bulk update of any number of user profiles from a query
processUpdateJobFromUrl ( String $url, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array Perform a bulk update of any number of user profiles from given URL
purchase ( $email, array $items, $incomplete = null, $message_id = null, array $options = [] ) : array Record that a user has made a purchase, or has added items to their purchase total.
purchaseIncomplete ( $email, array $items, $message_id, array $options = [] ) : array Make a purchase API call with incomplete flag
pushContent ( String $title, String $url, String $date = null, Mixed $tags = null, $vars = [], $options = [] ) : array Push a new piece of content to Sailthru, triggering any applicable alerts.
receiveHardBouncePost ( ) : boolean Hard bounce postbacks
receiveOptoutPost ( ) : boolean Optout postbacks
receiveUpdatePost ( ) : boolean Update postbacks
receiveVerifyPost ( ) : boolean Returns true if the incoming request is an authenticated verify post.
saveAlert ( String $email, String $type, String $template, String $when = null, array $options = [] ) : array Add a new alert to a user. You can add either a realtime or a summary alert (daily/weekly).
saveInclude ( string $include_name, array $include_fields = [] ) : array Save an include
saveList ( string $list, string $type = null, boolean $primary = null, array $query = [] ) : array Create a list, or update a list.
saveTemplate ( string $template_name, array $template_fields = [] ) : array Save a template.
saveTemplateFromRevision ( string $template_name, $revision_id ) : array Save a template from revision
saveUser ( String $id, array $options = [] ) : array Save existing user
scheduleBlast ( string $name, string $list, string $schedule_time, string $from_name, string $from_email, string $subject, string $content_html, string $content_text, array $options = [] ) : array Schedule a mass mail blast
scheduleBlastFromBlast ( String | integer $blast_id, String $schedule_time, array $options = [] ) : array Schedule a mass mail blast from previous blast
scheduleBlastFromTemplate ( String $template, String $list, String $schedule_time, array $options = [] ) : array Schedule a mass mail from a template
send ( string $template, string $email, array $vars = [], array $options = [], string $schedule_time = null ) : array Remotely send an email template to a single email address.
setEmail ( string $email, array $vars = [], array $lists = [], array $templates = [], integer $verified, string $optout = null, string $send = null, array $send_vars = [] ) : array Set replacement vars and/or list subscriptions for an email address.
setEmail2 ( $email, array $options = [] ) : array Update / add email address
setHorizonCookie ( string $email, string $domain = null, integer $duration = null, boolean $secure = false ) : boolean Set Horizon cookie
setHttpHeaders ( array $headers )
stats ( array $data ) : array Make Stats API Request
stats_blast ( $blast_id = null, $start_date = null, $end_date = null, array $data = [] ) : array Retrieve information about a particular blast or aggregated information from all of blasts over a specified date range.
stats_list ( String $list = null, String $date = null ) : array Retrieve information about your subscriber counts on a particular list, on a particular day.
stats_send ( $template = null, $start_date = null, $end_date = null, array $data = [] ) : array Retrieve information about a particular send or aggregated information from all of templates over a specified date range.
updateBlast ( $blast_id, string $name = null, string $list = null, string $schedule_time = null, string $from_name = null, string $from_email = null, string $subject = null, string $content_html = null, string $content_text = null, array $options = [] ) : array updates existing blast

보호된 메소드들

메소드 설명
httpRequest ( $action, array $data, string $method = 'POST', array $options = [] ) : string Perform an HTTP request, checking for curl extension support
httpRequestCurl ( string $action, array $data, string $method = 'POST', array $options = [] ) : string Perform an HTTP request using the curl extension
httpRequestWithoutCurl ( string $action, array $data, string $method = 'POST', array $options = [] ) : string Adapted from: http://netevil.org/blog/2006/nov/http-post-from-php-without-curl
prepareJsonPayload ( array $data, array $binary_data = [] ) Prepare JSON payload
processJob ( String $job, array $data = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $binary_data_param = [], array $options = [] ) : array process job api call

비공개 메소드들

메소드 설명
parseRateLimitHeaders ( string $headers ) : array | null parse rate limit headers from http response

메소드 상세

__construct() 공개 메소드

Instantiate a new client; constructor optionally takes overrides for api_uri and whether to share the version of PHP that is being used.
public __construct ( string $api_key, string $secret, string $api_uri = false, array $options = null )
$api_key string
$secret string
$api_uri string
$options array - optional parameters for connect/read timeout

apiDelete() 공개 메소드

Perform an API DELETE request, using the shared-secret auth hash.
public apiDelete ( string $action, array $data, $options = [] ) : array
$action string
$data array
리턴 array

apiGet() 공개 메소드

Perform an API GET request, using the shared-secret auth hash.
public apiGet ( string $action, array $data = [], $method = 'GET', $options = [] ) : array
$action string
$data array
리턴 array

apiPost() 공개 메소드

if binary_data_param is set, its appends '@' so that cURL can make binary POST request
public apiPost ( string $action, array $data, array $binary_data_param = [], array $options = [] ) : array
$action string
$data array
$binary_data_param array
$options array
리턴 array

cancelBlast() 공개 메소드

Cancel a scheduled Blast
public cancelBlast ( $blast_id ) : array
리턴 array API result

cancelSend() 공개 메소드

Cancel a send that was scheduled for a future time.
public cancelSend ( string $send_id ) : array
$send_id string
리턴 array API result

deleteAlert() 공개 메소드

Remove an alert from a user's settings.
public deleteAlert ( $email, $alert_id ) : array
$email
$alert_id
리턴 array API result

deleteBlast() 공개 메소드

Delete Blast
public deleteBlast ( $blast_id ) : array
리턴 array API result

deleteList() 공개 메소드

Deletes a list.
public deleteList ( string $list ) : array
$list string
리턴 array

deleteTemplate() 공개 메소드

Delete a template.
public deleteTemplate ( string $template_name ) : array
$template_name string
리턴 array API result

getAlert() 공개 메소드

Retrieve a user's alert settings.
public getAlert ( String $email ) : array
$email String
리턴 array API result

getBlast() 공개 메소드

Get Blast information
public getBlast ( $blast_id ) : array
리턴 array API result

getBlasts() 공개 메소드

Get info on multiple blasts
public getBlasts ( array $options ) : array
$options array associative array start_date (required) end-date (required) status
리턴 array API result

getConnectTimeout() 공개 메소드

public getConnectTimeout ( )

getEmail() 공개 메소드

Return information about an email address, including replacement vars and lists.
public getEmail ( string $email, array $options = [] ) : array
$email string
$options array
리턴 array API result

getInclude() 공개 메소드

Fetch information about an include
public getInclude ( string $include_name, array $options = [] ) : array
$include_name string
$options array
리턴 array API result

getIncludes() 공개 메소드

Fetch name of all existing includes
public getIncludes ( ) : array
리턴 array API result

getJobStatus() 공개 메소드

Get status of a job
public getJobStatus ( String $job_id ) : array
$job_id String
리턴 array

getLastRateLimitInfo() 공개 메소드

get the rate limit information for the very last call with given action and method
public getLastRateLimitInfo ( string $action, string $method ) : array
$action string
$method string GET, POST or DELETE
리턴 array or null

getLastResponseInfo() 공개 메소드

get information from last server response when used with cURL returns associative array as per http://us.php.net/curl_getinfo
public getLastResponseInfo ( ) : array
리턴 array or null

getList() 공개 메소드

Get information about a list.
public getList ( string $list ) : array
$list string
리턴 array

getLists() 공개 메소드

Get information about all lists
public getLists ( ) : array
리턴 array

getSend() 공개 메소드

Get the status of a send.
public getSend ( string $send_id ) : array
$send_id string
리턴 array API result

getTemplate() 공개 메소드

Fetch information about a template
public getTemplate ( string $template_name, array $options = [] ) : array
$template_name string
$options array
리턴 array API result

getTemplateFromRevision() 공개 메소드

public getTemplateFromRevision ( $revision_id )

getTemplates() 공개 메소드

Fetch name of all existing templates
public getTemplates ( ) : array
리턴 array API result

getTimeout() 공개 메소드

public getTimeout ( )

getTriggerByEvent() 공개 메소드

Get information on a trigger
public getTriggerByEvent ( string $event ) : array
$event string
리턴 array

getTriggerById() 공개 메소드

Get information on a trigger
public getTriggerById ( string $trigger_id ) : array
$trigger_id string
리턴 array

getTriggerByTemplate() 공개 메소드

Get information on a trigger
public getTriggerByTemplate ( string $template, string $trigger_id = null ) : array
$template string
$trigger_id string
리턴 array

getTriggers() 공개 메소드

Get Triggers
public getTriggers ( ) : array
리턴 array

getUserByKey() 공개 메소드

Get user by specified key
public getUserByKey ( String $id, String $key, array $fields = [] ) : array
$id String
$key String
$fields array
리턴 array

getUserBySid() 공개 메소드

Get user by Sailthru ID
public getUserBySid ( String $id ) : array
$id String
리턴 array

httpRequest() 보호된 메소드

Perform an HTTP request, checking for curl extension support
protected httpRequest ( $action, array $data, string $method = 'POST', array $options = [] ) : string
$action
$data array
$method string
$options array
리턴 string

httpRequestCurl() 보호된 메소드

Perform an HTTP request using the curl extension
protected httpRequestCurl ( string $action, array $data, string $method = 'POST', array $options = [] ) : string
$action string
$data array
$method string
$options array
리턴 string

httpRequestWithoutCurl() 보호된 메소드

Adapted from: http://netevil.org/blog/2006/nov/http-post-from-php-without-curl
protected httpRequestWithoutCurl ( string $action, array $data, string $method = 'POST', array $options = [] ) : string
$action string
$data array
$method string
$options array
리턴 string

multisend() 공개 메소드

Use the evars parameter to set replacement vars for a particular email address.
public multisend ( string $template_name, array $emails, array $vars = [], array $evars = [], array $options = [] ) : array
$template_name string
$emails array
$vars array
$evars array
$options array
리턴 array API result

postEvent() 공개 메소드

Notify Sailthru of an event
public postEvent ( string $id, string $event, array $options = [] ) : array
$id string
$event string
$options array
리턴 array

postEventTrigger() 공개 메소드

Create a trigger for events
public postEventTrigger ( string $event, integer $time, string $time_unit, string $zephyr ) : array
$event string
$time integer
$time_unit string
$zephyr string
리턴 array

postTrigger() 공개 메소드

Create a trigger for templates
public postTrigger ( string $template, integer $time, string $time_unit, string $event, string $zephyr ) : array
$template string
$time integer
$time_unit string
$event string
$zephyr string
리턴 array

prepareJsonPayload() 보호된 메소드

Prepare JSON payload
protected prepareJsonPayload ( array $data, array $binary_data = [] )
$data array
$binary_data array

previewBlastWithEmail() 공개 메소드

Get an email preview of a blast.
public previewBlastWithEmail ( $blast_id, $send_email ) : array
$blast_id
$send_email
리턴 array

previewBlastWithHTML() 공개 메소드

Get an HTML preview of a blast.
public previewBlastWithHTML ( $blast_id, $email ) : array
$blast_id
$email
리턴 array

previewContentWithEmail() 공개 메소드

Get an email preview of content_html.
public previewContentWithEmail ( $content_html, $send_email ) : array
$content_html
$send_email
리턴 array

previewContentWithHTML() 공개 메소드

Get an HTML preview of content_html.
public previewContentWithHTML ( $content_html, $email ) : array
$content_html
$email
리턴 array

previewRecurringBlastWithEmail() 공개 메소드

Get an email preview of a recurring blast.
public previewRecurringBlastWithEmail ( $blast_repeat_id, $send_email ) : array
$blast_repeat_id
$send_email
리턴 array

previewRecurringBlastWithHTML() 공개 메소드

Get an HTML preview of a recurring blast.
public previewRecurringBlastWithHTML ( $blast_repeat_id, $email ) : array
$blast_repeat_id
$email
리턴 array

previewTemplateWithEmail() 공개 메소드

Get an email preview of a template.
public previewTemplateWithEmail ( $template, $send_email ) : array
$template
$send_email
리턴 array

previewTemplateWithHTML() 공개 메소드

Get an HTML preview of a template.
public previewTemplateWithHTML ( $template, $email ) : array
$template
$email
리턴 array

processBlastQueryJob() 공개 메소드

Export blast data in CSV format
public processBlastQueryJob ( integer $blast_id, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$blast_id integer
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processExportListJob() 공개 메소드

Process a export list job
public processExportListJob ( String $list, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$list String
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processImportJob() 공개 메소드

Process import job from given email string CSV
public processImportJob ( String $list, String $emails, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$list String
$emails String
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processImportJobFromFile() 공개 메소드

Process import job from given file path of a CSV or email per line file
public processImportJobFromFile ( String $list, $file_path, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$list String
$file_path
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processJob() 보호된 메소드

process job api call
protected processJob ( String $job, array $data = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $binary_data_param = [], array $options = [] ) : array
$job String
$data array
$report_email boolean | String
$postback_url boolean | String
$binary_data_param array
$options array
리턴 array

processPurchaseImportJobFromFile() 공개 메소드

Process purchase import job from given file path of an email per line JSON file
public processPurchaseImportJobFromFile ( String $file_path, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$file_path String
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processSnapshotJob() 공개 메소드

Process a snapshot job
public processSnapshotJob ( array $query, boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$query array
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processUpdateJob() 공개 메소드

Perform a bulk update of any number of user profiles from given context: String CSV, file, URL or query
public processUpdateJob ( String $context, $value, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $file_params = [], array $options = [] ) : array
$context String
$value
$update array
$report_email boolean | String
$postback_url boolean | String
$file_params array
$options array
리턴 array

processUpdateJobFromEmails() 공개 메소드

Perform a bulk update of any number of user profiles from emails CSV
public processUpdateJobFromEmails ( String $emails, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$emails String
$update array
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processUpdateJobFromFile() 공개 메소드

Perform a bulk update of any number of user profiles from given file
public processUpdateJobFromFile ( $file, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$file
$update array
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

processUpdateJobFromQuery() 공개 메소드

Perform a bulk update of any number of user profiles from a query
public processUpdateJobFromQuery ( Array $query, array $update = [], String $report_email = false, String $postback_url = false, array $options = [] )
$query Array
$update array
$report_email String
$postback_url String
$options array

processUpdateJobFromUrl() 공개 메소드

Perform a bulk update of any number of user profiles from given URL
public processUpdateJobFromUrl ( String $url, array $update = [], boolean | String $report_email = false, boolean | String $postback_url = false, array $options = [] ) : array
$url String
$update array
$report_email boolean | String
$postback_url boolean | String
$options array
리턴 array

purchase() 공개 메소드

Record that a user has made a purchase, or has added items to their purchase total.
public purchase ( $email, array $items, $incomplete = null, $message_id = null, array $options = [] ) : array
$items array
$options array
리턴 array API result

purchaseIncomplete() 공개 메소드

Make a purchase API call with incomplete flag
public purchaseIncomplete ( $email, array $items, $message_id, array $options = [] ) : array
$items array
$options array
리턴 array API result

pushContent() 공개 메소드

Push a new piece of content to Sailthru, triggering any applicable alerts.
public pushContent ( String $title, String $url, String $date = null, Mixed $tags = null, $vars = [], $options = [] ) : array
$title String
$url String
$date String
$tags Mixed Null for empty values, or String or arrays
리턴 array API result

receiveHardBouncePost() 공개 메소드

Hard bounce postbacks
public receiveHardBouncePost ( ) : boolean
리턴 boolean

receiveOptoutPost() 공개 메소드

Optout postbacks
public receiveOptoutPost ( ) : boolean
리턴 boolean

receiveUpdatePost() 공개 메소드

Update postbacks
public receiveUpdatePost ( ) : boolean
리턴 boolean

receiveVerifyPost() 공개 메소드

Returns true if the incoming request is an authenticated verify post.
public receiveVerifyPost ( ) : boolean
리턴 boolean

saveAlert() 공개 메소드

$when is only required when alert type is weekly or daily array( 'type' => array('shoes', 'shirts'), 'min' => array('price' => 3000), 'tags' => array('blue', 'red'), ) ); $response = $sailthruClient->saveAlert("[email protected]", 'realtime', 'default', null, $options); ?>
public saveAlert ( String $email, String $type, String $template, String $when = null, array $options = [] ) : array
$email String
$type String
$template String
$when String
$options array Associative array of additive nature match Exact-match a custom variable match[type]=shoes min Minimum-value variables min[price]=30000 max Maximum-value match max[price]=50000 tags Tag-match tags[]=blue
리턴 array API result

saveInclude() 공개 메소드

Save an include
public saveInclude ( string $include_name, array $include_fields = [] ) : array
$include_name string
$include_fields array
리턴 array API result

saveList() 공개 메소드

Create a list, or update a list.
public saveList ( string $list, string $type = null, boolean $primary = null, array $query = [] ) : array
$list string
$type string
$primary boolean
$query array
리턴 array

saveTemplate() 공개 메소드

Save a template.
public saveTemplate ( string $template_name, array $template_fields = [] ) : array
$template_name string
$template_fields array
리턴 array API result

saveTemplateFromRevision() 공개 메소드

Save a template from revision
public saveTemplateFromRevision ( string $template_name, $revision_id ) : array
$template_name string
$revision_id
리턴 array API result

saveUser() 공개 메소드

Save existing user
public saveUser ( String $id, array $options = [] ) : array
$id String
$options array
리턴 array

scheduleBlast() 공개 메소드

Schedule a mass mail blast
public scheduleBlast ( string $name, string $list, string $schedule_time, string $from_name, string $from_email, string $subject, string $content_html, string $content_text, array $options = [] ) : array
$name string the name to give to this new blast
$list string the mailing list name to send to
$schedule_time string when the blast should send. Dates in the past will be scheduled for immediate delivery. Any English textual datetime format known to PHP's strtotime function is acceptable, such as 2009-03-18 23:57:22 UTC, now (immediate delivery), +3 hours (3 hours from now), or February 14, 9:30 EST. Be sure to specify a timezone if you use an exact time.
$from_name string the name appearing in the "From" of the email
$from_email string The email address to use as the "from" – choose from any of your verified emails
$subject string the subject line of the email
$content_html string the HTML-format version of the email
$content_text string the text-format version of the email
$options array associative array blast_id copy_blast copy_template replyto report_email is_link_tracking is_google_analytics is_public suppress_list test_vars email_hour_range abtest test_percent data_feed_url
리턴 array API result

scheduleBlastFromBlast() 공개 메소드

Schedule a mass mail blast from previous blast
public scheduleBlastFromBlast ( String | integer $blast_id, String $schedule_time, array $options = [] ) : array
$blast_id String | integer
$schedule_time String
$options array
리턴 array API result

scheduleBlastFromTemplate() 공개 메소드

Schedule a mass mail from a template
public scheduleBlastFromTemplate ( String $template, String $list, String $schedule_time, array $options = [] ) : array
$template String
$list String
$schedule_time String
$options array
리턴 array API result

send() 공개 메소드

If you pass the $schedule_time parameter, the send will be scheduled for a future time. Options: replyto: override Reply-To header test: send as test email (subject line will be marked, will not count towards stats)
public send ( string $template, string $email, array $vars = [], array $options = [], string $schedule_time = null ) : array
$template string
$email string
$vars array
$options array
$schedule_time string
리턴 array API result

setEmail() 공개 메소드

$lists should be an assoc array mapping list name => 1 for subscribed, 0 for unsubscribed
public setEmail ( string $email, array $vars = [], array $lists = [], array $templates = [], integer $verified, string $optout = null, string $send = null, array $send_vars = [] ) : array
$email string
$vars array
$lists array
$templates array
$verified integer 1 or 0
$optout string
$send string
$send_vars array
리턴 array API result

setEmail2() 공개 메소드

Update / add email address
public setEmail2 ( $email, array $options = [] ) : array
$options array
리턴 array API result

setHorizonCookie() 공개 메소드

Set Horizon cookie
public setHorizonCookie ( string $email, string $domain = null, integer $duration = null, boolean $secure = false ) : boolean
$email string horizon user email
$domain string
$duration integer
$secure boolean
리턴 boolean

setHttpHeaders() 공개 메소드

public setHttpHeaders ( array $headers )
$headers array

stats() 공개 메소드

Make Stats API Request
public stats ( array $data ) : array
$data array
리턴 array API result

stats_blast() 공개 메소드

Retrieve information about a particular blast or aggregated information from all of blasts over a specified date range.
public stats_blast ( $blast_id = null, $start_date = null, $end_date = null, array $data = [] ) : array
$data array
리턴 array API result

stats_list() 공개 메소드

Retrieve information about your subscriber counts on a particular list, on a particular day.
public stats_list ( String $list = null, String $date = null ) : array
$list String
$date String
리턴 array API result

stats_send() 공개 메소드

Retrieve information about a particular send or aggregated information from all of templates over a specified date range.
public stats_send ( $template = null, $start_date = null, $end_date = null, array $data = [] ) : array
$data array
리턴 array API result

updateBlast() 공개 메소드

updates existing blast
public updateBlast ( $blast_id, string $name = null, string $list = null, string $schedule_time = null, string $from_name = null, string $from_email = null, string $subject = null, string $content_html = null, string $content_text = null, array $options = [] ) : array
$name string
$list string
$schedule_time string
$from_name string
$from_email string
$subject string
$content_html string
$content_text string
$options array associative array blast_id copy_blast copy_template replyto report_email is_link_tracking is_google_analytics is_public suppress_list test_vars email_hour_range abtest test_percent data_feed_url
리턴 array API result

프로퍼티 상세

$api_key 보호되어 있는 프로퍼티

Sailthru API Key
protected string $api_key
리턴 string

$api_uri 보호되어 있는 프로퍼티

Sailthru API URL, can be different for different users according to their settings
protected string $api_uri
리턴 string

$http_request_type 보호되어 있는 프로퍼티

cURL or non-cURL request
protected string $http_request_type
리턴 string

$secret 보호되어 있는 프로퍼티

Sailthru Secret
protected string $secret
리턴 string

$user_agent_string 보호되어 있는 프로퍼티

User agent making request to Sailthru API server Even, if you modify user-agent, please try to include 'PHP5' somewhere in the user-agent
protected String $user_agent_string
리턴 String