the-algorithm/timelineranker/server/src/main/scala/com/twitter/timelineranker/common/CreateCandidateEnvelopeTransform.scala
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
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.
2023-03-31 17:36:31 -05:00

16 lines
509 B
Scala

package com.twitter.timelineranker.common
import com.twitter.servo.util.FutureArrow
import com.twitter.timelineranker.core.CandidateEnvelope
import com.twitter.timelineranker.model.RecapQuery
import com.twitter.util.Future
/**
* Create a CandidateEnvelope based on the incoming RecapQuery
*/
object CreateCandidateEnvelopeTransform extends FutureArrow[RecapQuery, CandidateEnvelope] {
override def apply(query: RecapQuery): Future[CandidateEnvelope] = {
Future.value(CandidateEnvelope(query))
}
}