|
@@ 40-46 (lines=7) @@
|
| 37 |
|
return $this->profileResponseFactory->fromProfileData($data); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function getNextPage(KvkPaginatorInterface $kvkPaginator): KvkPaginatorInterface |
| 41 |
|
{ |
| 42 |
|
$json = $this->httpClient->getJson($this->httpClient->getUrl($kvkPaginator->getNextUrl())); |
| 43 |
|
$data = $this->decodeJsonToArray($json); |
| 44 |
|
|
| 45 |
|
return $this->profileResponseFactory->fromProfileData($data); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function getPreviousPage(KvkPaginatorInterface $kvkPaginator): KvkPaginatorInterface |
| 49 |
|
{ |
|
@@ 48-54 (lines=7) @@
|
| 45 |
|
return $this->profileResponseFactory->fromProfileData($data); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function getPreviousPage(KvkPaginatorInterface $kvkPaginator): KvkPaginatorInterface |
| 49 |
|
{ |
| 50 |
|
$json = $this->httpClient->getJson($this->httpClient->getUrl($kvkPaginator->getPreviousUrl())); |
| 51 |
|
$data = $this->decodeJsonToArray($json); |
| 52 |
|
|
| 53 |
|
return $this->profileResponseFactory->fromProfileData($data); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
private function decodeJsonToArray(string $json): array |
| 57 |
|
{ |
|
@@ 32-38 (lines=7) @@
|
| 29 |
|
$this->profileResponseFactory = $profileResponseFactory; |
| 30 |
|
} |
| 31 |
|
|
| 32 |
|
public function getProfile(ProfileQuery $profileQuery): KvkPaginatorInterface |
| 33 |
|
{ |
| 34 |
|
$json = $this->httpClient->getJson($this->httpClient->getEndpoint(MapperInterface::PROFILE, $profileQuery)); |
| 35 |
|
$data = $this->decodeJsonToArray($json); |
| 36 |
|
|
| 37 |
|
return $this->profileResponseFactory->fromProfileData($data); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function getNextPage(KvkPaginatorInterface $kvkPaginator): KvkPaginatorInterface |
| 41 |
|
{ |