diff --git a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/rest/SelfossApi.kt b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/rest/SelfossApi.kt index 4d10b3b..3870852 100644 --- a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/rest/SelfossApi.kt +++ b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/rest/SelfossApi.kt @@ -183,7 +183,15 @@ class SelfossApi(private val appSettingsService: AppSettingsService) { } }) - suspend fun sources(): StatusAndData> = + suspend fun sourcesStats(): StatusAndData> = + bodyOrFailure(client.tryToGet(url("/sources/stats")) { + if (!shouldHavePostLogin()) { + parameter("username", appSettingsService.getUserName()) + parameter("password", appSettingsService.getPassword()) + } + }) + + suspend fun sourcesDetailed(): StatusAndData> = bodyOrFailure(client.tryToGet(url("/sources/list")) { if (!shouldHavePostLogin()) { parameter("username", appSettingsService.getUserName())