From 8c59f656f669b03891858a7a25e1284856ec3d7b Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 26 Mar 2023 17:06:19 +0300 Subject: [PATCH] Creating default Point API HTTP client. Defining default bind by name variables in services.yaml. --- config/services.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/config/services.yaml b/config/services.yaml index 2d6a76f..6667f72 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -10,6 +10,14 @@ services: _defaults: autowire: true # Automatically injects dependencies in your services. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + bind: + # TODO: fix retrieval + # Telegram Bot API + $telegramToken: '' + # Point API + $pointApiDelay: '' + $pointAppUserId: '' + $pointApiClient: '@app.point.http_client' # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name @@ -20,5 +28,10 @@ services: - '../src/Entity/' - '../src/Kernel.php' - # add more service definitions when explicit configuration is needed - # please note that last definitions always *replace* previous ones + # HTTP client for Point API + Symfony\Component\HttpClient\HttpClient: + alias: 'app.point.http_client' + factory: [null, 'create'] + arguments: + base_uri: '%point_base_url%' + timeout: 5.0