mirror of
https://github.com/InsanusMokrassar/SauceNaoAPI.git
synced 2024-11-26 08:18:42 +00:00
add several extensions to ResultData: authors, froms, charactersList, titles
This commit is contained in:
parent
64109735f8
commit
b5ceff32bd
@ -6,6 +6,7 @@
|
||||
* `Kotlin`: `1.5.30` -> `1.5.31`
|
||||
* `Klock`: `2.4.0` -> `2.4.2`
|
||||
* `Coroutines`: `1.5.1` -> `1.5.2`
|
||||
* Add several extensions to `ResultData`: `authors`, `froms`, `charactersList`, `titles`
|
||||
|
||||
## 0.9.0
|
||||
|
||||
|
@ -159,3 +159,15 @@ data class ResultData(
|
||||
@SerialName("ext_urls")
|
||||
val extUrls: List<String> = emptyList()
|
||||
)
|
||||
|
||||
val ResultData.froms: List<String>
|
||||
get() = material ?.split(", ") ?: emptyList()
|
||||
|
||||
val ResultData.authors: List<String>
|
||||
get() = creator ?.split(", ") ?: emptyList()
|
||||
|
||||
val ResultData.charactersList: List<String>
|
||||
get() = characters ?.split(", ") ?: emptyList()
|
||||
|
||||
val ResultData.titles: List<String>
|
||||
get() = title ?.split(", ") ?: emptyList()
|
||||
|
Loading…
Reference in New Issue
Block a user