1 | <?php |
||
16 | class Lift extends Client |
||
17 | { |
||
18 | /** |
||
19 | * @var \NickVeenhof\Hmac\KeyInterface A sample key |
||
20 | */ |
||
21 | protected $authKey; |
||
22 | |||
23 | /** |
||
24 | * @var string The account we are using |
||
25 | */ |
||
26 | protected $accountId; |
||
27 | |||
28 | /** |
||
29 | * @var string The site identifier we are using |
||
30 | */ |
||
31 | protected $siteId; |
||
32 | |||
33 | /** |
||
34 | * Overrides \GuzzleHttp\Client::__construct(). |
||
35 | * |
||
36 | * @param string $account_id The Lift Web Account Identifier. Eg.: MYACCOUNT |
||
37 | * @param string $site_id The Lift Web Site Identifier. Eg.: my-drupal-site |
||
38 | * @param string $public_key The Lift Web Public Key. Not all API keys have |
||
39 | * the same permissions so be mindful which key |
||
40 | * you are using |
||
41 | * @param string $secret_key The Lift Web Secret Key belonging to the Public |
||
42 | * Key |
||
43 | * @param array $config |
||
44 | */ |
||
45 | public function __construct( |
||
86 | |||
87 | 27 | public function addLiftAccountAndSiteId() |
|
115 | 27 | ||
116 | 27 | /** |
|
117 | * Pings the service to ensure that it is available. |
||
118 | * |
||
119 | * @return \Psr\Http\Message\ResponseInterface |
||
120 | * |
||
121 | * @throws \GuzzleHttp\Exception\RequestException |
||
122 | */ |
||
123 | public function ping() |
||
130 | 3 | ||
131 | /** |
||
132 | * Get the Slot Manager. |
||
133 | * |
||
134 | * @return \Acquia\LiftClient\Manager\SlotManager |
||
135 | */ |
||
136 | public function getSlotManager() |
||
140 | 24 | ||
141 | /** |
||
142 | * Get the Slot Manager. |
||
143 | * |
||
144 | * @return \Acquia\LiftClient\Manager\GoalManager |
||
145 | */ |
||
146 | public function getGoalManager() |
||
150 | |||
151 | /** |
||
152 | * Get the Segment Manager. |
||
153 | * |
||
154 | * @return \Acquia\LiftClient\Manager\SegmentManager |
||
155 | */ |
||
156 | public function getSegmentManager() |
||
160 | 12 | ||
161 | 12 | /** |
|
162 | * Get the Rules Manager. |
||
163 | * |
||
164 | 2 | * @return \Acquia\LiftClient\Manager\RuleManager |
|
165 | */ |
||
166 | public function getRuleManager() |
||
170 | |||
171 | /** |
||
172 | * Make the given Request and return as JSON Decoded PHP object. |
||
173 | * |
||
174 | * @param RequestInterface $request |
||
175 | * |
||
176 | * @return mixed the value encoded in <i>json</i> in appropriate |
||
177 | * PHP type. Values true, false and |
||
178 | * null (case-insensitive) are returned as <b>TRUE</b>, <b>FALSE</b> |
||
179 | * and <b>NULL</b> respectively. <b>NULL</b> is returned if the |
||
180 | * <i>json</i> cannot be decoded or if the encoded |
||
181 | * data is deeper than the recursion limit |
||
182 | * |
||
183 | * @throws \GuzzleHttp\Exception\RequestException |
||
184 | */ |
||
185 | public function getResponseJson(RequestInterface $request) |
||
192 | } |
||
193 |