Skip to content

PHP class for using our company API as part of the subscription

Notifications You must be signed in to change notification settings

Netimage/ApiParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 

Repository files navigation

ApiParser

PHP class for using our company's API as part of the subscription.



Installation

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';


How to use

  1. Set up your API credentials (apiusername & apitoken) into settings.php
  2. Create instance from ApiParser.class.php
$parser = new ApiParser($settings);
  1. Call method from ApiParser
$autoresponderid = 1;
$startDate = "01.11.2018";
$endDate = "04.11.2018";
$parser->GetAutoresponderSummary($newsletterid, $startDate, $endDate);


Changelog:

Differences between v1.1.10 and v1.1.11

New methods:

  • GetTriggerSummary

Definition:

public function GetTriggerSummary($triggerid = false, $from = false, $to = false)

  • GetAutoresponderSummary

Definition:

public function GetAutoresponderSummary($autoresponderid = false, $from = false, $to = false)

Differences between v1.1.9 and v1.1.10

New methods:

  • 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)

Differences between v1.1 and v1.1.9

New methods:

  • 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)

Method definition changed:

  • 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.


Differences between v1.0 and v1.1

Renamed methods:

Old name [v1.0] New name [v1.1]
Create_List CreateList
Update_List UpdateList
Delete_List DeleteList
Update_Subscriber UpdateSubscriber
Copy_Newsletter CopyNewsletter

Method definition changed:

  • 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)

About

PHP class for using our company API as part of the subscription

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%