Beispiel #1
0
        private DisqusThreadCloseRequest(DisqusThreadLookupType lookupType, params string[] threads)
        {
            var parameters = threads.Select(thread =>
                                            new KeyValuePair <string, string>(lookupType.AsParameterName(), thread));

            Parameters.AddRange(parameters);
        }
Beispiel #2
0
        public DisqusThreadListRequest Thread(DisqusThreadLookupType lookupType, params string[] threads)
        {
            var parameters = threads.Select(thread => new KeyValuePair <string, string>(lookupType.AsParameterName(), thread));

            Parameters.AddRange(parameters);

            return(this);
        }
Beispiel #3
0
        public static string AsParameterName(this DisqusThreadLookupType type)
        {
            switch (type)
            {
            case DisqusThreadLookupType.Identifier:
                return("thread:ident");

            case DisqusThreadLookupType.Link:
                return("thread:link");

            case DisqusThreadLookupType.Id:
            default:
                return("thread");
            }
        }
Beispiel #4
0
 private DisqusThreadListPostsRequest(DisqusThreadLookupType lookupType, string thread)
 {
     Parameters.Add(new KeyValuePair <string, string>(lookupType.AsParameterName(), thread));
 }
Beispiel #5
0
 public static DisqusThreadListPostsRequest New(DisqusThreadLookupType lookupType, string thread)
 {
     return(new DisqusThreadListPostsRequest(lookupType, thread));
 }
 public static DisqusThreadRestoreRequest New(DisqusThreadLookupType lookupType, params string[] threads)
 {
     return(new DisqusThreadRestoreRequest(lookupType, threads));
 }
Beispiel #7
0
 public static DisqusThreadListUsersVotedThreadRequest New(DisqusThreadLookupType lookupType, string thread)
 {
     return(new DisqusThreadListUsersVotedThreadRequest(lookupType, thread));
 }
Beispiel #8
0
 private DisqusThreadListUsersVotedThreadRequest(DisqusThreadLookupType lookupType, string thread) : base()
 {
     Parameters.Add(new KeyValuePair <string, string>(lookupType.AsParameterName(), thread));
 }
Beispiel #9
0
 public static DisqusThreadSetRequest New(DisqusThreadLookupType lookupType, params string[] forums)
 {
     return(new DisqusThreadSetRequest(lookupType, forums));
 }
Beispiel #10
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")));
 }
Beispiel #11
0
 public static DisqusThreadVoteRequest New(DisqusThreadLookupType lookupType, string thread, DisqusVote vote)
 {
     return(new DisqusThreadVoteRequest(lookupType, thread, vote));
 }