From fdd7883c13f2aeacd55c9da4a8a6d68a931a6e0c Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Wed, 16 Oct 2024 13:09:37 +0200 Subject: [PATCH] chore: Share sharedApiUrlCreator with injection + README --- STCore/README.md | 23 +++++++++++++++---- .../SwissTransferInjection.kt | 3 +++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/STCore/README.md b/STCore/README.md index d6bdc6e9..2f941583 100644 --- a/STCore/README.md +++ b/STCore/README.md @@ -33,11 +33,12 @@ centralized access point to orchestrate transfer operations. ### Table of Public Properties and Methods -| Type | Name | Description | -|----------|--------------------|-------------------------------------------------------| -| Property | appSettingsManager | A manager used to orchestrate AppSettings operations. | -| Property | transferManager | A manager used to orchestrate Transfers operations. | -| Property | accountManager | A manager used to orchestrate Accounts operations. | +| Type | Name | Description | +|----------|---------------------|-------------------------------------------------------| +| Property | appSettingsManager | A manager used to orchestrate AppSettings operations. | +| Property | transferManager | A manager used to orchestrate Transfers operations. | +| Property | accountManager | A manager used to orchestrate Accounts operations. | +| Property | sharedApiUrlCreator | An utils to help use shared routes | ### Details of Properties and Methods @@ -83,6 +84,18 @@ centralized access point to orchestrate transfer operations. // Use the accountManager to orchestrate Accounts ``` +#### Property: `sharedApiUrlCreator` + +- **Type**: `SharedApiUrlCreator` +- **Description**: + - `sharedApiUrlCreator` is an utility class responsible for creating API URLs for shared routes. + +- **Usage Example**: + ```kotlin + val core = SwissTransferInjection() + val accountManager = core.sharedApiUrlCreator + ``` + ## Contributing We welcome contributions to the SwissTransfer Network module! If you find a bug or want to add a new feature, please open an issue diff --git a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/SwissTransferInjection.kt b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/SwissTransferInjection.kt index 8b9f1a3f..38e1994c 100644 --- a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/SwissTransferInjection.kt +++ b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/SwissTransferInjection.kt @@ -59,4 +59,7 @@ class SwissTransferInjection { /** A manager used to orchestrate Accounts operations. */ val accountManager by lazy { AccountManager(appSettingsController, uploadController, transferController, realmProvider) } + + /** An utils to help use shared routes */ + val sharedApiUrlCreator by lazy { SharedApiUrlCreator(transferController, uploadController) } }