fix(service): make api endpoints configurable
This commit is contained in:
@@ -18,6 +18,7 @@ class BriloApiComments
|
||||
protected readonly HttpClientInterface $httpClient,
|
||||
protected readonly LoggerInterface $logger,
|
||||
protected readonly SerializerInterface $serializer,
|
||||
protected readonly string $url,
|
||||
protected readonly int $retryCount = 3,
|
||||
protected readonly int $sleepTimeS = 1,
|
||||
) {
|
||||
@@ -30,6 +31,6 @@ class BriloApiComments
|
||||
*/
|
||||
public function getComments(): array
|
||||
{
|
||||
return $this->fetchApiResponse('https://jsonplaceholder.typicode.com/comments', Comment::class);
|
||||
return $this->fetchApiResponse($this->url, Comment::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user