Use /sources/stats in the home #133

Merged
AmineB merged 9 commits from davidoskky/ReaderForSelfoss-multiplatform:sources into master 2023-03-13 16:26:57 +00:00
Showing only changes of commit 63b69b2822 - Show all commits

View File

@ -183,7 +183,15 @@ class SelfossApi(private val appSettingsService: AppSettingsService) {
}
})
suspend fun sources(): StatusAndData<ArrayList<SelfossModel.Source>> =
suspend fun sourcesStats(): StatusAndData<ArrayList<SelfossModel.SourceStats>> =
bodyOrFailure(client.tryToGet(url("/sources/stats")) {
if (!shouldHavePostLogin()) {
parameter("username", appSettingsService.getUserName())
parameter("password", appSettingsService.getPassword())
}
})
suspend fun sourcesDetailed(): StatusAndData<ArrayList<SelfossModel.SourceDetail>> =
bodyOrFailure(client.tryToGet(url("/sources/list")) {
if (!shouldHavePostLogin()) {
parameter("username", appSettingsService.getUserName())