1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-16 08:34:53 +02:00
pgpainless/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/api/LookupAPI.kt

20 lines
499 B
Kotlin
Raw Normal View History

2023-06-29 17:49:12 +02:00
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
2023-07-07 15:42:04 +02:00
package org.pgpainless.wot.api
2023-06-29 17:49:12 +02:00
interface LookupAPI {
fun lookup(arguments: Arguments): Result
data class Arguments(val userId: String, val email: Boolean = false)
2023-07-13 16:53:35 +02:00
data class Result(val bindings: List<Binding>, val targetAmount: Int) {
val acceptable: Boolean
get() = bindings.any {
it.paths.amount >= targetAmount
}
}
2023-07-03 17:07:21 +02:00
}