Commit a1a880a8 authored by Shakarim Sapa's avatar Shakarim Sapa

- Added new methods to Unisender API

parent 410fd530
......@@ -74,6 +74,41 @@ class UnisenderAPI {
return $this->callMethod($Name, $Params);
}
public function createList($title=null){
if ($title===null) {
$date = new DateTime;
$title = $date->format('YmdHis').(rand(100000, 999999));
}
return $this->callMethod(
'createList',
[
'title' => $title
]
);
}
public function createCampaign($message_id){
return $this->callMethod(
'createCampaign',
[
'message_id' => $message_id
]
);
}
public function createEmailMessage($sender_name, $sender_email, $subject, $body, $list_id){
return $this->callMethod(
'createEmailMessage',
[
'sender_name' => $sender_name,
'sender_email' => $sender_email,
'subject' => $subject,
'body' => $body,
'list_id' => $list_id
]
);
}
/**
* @param array $Params
* @return string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment