mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-13 22:58:54 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
29 lines
1.2 KiB
Scala
29 lines
1.2 KiB
Scala
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.card
|
|
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url
|
|
|
|
object CardItem {
|
|
val CardEntryNamespace = EntryNamespace("card")
|
|
}
|
|
|
|
case class CardItem(
|
|
override val id: String,
|
|
override val sortIndex: Option[Long],
|
|
override val clientEventInfo: Option[ClientEventInfo],
|
|
override val feedbackActionInfo: Option[FeedbackActionInfo],
|
|
cardUrl: String,
|
|
text: Option[String],
|
|
subtext: Option[String],
|
|
url: Option[Url],
|
|
displayType: Option[CardDisplayType])
|
|
extends TimelineItem {
|
|
override val entryNamespace: EntryNamespace = CardItem.CardEntryNamespace
|
|
|
|
override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
|
}
|