PHP class for using our company's API as part of the subscription.
Run following command in terminal from the root of your project:
composer require emailplatform/api_parser
You can load dependencies by adding these lines to your code:
require_once 'vendor/emailplatform/api_parser/src/settings.php';
require_once 'vendor/emailplatform/api_parser/src/ApiParser.class.php';
- Set up your API credentials (apiusername & apitoken) into settings.php
- Create instance from ApiParser.class.php
$parser = new ApiParser($settings);
- Call method from ApiParser
$autoresponderid = 1;
$startDate = "01.11.2018";
$endDate = "04.11.2018";
$parser->GetAutoresponderSummary($newsletterid, $startDate, $endDate);
- GetTriggerSummary
Definition:
public function GetTriggerSummary($triggerid = false, $from = false, $to = false)
- GetAutoresponderSummary
Definition:
public function GetAutoresponderSummary($autoresponderid = false, $from = false, $to = false)
- GetSegmentSummary
Definition:
public function GetSegmentSummary($segmentid = false, $from = false, $to = false)
- GetRulesForSegment
Definition:
public function GetRulesForSegment($segmentid = false)
- EditNewsletter
Definition:
public function EditNewsletter($newsletterid = false, $name = false, $subject = false)
- SetTriggerStatus
Definition:
public function SetTriggerStatus($triggerid = false, $status = false)
- SetAutoresponderStatus
Definition:
public function SetAutoresponderStatus($autoresponderid = false, $status = false)
- SendSMS
Definition:
public function SendSMS($campaignid = 0, $subject = '', $text = '', $subscriberid = 0, $listid = 0, $mobile = '', $mobilePrefix = '')
- GetSubscribersFromSegment
Definition:
public function GetSubscribersFromSegment($segmentid = false, $countonly = false, $activeonly = true, $limit = 100, $offset = 0)
- GetTriggersForSegment
Definition:
public function GetTriggersForSegment($segmentid)
- ViewNewsletter
Definition:
public function ViewNewsletter($newsletterid)
- GetNewsletters
Previous:
public function GetNewsletters($countOnly= false, $getLastSentDetails = false, $content = true, $aftercreatedate = false, $newsletterNameLike = false)Now:
public function GetNewsletters($countOnly= false, $getLastSentDetails = false, $content = true, $aftercreatedate = false, $newsletterNameLike = false, $limit = false, $offset = false)
- Added: $limit & $offset.
Old name [v1.0] | New name [v1.1] |
---|---|
Create_List | CreateList |
Update_List | UpdateList |
Delete_List | DeleteList |
Update_Subscriber | UpdateSubscriber |
Copy_Newsletter | CopyNewsletter |
- UnsubscribeSubscriberEmail
Previous:
public function UnsubscribeSubscriberEmail ($emailaddress = false, $listid = false, $subscriberid = false, $skipcheck = false, $statid = false)Now:
public function UnsubscribeSubscriberEmail ($listid = false, $emailaddress = false, $subscriberid = false, $skipcheck = false, $statid = false)
- UnsubscribeSubscriberMobile
Previous:
public function UnsubscribeSubscriberMobile ($mobile = false, $mobilePrefix = false, $listid = false, $subscriberid = false, $skipcheck = false, $statid = false)Now:
public function UnsubscribeSubscriberMobile ($listid = false, $mobile = false, $mobilePrefix = false, $subscriberid = false, $skipcheck = false, $statid = false)
- GetSubscriberDetails
Previous:
public function GetSubscriberDetails($emailaddress = false, $listid = false)Now:
public function GetSubscriberDetails($listid = false, $subscriberid = false, $emailaddress = false, $mobile = false, $mobile_prefix = false)
- Added: subscriberid, mobile and mobile_prefix.
- GetRecipients
Previous:
public function GetRecipients($statid = false, $stats_type = false, $count_only = false)Now:
public function GetRecipients($statid = false, $count_only = false)
- Removed: stats_type.
- ActivateSubscriber
Previous:
public function ActivateSubscriber ($service = false, $lists = false, $emailaddress = false, $mobile = false, $mobile_prefix = false)Now:
public function ActivateSubscriber ($service = false, $listid = false, $emailaddress = false, $mobile = false, $mobile_prefix = false, $subscriberid = false)
- Added: subscriberid.
- UpdateSubscriber
Previous:
public function UpdateSubscriber($subscriberid = false, $emailaddress = false, $mobile = false, $listid = false, $customfields = array())Now:
public function UpdateSubscriber($listid = false, $subscriberid = false, $emailaddress = false, $mobile = false, $mobilePrefix = false, $customfields = array())
- Added: mobile, mobilePrefix.
- ScheduleSendSMS
Previous:
public function ScheduleSendSMS($campaignid = false, $hours = false, $lists = false)Now:
public function ScheduleSendSMS($campaignid = false, $lists = false, $hours = false)