public DirectMessage(JsonObject json) { Id = json["id_str"]; CreatedAt = json.GetDateTime("created_at"); Text = json["text"]; Sender = new User(json["sender"]); Recipient = new User(json["recipient"]); }
public void Unfollow(User user) { if (MessageBox.Show(string.Format("Are you sure you want to unfollow {0}?", user.ScreenName), "", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { _client.Unfollow(user.ScreenName); Reload(user.ScreenName); } }
public List(JsonValue json) { Id = json["id_str"]; Name = json["name"]; FullName = json["full_name"]; CreatedAt = json.GetDateTime("created_at"); Uri = json["uri"]; Description = json["description"]; Slug = json["slug"]; User = new User(json["user"]); }
public SearchResult(JsonObject json) { Text = json["text"]; // explicit conversion will unescape json Text = Text.UnescapeXml(); // unescape again for & escapes Id = json["id_str"]; Source = json["source"]; CreatedAt = json.GetSearchDateTime("created_at"); User = new User { Id = json["from_user_id_str"], ScreenName = json["from_user"], ProfileImageUrl = json["profile_image_url"] }; }
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 Follow(User user) { _client.Follow(user.ScreenName); Reload(user.ScreenName); }
public ExtendedUser(User user) { this.CopyProperties(user); }