This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from methylbro/master
Create Complete HTML Campaign through Broadcast API Endpoints
- Loading branch information
Showing
28 changed files
with
1,506 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
login: ~ | ||
password: ~ | ||
namespace: "http://tempuri.org/" | ||
wsdl: ~ | ||
options: | ||
classmap: | ||
CreateCampaignResponse: "Mediapart\\Selligent\\Response\\CreateCampaignResponse" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
login: ~ | ||
password: ~ | ||
namespace: "http://tempuri.org/" | ||
wsdl: ~ | ||
list: | ||
options: | ||
classmap: | ||
ArrayOfListInfo: "Mediapart\\Selligent\\ArrayOfListInfo" | ||
ListInfo: "Mediapart\\Selligent\\ListInfo" | ||
Property: "Mediapart\\Selligent\\Property" | ||
ArrayOfProperty: "Mediapart\\Selligent\\Properties" | ||
# System info | ||
GetSystemStatusResponse: "Mediapart\\Selligent\\Response\\GetSystemStatusResponse" | ||
# Manage Lists | ||
GetListsResponse: "Mediapart\\Selligent\\Response\\GetListsResponse" | ||
GetListIDResponse: "Mediapart\\Selligent\\Response\\GetListIDResponse" | ||
# Manage Segments | ||
CreateSegmentResponse: "Mediapart\\Selligent\\Response\\CreateSegmentResponse" | ||
AddToSegmentResponse: "Mediapart\\Selligent\\Response\\AddToSegmentResponse" | ||
GetSegmentsResponse: "Mediapart\\Selligent\\Response\\GetSegmentsResponse" | ||
GetSegmentRecordCountResponse: "Mediapart\\Selligent\\Response\\GetSegmentRecordCountResponse" | ||
# Manage Users | ||
CreateUserResponse: "Mediapart\\Selligent\\Response\\CreateUserResponse" | ||
UpdateUserResponse: "Mediapart\\Selligent\\Response\\UpdateUserResponse" | ||
UpdateUsersResponse: "Mediapart\\Selligent\\Response\\UpdateUsersResponse" | ||
GetUserByIDResponse: "Mediapart\\Selligent\\Response\\GetUserByIDResponse" | ||
RetrieveHashForUserResponse: "Mediapart\\Selligent\\Response\\RetrieveHashForUserResponse" | ||
CountUsersByConstraintResponse: "Mediapart\\Selligent\\Response\\CountUsersByConstraintResponse" | ||
GetUsersByConstraintResponse: "Mediapart\\Selligent\\Response\\GetUsersByConstraintResponse" | ||
GetUserByConstraintResponse: "Mediapart\\Selligent\\Response\\GetUserByConstraintResponse" | ||
CountUsersByFilterResponse: "Mediapart\\Selligent\\Response\\CountUsersByFilterResponse" | ||
GetUsersByFilterResponse: "Mediapart\\Selligent\\Response\\GetUsersByFilterResponse" | ||
GetUserByFilterResponse: "Mediapart\\Selligent\\Response\\GetUserByFilterResponse" | ||
# Manage Campaign | ||
TriggerCampaignResponse: "Mediapart\\Selligent\\Response\\TriggerCampaignResponse" | ||
TriggerCampaignWithResultResponse: "Mediapart\\Selligent\\Response\\TriggerCampaignWithResultResponse" | ||
TriggerCampaignForUserResponse: "Mediapart\\Selligent\\Response\\TriggerCampaignForUserResponse" | ||
TriggerCampaignForUserWithResultResponse: "Mediapart\\Selligent\\Response\\TriggerCampaignForUserWithResultResponse" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Broadcast Complete HTML Campaign | ||
|
||
```php | ||
<?php | ||
|
||
namespace Mediapart\Selligent; | ||
|
||
/* | ||
Open a connection to Selligent. | ||
*/ | ||
$connection = new Connection(); | ||
$client = $connection->open( | ||
[ | ||
'login' => '*****', | ||
'password' => '*****', | ||
'wsdl' => 'http://emsecure/broadcast?wsdl', | ||
], | ||
Connection::API_BROADCAST | ||
); | ||
|
||
/* | ||
Create your campaign. | ||
For complete options, see directly the Selligent API reference and | ||
our implementation in /src/Broadcast/ classes. | ||
*/ | ||
$campaign = new Campaign(); | ||
$campaign | ||
->setName('Campaign Test') | ||
->setState(Campaign::ACTIVE) | ||
->setStartDate(new DateTime('tomorrow')) | ||
->setDescription('Some campaign test scheduled for tomorrow.') | ||
; | ||
// ... | ||
|
||
$writer = new XMLWriter(); | ||
$request = new CreateCampaign($writer); | ||
$xml = $request->basedOn($campaign); | ||
$response = $this->client->CreateCampaign(['Xml' => $xml]); | ||
|
||
if ($response==Response::SUCCESSFUL) { | ||
print 'Your campaign has been created'; | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.