public Status(TwitterStatus status) { Id = status.Id; IsFavorited = status.IsFavorited; if (status.User != null) { UserScreenName = status.User.ScreenName; UserProfileImageUrlNormal = status.User.ProfileImageUrl; UserProfileImageUrlBigger = status.User.ProfileImageUrl.Replace("_normal.", "_bigger."); } if (status.RetweetedStatus != null) { Text = StatusFormattingHelper.FormatLinksAndMentions("RT " + "@" + status.RetweetedStatus.User.ScreenName + ": " + status.RetweetedStatus.Text); } else { Text = StatusFormattingHelper.FormatLinksAndMentions(status.Text); } CreateDateRaw = status.CreatedDate; CreatedDate = StatusFormattingHelper.FormatPrettyDate(status.CreatedDate); Source = status.Source; InReplyToStatusId = status.InReplyToStatusId == 0 ? null : status.InReplyToStatusId; InReplyToScreenName = status.InReplyToScreenName; IsTruncated = status.IsTruncated; }
public DirectMessage(TwitterDirectMessage message, DirectMessageRenderingStyle style) { Id = message.Id; if (style == DirectMessageRenderingStyle.Recieved) { ScreenName = message.SenderScreenName; ProfileImageUrlNormal = message.Sender.ProfileImageUrl; ProfileImageUrlBigger = message.Sender.ProfileImageUrl.Replace("_normal.", "_bigger."); } else { ScreenName = message.RecipientScreenName; ProfileImageUrlNormal = message.Recipient.ProfileImageUrl; ProfileImageUrlBigger = message.Recipient.ProfileImageUrl.Replace("_normal.", "_bigger."); } Text = StatusFormattingHelper.FormatLinksAndMentions(message.Text); CreatedDate = StatusFormattingHelper.FormatPrettyDate(message.CreatedDate); }