public PostStatusBase GetPostStatus()
        {
            PostStatusBase postStatus = null;

            if (IsAcceptMedia == false && IsAcceptReply == false)
            {
                postStatus = new PostStatus(PostText);
            }
            else if (IsAcceptMedia == false && IsAcceptReply == true)
            {
                if (PostText.Contains("@"))
                {
                    postStatus = new PostStatusWithReply(PostText, InReplyToStatus.id_str);
                }
                else
                {
                    postStatus = new PostStatus(PostText);
                }
            }
            else if (IsAcceptMedia == true && IsAcceptReply == false)
            {
                postStatus = new PostStatusMedia(PostText, PostMedia);
            }
            else if (IsAcceptMedia == true && IsAcceptReply == true)
            {
                if (PostText.Contains("@"))
                {
                    postStatus = new PostStatusMediaWithReply(PostText, PostMedia, InReplyToStatus.id_str);
                }
                else
                {
                    postStatus = new PostStatusMedia(PostText, PostMedia);
                }
            }
            return(postStatus);
        }
Example #2
0
        public async Task UpdateStatusAsync(PostStatusWithReply status)
        {
            var content = new FormUrlEncodedContent(new[] { new KeyValuePair <string, string>("status", status.Status), new KeyValuePair <string, string>("in_reply_to_status_id", status.InReplyToStatusId) });

            await UpdateStatusBaseAsync(status, content);
        }
Example #3
0
        public PostStatusBase GetPostStatus()
        {
            PostStatusBase postStatus=null;
            if (IsAcceptMedia == false && IsAcceptReply == false)
            {
                postStatus = new PostStatus(PostText);
            }
            else if (IsAcceptMedia == false && IsAcceptReply == true)
            {
                if (PostText.Contains("@"))
                {
                    postStatus = new PostStatusWithReply(PostText,InReplyToStatus.id_str);
                }
                else
                {
                    postStatus = new PostStatus(PostText);
                }
            }
            else if (IsAcceptMedia == true && IsAcceptReply == false)
            {
                postStatus = new PostStatusMedia(PostText,PostMedia);
                
            }
            else if (IsAcceptMedia == true && IsAcceptReply == true)
            {
                if (PostText.Contains("@"))
                {
                    postStatus = new PostStatusMediaWithReply(PostText, PostMedia, InReplyToStatus.id_str);
                }
                else
                {
                    postStatus = new PostStatusMedia(PostText, PostMedia);
                    

                }
            }
            return postStatus;
        }