Exemple #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));
        }
Exemple #2
0
        public DisqusThreadListUsersVotedThreadRequest Vote(DisqusVote vote)
        {
            Parameters.Add(new KeyValuePair <string, string>("vote", ((int)vote).ToString()));

            return(this);
        }
Exemple #3
0
 public async Task <DisqusResponse <DisqusPostVoteStats> > VoteAsync(long postId, DisqusVote vote)
 {
     return(await VoteAsync(null, postId, vote).ConfigureAwait(false));
 }
Exemple #4
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")));
 }
Exemple #5
0
 public static DisqusThreadVoteRequest New(DisqusThreadLookupType lookupType, string thread, DisqusVote vote)
 {
     return(new DisqusThreadVoteRequest(lookupType, thread, vote));
 }