Skip to content

Commit

Permalink
chore: Publish v0.0.18-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
anssari1 authored and github-actions[bot] committed Nov 25, 2024
1 parent dcc048f commit bc26e3f
Show file tree
Hide file tree
Showing 322 changed files with 42,175 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code/LICENSE-HEADER.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (C) 2022 Expedia, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
14 changes: 14 additions & 0 deletions code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Welcome to the xap-sdk SDK!

## Usage
```xml
<dependency>
<groupId>com.expediagroup</groupId>
<artifactId>xap-sdk</artifactId>
<version>0.0.18-SNAPSHOT</version>
</dependency>
```

## License

This project is licensed under the Apache License v2.0 - see the [LICENSE](LICENSE) for details.
874 changes: 874 additions & 0 deletions code/pom.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2022 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.expediagroup.sdk.core.client

import com.expediagroup.sdk.core.configuration.RapidClientConfiguration
import com.expediagroup.sdk.core.configuration.collector.ConfigurationCollector
import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider
import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvider
import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy
import io.ktor.client.HttpClient
import io.ktor.client.engine.HttpClientEngine

/**
* The integration point between the SDK Core and the product SDKs.
*
* @param httpClientEngine The HTTP client engine to use.
* @param clientConfiguration The configuration for the client.
*/
abstract class BaseRapidClient(
namespace: String,
clientConfiguration: RapidClientConfiguration,
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE
) : Client(namespace) {
private val _configurationProvider: ConfigurationProvider =
ConfigurationCollector.create(
clientConfiguration.toProvider(),
RapidConfigurationProvider
)
private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.SIGNATURE, httpClientEngine)

init {
finalize()
}

override val configurationProvider: ConfigurationProvider
get() = _configurationProvider

override val httpClient: HttpClient
get() = _httpClient

/** A [BaseRapidClient] builder. */
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
abstract class Builder<SELF : Builder<SELF>> : Client.Builder<SELF>()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2022 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.expediagroup.sdk.core.client

import com.expediagroup.sdk.core.configuration.XapClientConfiguration
import com.expediagroup.sdk.core.configuration.collector.ConfigurationCollector
import com.expediagroup.sdk.core.configuration.provider.ConfigurationProvider
import com.expediagroup.sdk.core.configuration.provider.XapConfigurationProvider
import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy
import io.ktor.client.HttpClient
import io.ktor.client.engine.HttpClientEngine

/**
* The integration point between the SDK Core and the product SDKs.
*
* @param httpClientEngine The HTTP client engine to use.
* @param clientConfiguration The configuration for the client.
*/
abstract class BaseXapClient(
namespace: String,
clientConfiguration: XapClientConfiguration,
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE
) : Client(namespace) {
private val _configurationProvider: ConfigurationProvider =
ConfigurationCollector.create(
clientConfiguration.toProvider(),
XapConfigurationProvider
)
private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.BASIC, httpClientEngine)

init {
finalize()
}

override val configurationProvider: ConfigurationProvider
get() = _configurationProvider

override val httpClient: HttpClient
get() = _httpClient

/** A [BaseXapClient] builder. */
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
abstract class Builder<SELF : Builder<SELF>> : Client.Builder<SELF>()
}
Loading

0 comments on commit bc26e3f

Please sign in to comment.