Skip to content

Commit 3f90cfc

Browse files
committed
Fix SimpleRoomStatesRepository#callFactory property name.
1 parent ede84f2 commit 3f90cfc

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Room states changelog
22

3+
## NEXT
4+
5+
* Not published yet.
6+
7+
### Changes
8+
9+
* Fix `SimpleRoomStatesRepository#callFactory` property name.
10+
11+
312
## [v.1.0.1](https://github.com/EventFahrplan/roomstates/releases/tag/v.1.0.1)
413

514
* Published: 2025-02-07

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ from the suspending `RoomStatesRepository#getRooms` function.
3737
val repository: RoomStatesRepository = SimpleRoomStatesRepository(
3838
url = "https://api.fosdem.org",
3939
path = "/roomstatus/v1/listrooms",
40-
httpClient = okHttpClient,
40+
callFactory = okHttpClient,
4141
api = Api,
4242
)
4343
val rooms: Flow<Result<List<Room>>> = repository.getRooms()

room-states-repositories/src/main/kotlin/info/metadude/kotlin/library/roomstates/repositories/simple/SimpleRoomStatesRepository.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import okhttp3.Call
1010
class SimpleRoomStatesRepository(
1111
private val url: String,
1212
private val path: String,
13-
private val httpClient: Call.Factory,
13+
private val callFactory: Call.Factory,
1414
private val api: RoomStatesApi,
1515
) : RoomStatesRepository {
1616

1717
override suspend fun getRooms(): Flow<Result<List<Room>>> {
1818
return flow {
1919
try {
2020
val response = api
21-
.provideRoomStatesService(url, httpClient)
21+
.provideRoomStatesService(url, callFactory)
2222
.getRooms(path)
2323
emit(response)
2424
} catch (e: Exception) {

room-states-repositories/src/main/kotlin/info/metadude/kotlin/library/roomstates/repositories/simple/SimpleTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ internal suspend fun main() {
77
val repository = SimpleRoomStatesRepository(
88
url = "https://gist.githubusercontent.com",
99
path = "johnjohndoe/1f96ca8c2cecc44a05f28e28548d545d/raw/4f15259e9d5f2f58c919c408226007801bdef821/rooms.json",
10-
httpClient = OkHttpClient.Builder().build(),
10+
callFactory = OkHttpClient.Builder().build(),
1111
api = Api,
1212
)
1313

room-states-repositories/src/test/kotlin/info/metadude/kotlin/library/roomstates/repositories/simple/SimpleRoomStatesRepositoryTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class SimpleRoomStatesRepositoryTest {
6565
return SimpleRoomStatesRepository(
6666
url = "https://example.com",
6767
path = "rooms",
68-
httpClient = httpClient,
68+
callFactory = httpClient,
6969
api = api,
7070
)
7171
}

0 commit comments

Comments
 (0)