@@ 32-38 (lines=7) @@ | ||
29 | $this->profileResponseBuilder = $profileResponseBuilder; |
|
30 | } |
|
31 | ||
32 | public function getProfile(ProfileQuery $profileQuery): ProfileResponse |
|
33 | { |
|
34 | $json = $this->adapter->getJson($this->adapter->getEndPoint(MapperInterface::PROFILE, $profileQuery)); |
|
35 | $data = json_decode($json, true)['data']; |
|
36 | ||
37 | return $this->profileResponseBuilder->fromData($data); |
|
38 | } |
|
39 | ||
40 | public function getNextPage(ResponseInterface $response): ResponseInterface |
|
41 | { |
|
@@ 40-46 (lines=7) @@ | ||
37 | return $this->profileResponseBuilder->fromData($data); |
|
38 | } |
|
39 | ||
40 | public function getNextPage(ResponseInterface $response): ResponseInterface |
|
41 | { |
|
42 | $json = $this->adapter->getJson($this->adapter->getUrl($response->getNextUrl())); |
|
43 | $data = json_decode($json, true)['data']; |
|
44 | ||
45 | return $this->profileResponseBuilder->fromData($data); |
|
46 | } |
|
47 | ||
48 | public function getPreviousPage(ResponseInterface $response): ResponseInterface |
|
49 | { |
|
@@ 48-54 (lines=7) @@ | ||
45 | return $this->profileResponseBuilder->fromData($data); |
|
46 | } |
|
47 | ||
48 | public function getPreviousPage(ResponseInterface $response): ResponseInterface |
|
49 | { |
|
50 | $json = $this->adapter->getJson($this->adapter->getUrl($response->getPreviousUrl())); |
|
51 | $data = json_decode($json, true)['data']; |
|
52 | ||
53 | return $this->profileResponseBuilder->fromData($data); |
|
54 | } |
|
55 | } |
|
56 |