Skip to content

Commit 74be104

Browse files
author
Justinas Pošiūnas
committed
subscribersApi fixed
1 parent 4a1f3d4 commit 74be104

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Api/Subscribers.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Subscribers extends ApiAbstract {
1717
*/
1818
public function getGroups($subscriberId, $params = [])
1919
{
20-
$this->endpoint .= $subscriberId . '/groups';
20+
$endpoint = $this->endpoint . '/' . $subscriberId . '/groups';
2121

2222
$params = array_merge($this->prepareParams(), $params);
2323

@@ -36,10 +36,10 @@ public function getGroups($subscriberId, $params = [])
3636
*/
3737
public function getActivity($subscriberId, $type = null, $params = [])
3838
{
39-
$this->endpoint .= $subscriberId . '/activity';
39+
$endpoint = $this->endpoint . '/' . $subscriberId . '/activity';
4040

4141
if ($type !== null) {
42-
$this->endpoint .= '/' . $type;
42+
$endpoint .= '/' . $type;
4343
}
4444

4545
$params = array_merge($this->prepareParams(), $params);
@@ -57,11 +57,11 @@ public function getActivity($subscriberId, $type = null, $params = [])
5757
*/
5858
public function search($query)
5959
{
60-
$this->endpoint .= '/search';
60+
$endpoint = $this->endpoint . '/search';
6161

6262
$params = array_merge($this->prepareParams(), ['query' => $query]);
6363

64-
$response = $this->restClient->get($this->endpoint, $params);
64+
$response = $this->restClient->get($endpoint, $params);
6565

6666
return $response['body'];
6767
}

0 commit comments

Comments
 (0)