Add support for the /sources/stats api endpoint
This commit is contained in:
parent
e1c64cef46
commit
63b69b2822
@ -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")) {
|
bodyOrFailure(client.tryToGet(url("/sources/list")) {
|
||||||
if (!shouldHavePostLogin()) {
|
if (!shouldHavePostLogin()) {
|
||||||
parameter("username", appSettingsService.getUserName())
|
parameter("username", appSettingsService.getUserName())
|
||||||
|
Loading…
Reference in New Issue
Block a user