예제 #1
0
 public Task<bool> MarkAsReadAsync(string threadid, string threadIndex)
 {
     HttpGetRequestBuilder endpoint = new HttpGetRequestBuilder("showthread.php");
     endpoint.AddParameter("action", "setseen");
     endpoint.AddParameter("threadid", threadid);
     endpoint.AddParameter("index", threadIndex);
     return endpoint.SendAndConfirmAsync(this.Client);
 }
예제 #2
0
        public Task<bool> RateAsync(string threadid, int rating)
        {
            if (rating < MIN_RATING || rating > MAX_RATING)
                throw new ArgumentOutOfRangeException(string.Format(
                    "Rating must be between {0} and {1}.", MIN_RATING, MAX_RATING));

            HttpGetRequestBuilder endpoint = new HttpGetRequestBuilder("threadrate.php");
            endpoint.AddParameter("vote", rating);
            endpoint.AddParameter("threadid", threadid);
            return endpoint.SendAndConfirmAsync(this.Client);
        }