public Tweet(JsonObject json) { Text = json["text"]; // explicit conversion will unescape json Text = Text.UnescapeXml(); // unescape again for & escapes Source = json["source"]; Id = json["id_str"]; IsRetweet = json["retweeted"]; InReplyToStatusId = json["in_reply_to_status_id_str"]; InReplyToScreenName = json["in_reply_to_screen_name"]; CreatedAt = json.GetDateTime("created_at"); JsonValue entities; if (json.TryGetValue("entities", out entities)) Entities = new Entities(entities); JsonValue retweetedStatus; if (json.TryGetValue("retweeted_status", out retweetedStatus)) RetweetedStatus = new Tweet((JsonObject)retweetedStatus); User = new User(json["user"]); }
public void SubscribeToConversation(Tweet sourceTweet) { Enforce.NotNull(sourceTweet); Subscribe(_client.GetConversation(sourceTweet)); }