Exemplo n.º 1
0
        public async Task <DisqusResponse <DisqusPostVoteStats> > VoteAsync(DisqusAccessToken accessToken, long postId,
                                                                            DisqusVote vote)
        {
            Collection <KeyValuePair <string, string> > parameters = Parameters
                                                                     .WithParameter("post", postId.ToString())
                                                                     .WithParameter("vote", vote.ToString("D"))
                                                                     .WithParameter("access_token", accessToken);

            return(await RequestProcessor
                   .ExecuteAsync <DisqusResponse <DisqusPostVoteStats> >(DisqusRequestMethod.Post, DisqusEndpoints.Posts.Vote,
                                                                         parameters)
                   .ConfigureAwait(false));
        }
Exemplo n.º 2
0
 private DisqusThreadVoteRequest(DisqusThreadLookupType lookupType, string thread, DisqusVote vote) : base()
 {
     Parameters.Add(new KeyValuePair <string, string>(lookupType.AsParameterName(), thread));
     Parameters.Add(new KeyValuePair <string, string>("vote", vote.ToString("D")));
 }