diff --git a/.gitignore b/.gitignore index 603b140..7ef5a0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,7 @@ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml +/.idea/ .DS_Store /build /captures diff --git a/build.gradle.kts b/build.gradle.kts index 0003519..757cb2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,18 +23,19 @@ group = "com.github.mmoghaddam385" dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10") - val ktorVersion = "1.6.7" - implementation("io.ktor:ktor-client-core:$ktorVersion") - implementation("io.ktor:ktor-client-websockets:$ktorVersion") - implementation("io.ktor:ktor-client-okhttp:$ktorVersion") - implementation("io.ktor:ktor-client-serialization-jvm:$ktorVersion") + val ktorVersion = "2.1.3" + implementation("io.ktor:ktor-client-core-jvm:$ktorVersion") + implementation("io.ktor:ktor-client-websockets-jvm:$ktorVersion") + implementation("io.ktor:ktor-client-okhttp-jvm:$ktorVersion") + implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion") + implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") // Annotation processor that generates Java builders for data classes val ktBuilderVersion = "1.2.1" implementation("com.thinkinglogic.builder:kotlin-builder-annotation:$ktBuilderVersion") kapt("com.thinkinglogic.builder:kotlin-builder-processor:$ktBuilderVersion") - testImplementation("junit:junit:4.12") + testImplementation("junit:junit:4.13.2") } allprojects { diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 7a53f8d..a8297f5 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { implementation("com.squareup.okhttp3:okhttp:4.7.2") // For custom CIO engine on defaultJvmHttpClientProvider - implementation("io.ktor:ktor-client-cio:1.3.1") + implementation("io.ktor:ktor-client-cio-jvm:2.1.2") // For pretty printing data classes implementation("com.tylerthrailkill.helpers:pretty-print:2.0.2") diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/HttpClientProvider.kt b/src/main/kotlin/io/polygon/kotlin/sdk/HttpClientProvider.kt index 2628238..55c3b26 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/HttpClientProvider.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/HttpClientProvider.kt @@ -3,10 +3,10 @@ package io.polygon.kotlin.sdk import io.ktor.client.* import io.ktor.client.engine.* import io.ktor.client.engine.okhttp.* -import io.ktor.client.features.json.JsonFeature -import io.ktor.client.features.json.serializer.* -import io.ktor.client.features.websocket.* +import io.ktor.client.plugins.contentnegotiation.* +import io.ktor.client.plugins.websocket.* import io.ktor.http.* +import io.ktor.serialization.kotlinx.json.* import kotlinx.serialization.json.Json import okhttp3.Interceptor @@ -55,8 +55,8 @@ constructor( override fun buildClient() = HttpClient(buildEngine()) { install(WebSockets) - install(JsonFeature) { - serializer = KotlinxSerializer(Json { + install(ContentNegotiation) { + json(Json { isLenient = true ignoreUnknownKeys = true }) diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/Aggregates.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/Aggregates.kt index ccc3702..e772e5c 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/Aggregates.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/Aggregates.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/GroupedDaily.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/GroupedDaily.kt index a3f1735..d5f3bee 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/GroupedDaily.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/GroupedDaily.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import io.polygon.kotlin.sdk.rest.reference.PolygonReferenceClient /** See [PolygonRestClient.getGroupedDailyAggregatesBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/PolygonRestClient.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/PolygonRestClient.kt index 1c339f1..117dbd5 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/PolygonRestClient.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/PolygonRestClient.kt @@ -1,6 +1,7 @@ package io.polygon.kotlin.sdk.rest import io.ktor.client.HttpClient +import io.ktor.client.call.body import io.ktor.client.request.get import io.ktor.http.URLBuilder import io.polygon.kotlin.sdk.DefaultJvmHttpClientProvider @@ -92,7 +93,7 @@ constructor( urlBuilderBlock: URLBuilder.() -> Unit ): T { val url = baseUrlBuilder.apply(urlBuilderBlock).build() - return withHttpClient { httpClient -> httpClient.get(url) } + return withHttpClient { httpClient -> httpClient.get(url) }.body() } } diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/DailyOpenClose.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/DailyOpenClose.kt index bb735fc..acc6bb4 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/DailyOpenClose.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/DailyOpenClose.kt @@ -1,6 +1,7 @@ package io.polygon.kotlin.sdk.rest.crypto import com.thinkinglogic.builder.annotation.Builder +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Exchanges.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Exchanges.kt index 6a057a2..1731d38 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Exchanges.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Exchanges.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.crypto +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonCryptoClient.getSupportedExchangesBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/HistoricTrades.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/HistoricTrades.kt index 3d8cfb7..8f9d057 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/HistoricTrades.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/HistoricTrades.kt @@ -1,6 +1,7 @@ package io.polygon.kotlin.sdk.rest.crypto import com.thinkinglogic.builder.annotation.Builder +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonCryptoClient.getHistoricTradesBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/LastTrade.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/LastTrade.kt index ef21039..5710a93 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/LastTrade.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/LastTrade.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.crypto +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonCryptoClient.getLastTradeBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Snapshots.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Snapshots.kt index e998555..4fa52a9 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Snapshots.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/crypto/Snapshots.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.crypto +import io.ktor.http.* import io.polygon.kotlin.sdk.rest.stocks.GainersOrLosersDirection import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/HistoricTicks.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/HistoricTicks.kt index 6d23afc..c73872f 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/HistoricTicks.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/HistoricTicks.kt @@ -1,6 +1,7 @@ package io.polygon.kotlin.sdk.rest.forex import com.thinkinglogic.builder.annotation.Builder +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/LastQuote.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/LastQuote.kt index 6792473..554e168 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/LastQuote.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/LastQuote.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.forex +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonForexClient.getLastQuoteBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/RealTimeConversion.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/RealTimeConversion.kt index f940c85..f17b60b 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/RealTimeConversion.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/RealTimeConversion.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.forex import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonForexClient.getRealTimeConversionBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/Snapshots.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/Snapshots.kt index 9fd9694..767f80c 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/Snapshots.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/forex/Snapshots.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.forex +import io.ktor.http.* import io.polygon.kotlin.sdk.rest.stocks.GainersOrLosersDirection import io.polygon.kotlin.sdk.rest.stocks.SnapshotAggregateDTO import kotlinx.serialization.SerialName diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Locales.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Locales.kt index 16d56d9..3f491cf 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Locales.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Locales.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonReferenceClient.getSupportedLocalesBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketHolidays.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketHolidays.kt index ad14c77..30e9da0 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketHolidays.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketHolidays.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonReferenceClient.getMarketHolidaysBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketStatus.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketStatus.kt index 250cbf3..ceb0285 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketStatus.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/MarketStatus.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonReferenceClient.getMarketStatusBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Markets.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Markets.kt index 30885ff..3516a2d 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Markets.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Markets.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockDividends.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockDividends.kt index 2d9f9d8..1f99500 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockDividends.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockDividends.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockFinancials.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockFinancials.kt index c81deec..17e32af 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockFinancials.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockFinancials.kt @@ -1,6 +1,7 @@ package io.polygon.kotlin.sdk.rest.reference import com.thinkinglogic.builder.annotation.Builder +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonReferenceClient.getStockFinancialsBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockSplits.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockSplits.kt index f4061a4..3af106e 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockSplits.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/StockSplits.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerDetails.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerDetails.kt index 9c1e2f6..ab5accd 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerDetails.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerDetails.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerNews.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerNews.kt index c3a1b6a..a161335 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerNews.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerNews.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.reference import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonReferenceClient.getTickerNewsBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerTypes.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerTypes.kt index 7815d11..e9db418 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerTypes.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/TickerTypes.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.reference +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Tickers.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Tickers.kt index 80f7e4c..fbd1de2 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Tickers.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/reference/Tickers.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.reference import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/ConditionMappings.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/ConditionMappings.kt index 417d056..a7f0ce0 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/ConditionMappings.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/ConditionMappings.kt @@ -1,5 +1,7 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* + /** See [PolygonStocksClient.getConditionMappingsBlocking] */ suspend fun PolygonStocksClient.getConditionMappings(type: ConditionMappingTickerType): Map = polygonClient.fetchResult { path("v1", "meta", "conditions", type.urlParamName) } diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/DailyOpenClose.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/DailyOpenClose.kt index 2998483..a1b2450 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/DailyOpenClose.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/DailyOpenClose.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonStocksClient.getDailyOpenCloseBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Exchanges.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Exchanges.kt index 0443eca..bdd8fde 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Exchanges.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Exchanges.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import kotlinx.serialization.Serializable /** See [PolygonStocksClient.getSupportedExchangesBlocking] */ diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricQuotes.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricQuotes.kt index 39329ce..06108dd 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricQuotes.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricQuotes.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.stocks import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricTrades.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricTrades.kt index 001abf7..511c0a3 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricTrades.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/HistoricTrades.kt @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.stocks import com.thinkinglogic.builder.annotation.Builder import com.thinkinglogic.builder.annotation.DefaultValue +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastQuote.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastQuote.kt index 95c757b..f0adf63 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastQuote.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastQuote.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastTrade.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastTrade.kt index 061a67a..e381c79 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastTrade.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/LastTrade.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/PreviousClose.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/PreviousClose.kt index 1b09363..15c77a1 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/PreviousClose.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/PreviousClose.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import io.polygon.kotlin.sdk.rest.AggregateDTO import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Snapshots.kt b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Snapshots.kt index 9b310cb..1c98dbd 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Snapshots.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/rest/stocks/Snapshots.kt @@ -1,5 +1,6 @@ package io.polygon.kotlin.sdk.rest.stocks +import io.ktor.http.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt index 320614f..434d1f0 100644 --- a/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt +++ b/src/main/kotlin/io/polygon/kotlin/sdk/websocket/PolygonWebSocketClient.kt @@ -1,10 +1,10 @@ package io.polygon.kotlin.sdk.websocket import io.ktor.client.* -import io.ktor.client.features.websocket.* +import io.ktor.client.plugins.websocket.* import io.ktor.client.request.* import io.ktor.http.* -import io.ktor.http.cio.websocket.* +import io.ktor.websocket.* import io.polygon.kotlin.sdk.DefaultJvmHttpClientProvider import io.polygon.kotlin.sdk.HttpClientProvider import io.polygon.kotlin.sdk.ext.PolygonCompletionCallback