private Tweet PopulateTweetFromSearchResults(JsonValue item) { Tweet tweet = new Tweet(); tweet.ID = item.GetValue<long?>("id"); tweet.FromUser = item.GetValue<string>("from_user"); tweet.Text = item.GetValue<string>("text"); tweet.CreatedAt = item.GetValue<string>("created_at"); tweet.FromUserId = item.GetValue<long?>("from_user_id"); tweet.ToUserId = item.GetValue<long?>("to_user_id"); tweet.LanguageCode = item.GetValue<string>("iso_language_code"); tweet.ProfileImageUrl = item.GetValue<string>("profile_image_url"); tweet.Source = item.GetValue<string>("source"); return tweet; }
private Tweet PopulateTweetFromTimelineItem(JsonValue item) { Tweet tweet = new Tweet(); tweet.ID = item.GetValue<long?>("id"); tweet.Text = item.GetValue<string>("text"); tweet.FromUser = item.GetValue("user").GetValue<string>("screen_name"); tweet.FromUserId = item.GetValue("user").GetValue<long?>("id"); tweet.ProfileImageUrl = item.GetValue("user").GetValue<string>("profile_image_url"); tweet.Source = item.GetValue<string>("source"); tweet.ToUserId = item.GetValue<long?>("in_reply_to_user_id"); tweet.CreatedAt = item.GetValue<string>("created_at"); return tweet; }