Пример #1
0
 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"]);
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 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"]);
 }
Пример #4
0
 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"]
     };
 }
Пример #5
0
        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"]);
        }
Пример #6
0
 public void Follow(User user)
 {
     _client.Follow(user.ScreenName);
     Reload(user.ScreenName);
 }
Пример #7
0
 public ExtendedUser(User user)
 {
     this.CopyProperties(user);
 }