add reply and quote counts

This commit is contained in:
Asim Aslam
2021-09-15 14:23:28 +01:00
parent 3181190e40
commit e55e9e067e
3 changed files with 67 additions and 37 deletions

View File

@@ -76,6 +76,8 @@ func (t *Twitter) Timeline(ctx context.Context, req *pb.TimelineRequest, rsp *pb
CreatedAt: tweet.CreatedAt,
FavouritedCount: int64(tweet.FavoriteCount),
RetweetedCount: int64(tweet.RetweetCount),
ReplyCount: int64(tweet.ReplyCount),
QuoteCount: int64(tweet.QuoteCount),
Username: tweet.User.ScreenName,
})
}
@@ -108,6 +110,8 @@ func (t *Twitter) Search(ctx context.Context, req *pb.SearchRequest, rsp *pb.Sea
CreatedAt: tweet.CreatedAt,
FavouritedCount: int64(tweet.FavoriteCount),
RetweetedCount: int64(tweet.RetweetCount),
ReplyCount: int64(tweet.ReplyCount),
QuoteCount: int64(tweet.QuoteCount),
Username: tweet.User.ScreenName,
})
}