示例#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
文件: List.cs 项目: bling/Ping.Pong
 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
文件: Tweet.cs 项目: bling/Ping.Pong
        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);
 }