add several extensions to ResultData: authors, froms, charactersList, titles

This commit is contained in:
InsanusMokrassar committed 2021-09-21 14:47:40 +06:00
1 parent 64109735f8
commit b5ceff32bd
2 files changed
+13

No files matched your search

@@ -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()