diff --git a/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/AnthropicConfig.kt b/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/AnthropicConfig.kt index 0599377..08832ff 100644 --- a/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/AnthropicConfig.kt +++ b/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/AnthropicConfig.kt @@ -6,4 +6,6 @@ data class AnthropicConfig( val apiKey: () -> String = { "CONFIG_API_KEY" }, val baseUrl: () -> String = { Anthropic.BASE_URL }, val anthropicVersion: () -> String = { Anthropic.ANTHROPIC_VERSION }, -) : KoinComponent \ No newline at end of file +) : KoinComponent + + diff --git a/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/internal/AnthropicApi.kt b/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/internal/AnthropicApi.kt index 846abb5..551ccb7 100644 --- a/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/internal/AnthropicApi.kt +++ b/anthropic-client/anthropic-client-core/src/commonMain/kotlin/com/tddworks/anthropic/api/internal/AnthropicApi.kt @@ -5,19 +5,41 @@ import com.tddworks.anthropic.api.messages.api.Messages import com.tddworks.di.getInstance +/** + * The Anthropic API class encapsulates the necessary properties and methods to interact with the Anthropic API. + * + * @property apiKey the unique identifier for your Anthropic API account + * @property apiURL the base URL for making API requests to the Anthropic API + * @property anthropicVersion the version of the Anthropics library being used + */ class AnthropicApi( private val apiKey: String, private val apiURL: String, private val anthropicVersion: String, ) : Anthropic, Messages by getInstance() { + /** + * Gets the API key. + * + * @return The API key string. + */ override fun apiKey(): String { return apiKey } + /** + * Returns the base URL for API requests. + * + * @return The base URL of the API + */ override fun baseUrl(): String { return apiURL } + /** + * Returns the anthropic version string. + * + * @return The anthropic version string. + */ override fun anthropicVersion(): String { return anthropicVersion }