public void RemoveSpam() { var request = Reddit.CreatePost(RemoveUrl); request.BeginGetRequestStream(new AsyncCallback(RemoveSpamRequest), request); HttpClient client = new HttpClient(); }
public void Distinguish(DistinguishType distinguishType) { if (Reddit.User == null) { throw new Exception("No user logged in."); } var request = Reddit.CreatePost(DistinguishUrl); CommentState commentState = new CommentState(); commentState.AsyncRequest = request; commentState.ParameterValue = distinguishType; request.BeginGetRequestStream(new AsyncCallback(DistinguishRequest), commentState); }
public void EditText(string newText) { if (Reddit.User == null) { throw new Exception("No user logged in."); } var request = Reddit.CreatePost(EditUserTextUrl); CommentState commentState = new CommentState(); commentState.AsyncRequest = request; commentState.ParameterValue = newText; request.BeginGetRequestStream(new AsyncCallback(EditTextRequest), commentState); }
public Comment Comment(string message) { if (Reddit.User == null) { throw new Exception("No user logged in."); } StateObject postState = new StateObject(); var request = Reddit.CreatePost(CommentUrl); postState.Request = request; postState.ParameterValue = message; IAsyncResult commentRequestAR = request.BeginGetRequestStream(new AsyncCallback(CommentRequest), postState); IAsyncResult commentResponseAR = request.BeginGetResponse(new AsyncCallback(CommentResponse), postState); return(returnComment); }
public Comment Reply(string message) { if (Reddit.User == null) { // RedditSharp used an AuthenticationException // but it's not available for Windows Phone throw new Exception("No user logged in."); } CommentState commentState = new CommentState(); var request = Reddit.CreatePost(CommentUrl); commentState.AsyncRequest = request; commentState.ParameterValue = message; IAsyncResult replyRequestAR = request.BeginGetRequestStream(new AsyncCallback(ReplyRequest), commentState); IAsyncResult replyResponseAR = request.BeginGetResponse(new AsyncCallback(ReplyResponse), commentState); return(returnComment); }
public void Remove() { var request = Reddit.CreatePost(RemoveUrl); request.BeginGetRequestStream(new AsyncCallback(RemoveRequest), request); }