lib/WebMarketingROI/OptimizelyPHP/Service/v2/Audiences.php 1 location
|
@@ 70-81 (lines=12) @@
|
67 |
|
* @return Audience |
68 |
|
* @throws \Exception |
69 |
|
*/ |
70 |
|
public function get($audienceId) |
71 |
|
{ |
72 |
|
if (!is_int($audienceId)) { |
73 |
|
throw new \Exception("Integer audience ID expected, while got '$audienceId'"); |
74 |
|
} |
75 |
|
|
76 |
|
$response = $this->client->sendApiRequest("/audiences/$audienceId"); |
77 |
|
|
78 |
|
$audience = new Audience($response); |
79 |
|
|
80 |
|
return $audience; |
81 |
|
} |
82 |
|
|
83 |
|
/** |
84 |
|
* Create an Audience for a Project. |
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Campaigns.php 1 location
|
@@ 79-90 (lines=12) @@
|
76 |
|
* @return Campaign |
77 |
|
* @throws \Exception |
78 |
|
*/ |
79 |
|
public function get($campaignId) |
80 |
|
{ |
81 |
|
if (!is_int($campaignId)) { |
82 |
|
throw new \Exception("Integer campaign ID expected, while got '$campaignId'"); |
83 |
|
} |
84 |
|
|
85 |
|
$response = $this->client->sendApiRequest("/campaigns/$campaignId"); |
86 |
|
|
87 |
|
$campaign = new Campaign($response); |
88 |
|
|
89 |
|
return $campaign; |
90 |
|
} |
91 |
|
|
92 |
|
/** |
93 |
|
* Get campaign results |
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Events.php 1 location
|
@@ 74-85 (lines=12) @@
|
71 |
|
* @return Event |
72 |
|
* @throws \Exception |
73 |
|
*/ |
74 |
|
public function get($eventId) |
75 |
|
{ |
76 |
|
if (!is_int($eventId)) { |
77 |
|
throw new \Exception("Integer event ID expected, while got '$eventId'"); |
78 |
|
} |
79 |
|
|
80 |
|
$response = $this->client->sendApiRequest("/events/$eventId"); |
81 |
|
|
82 |
|
$event = new Event($response); |
83 |
|
|
84 |
|
return $event; |
85 |
|
} |
86 |
|
|
87 |
|
/** |
88 |
|
* Creates a new click event. |
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Experiments.php 1 location
|
@@ 71-82 (lines=12) @@
|
68 |
|
* @return Experiment |
69 |
|
* @throws \Exception |
70 |
|
*/ |
71 |
|
public function get($experimentId) |
72 |
|
{ |
73 |
|
if (!is_int($experimentId)) { |
74 |
|
throw new \Exception("Integer experiment ID expected, while got '$experimentId'"); |
75 |
|
} |
76 |
|
|
77 |
|
$response = $this->client->sendApiRequest("/experiments/$experimentId"); |
78 |
|
|
79 |
|
$experiment = new Experiment($response); |
80 |
|
|
81 |
|
return $experiment; |
82 |
|
} |
83 |
|
|
84 |
|
/** |
85 |
|
* Get results for a single experiment |
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Pages.php 1 location
|
@@ 70-81 (lines=12) @@
|
67 |
|
* @return Page |
68 |
|
* @throws \Exception |
69 |
|
*/ |
70 |
|
public function get($pageId) |
71 |
|
{ |
72 |
|
if (!is_int($pageId)) { |
73 |
|
throw new \Exception("Integer page ID expected, while got '$pageId'"); |
74 |
|
} |
75 |
|
|
76 |
|
$response = $this->client->sendApiRequest("/pages/$pageId"); |
77 |
|
|
78 |
|
$page = new Page($response); |
79 |
|
|
80 |
|
return $page; |
81 |
|
} |
82 |
|
|
83 |
|
/** |
84 |
|
* Create a new Page in a provided Project |