Skip to content

Commit

Permalink
More straws.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamMc331 committed Apr 12, 2022
1 parent b970c3a commit 525d3e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.adammcneilly.pocketleague.data.remote.octanegg.dtos.EventDTO
import com.adammcneilly.pocketleague.data.remote.octanegg.dtos.EventListResponseDTO
import com.adammcneilly.pocketleague.data.remote.octanegg.mappers.toEventSummary
import com.adammcneilly.pocketleague.event.api.EventRepository
import io.ktor.client.request.parameter
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow

Expand All @@ -26,9 +25,7 @@ class OctaneGGEventService : EventRepository {

override fun fetchEventSummaries(): Flow<DataResult<List<EventSummary>>> {
return flow {
val apiResult = apiClient.getResponse<EventListResponseDTO>("events") {
this.parameter("group", "rlcs2122")
}
val apiResult = apiClient.getResponse<EventListResponseDTO>("events")

val mappedResult: DataResult<List<EventSummary>> = when (apiResult) {
is DataResult.Success -> {
Expand Down
6 changes: 3 additions & 3 deletions octanegg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ kotlin {
implementation(project(":core-models"))
implementation(project(":core-datetime"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
api("io.ktor:ktor-client-core:${Versions.ktor}")
implementation("io.ktor:ktor-client-core:${Versions.ktor}")
implementation("io.ktor:ktor-client-json:${Versions.ktor}")
implementation("io.ktor:ktor-client-logging:${Versions.ktor}")
implementation("io.ktor:ktor-client-serialization:${Versions.ktor}")
Expand All @@ -37,7 +37,7 @@ kotlin {
}
val androidMain by getting {
dependencies {
api("io.ktor:ktor-client-android:${Versions.ktor}")
implementation("io.ktor:ktor-client-android:${Versions.ktor}")
}
}
val androidTest by getting
Expand All @@ -51,7 +51,7 @@ kotlin {
iosSimulatorArm64Main.dependsOn(this)

dependencies {
api("io.ktor:ktor-client-ios:${Versions.ktor}")
implementation("io.ktor:ktor-client-ios:${Versions.ktor}")
}
}
val iosX64Test by getting
Expand Down

0 comments on commit 525d3e3

Please sign in to comment.