@@ -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