Skip to content

Commit

Permalink
Merge pull request DroidKaigi#523 from matsumo0922/enable-sponsors-api
Browse files Browse the repository at this point in the history
Use this year's Sponsor API
  • Loading branch information
takahirom authored Aug 16, 2024
2 parents 173470b + 0c96331 commit 3a12f92
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import io.github.droidkaigi.confsched.data.sponsors.response.SponsorResponse
import io.github.droidkaigi.confsched.data.sponsors.response.SponsorsResponse
import io.github.droidkaigi.confsched.model.Plan
import io.github.droidkaigi.confsched.model.Sponsor
import io.github.droidkaigi.confsched.model.fakes
import kotlinx.collections.immutable.PersistentList
import kotlinx.collections.immutable.toPersistentList

internal interface SponsorApi {
/**
* Gets sponsor information for the DroidKaigi 2024 event.
*
* @return [SponsorsResponse]
*/
@GET("/events/droidkaigi2023/sponsor")
suspend fun getSponsors(): SponsorsResponse
}
Expand All @@ -26,11 +30,9 @@ public class DefaultSponsorsApiClient(

private val sponsorApi = ktorfit.create<SponsorApi>()
public override suspend fun sponsors(): PersistentList<Sponsor> {
// FIXME: When the API is ready, remove the comments below and return the actual data.
return Sponsor.fakes()
// return networkService {
// sponsorApi.getSponsors()
// }.toSponsorList()
return networkService {
sponsorApi.getSponsors()
}.toSponsorList()
}
}

Expand Down

0 comments on commit 3a12f92

Please sign in to comment.