mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +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.
23 lines
649 B
Scala
23 lines
649 B
Scala
package com.twitter.cr_mixer
|
|
package logging
|
|
|
|
import com.twitter.cr_mixer.thriftscala.CrMixerTweetRequest
|
|
import com.twitter.cr_mixer.thriftscala.Product
|
|
|
|
case class TopLevelDdgMetricsMetadata(
|
|
userId: Option[Long],
|
|
product: Product,
|
|
clientApplicationId: Option[Long],
|
|
countryCode: Option[String])
|
|
|
|
object TopLevelDdgMetricsMetadata {
|
|
def from(request: CrMixerTweetRequest): TopLevelDdgMetricsMetadata = {
|
|
TopLevelDdgMetricsMetadata(
|
|
userId = request.clientContext.userId,
|
|
product = request.product,
|
|
clientApplicationId = request.clientContext.appId,
|
|
countryCode = request.clientContext.countryCode
|
|
)
|
|
}
|
|
}
|