2022-10-26 01:55:50 +05:30
|
|
|
/*
|
2024-01-18 01:53:00 +05:30
|
|
|
* Copyright © 2021-2024 Harsh Shandilya.
|
2022-10-26 01:55:50 +05:30
|
|
|
* Use of this source code is governed by an MIT-style
|
|
|
|
* license that can be found in the LICENSE file or at
|
|
|
|
* https://opensource.org/licenses/MIT.
|
|
|
|
*/
|
2022-10-02 16:08:23 +05:30
|
|
|
@file:Suppress("LongParameterList")
|
|
|
|
|
2021-09-30 12:57:23 +05:30
|
|
|
package dev.msfjarvis.claw.model
|
|
|
|
|
2023-07-17 13:36:42 +05:30
|
|
|
import dev.drewhamilton.poko.Poko
|
2023-09-09 13:31:19 +05:30
|
|
|
import io.mcarle.konvert.api.KonvertTo
|
|
|
|
import io.mcarle.konvert.api.Mapping
|
2021-09-30 12:57:23 +05:30
|
|
|
import kotlinx.serialization.SerialName
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
@Serializable
|
2023-07-17 13:36:42 +05:30
|
|
|
@Poko
|
2023-09-09 13:31:19 +05:30
|
|
|
@KonvertTo(
|
2024-01-27 16:52:47 +05:30
|
|
|
value = UIPost::class,
|
2024-03-16 09:48:08 +05:30
|
|
|
mappings = [Mapping(target = "submitterName", expression = "it.submitter.username")],
|
2023-09-09 13:31:19 +05:30
|
|
|
)
|
2021-09-30 12:57:23 +05:30
|
|
|
class LobstersPost(
|
2023-01-26 21:49:04 +05:30
|
|
|
val shortId: String,
|
|
|
|
val createdAt: String,
|
2021-09-30 12:57:23 +05:30
|
|
|
val title: String,
|
|
|
|
val url: String,
|
|
|
|
val description: String,
|
2023-01-26 21:49:04 +05:30
|
|
|
val commentCount: Int,
|
|
|
|
val commentsUrl: String,
|
2024-03-16 09:48:08 +05:30
|
|
|
@SerialName("submitter_user") val submitter: String,
|
2021-09-30 12:57:23 +05:30
|
|
|
val tags: List<String>,
|
|
|
|
)
|