travel.wink.sdk.analytics.AnalyticsSDKConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of analytics-sdk-java Show documentation
Show all versions of analytics-sdk-java Show documentation
Java SDK for the Wink Analytics API
package travel.wink.sdk.analytics;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;
import travel.wink.sdk.analytics.api.AnalyticsApi;
import travel.wink.sdk.analytics.api.LeaderboardApi;
import travel.wink.sdk.analytics.invoker.ApiClient;
@RequiredArgsConstructor
@Configuration
public class AnalyticsSDKConfiguration {
private final WebClient webClient;
@Bean
public ApiClient apiClient() {
return new ApiClient(this.webClient);
}
@Bean
public AnalyticsApi bookingApi() {
return new AnalyticsApi(apiClient());
}
@Bean
public LeaderboardApi leaderboardApi() {
return new LeaderboardApi(apiClient());
}
}