lfoust avatar lfoust committed 29232b7

Added more 3.5 client methods

Comments (0)

Files changed (21)

Add a comment to this file

trunk/data/V2.0 Upgrade Checklist.xlsx

Binary file modified.

trunk/source/Stacky.Net35/Options/Options.cs

 namespace Stacky
 {
     using System;
+    using System.Linq;
+    using System.Collections.Generic;
 
-    //int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, string filter = null
     public class Options
     {
         public int? Page = null;
         public int? PageSize = null;
-        public DateTime? FromDate = null;
-        public DateTime? ToDate = null;
         public string Filter = null;
     }
 
-    public class Options<TSort, TMaxMin> : Options
+    //int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, string filter = null
+    public class OptionsWithDates : Options
+    {   
+        public DateTime? FromDate = null;
+        public DateTime? ToDate = null;
+    }
+
+    public class Options<TSort, TMaxMin> : OptionsWithDates
         where TSort : struct
         where TMaxMin : struct
     {
         where TSort : struct
     {
     }
+
+    public class TaggedOptions<TSort> : Options<TSort>
+        where TSort : struct
+    {
+        public IEnumerable<string> Tagged = null;
+
+        public string GetListValue(IEnumerable<string> items)
+        {
+            if (items == null || items.Count() == 0)
+                return null;
+            return String.Join(";", items.ToArray());
+        }
+    }
+
+    public class TopAnswerOptions
+    {
+        public int? Page = null;
+        public int? PageSize = null;
+        public AnswerTimePeriod Period = AnswerTimePeriod.AllTime;
+        public string Filter = null;
+    }
 }

trunk/source/Stacky.Net35/Options/QuestionSearchOptions.cs

-using System.Collections.Generic;
-
 namespace Stacky
 {
-    public class QuestionSearchOptions
+    using System.Collections.Generic;
+
+    public class QuestionSearchOptions : TaggedOptions<QuestionSort>
     {
+        public IEnumerable<string> NotTagged = null;
         public string InTitle = null;
-        public IEnumerable<string> Tagged = null;
+    }
+
+    public class SimiliarQuestionsOptions : TaggedOptions<QuestionSort>
+    {
         public IEnumerable<string> NotTagged = null;
-        public SearchSort SortBy = SearchSort.Activity;
-        public SortDirection SortDirection = SortDirection.Descending;
-        public int? Page = null;
-        public int? PageSize = null;
-        public int? Min = null;
-        public int? Max = null;
     }
 }

trunk/source/Stacky.Net35/Options/TagOptions.cs

 
 namespace Stacky
 {
-    public class TagOptions
+    public class TagOptions : Options<TagSort, int>
     {
-        public string Filter = null;
-        public TagSort SortBy = TagSort.Popular;
-        public SortDirection SortDirection = SortDirection.Descending;
-        public int? Page = null;
-        public int? PageSize = null;
-        public DateTime? FromDate = null;
-        public DateTime? ToDate = null;
-        public int? Min = null;
-        public int? Max = null;
+        public string InName = null;
     }
 }

trunk/source/Stacky.Net35/Stacky.Net35.csproj

     <Compile Include="..\Stacky\StackyClient\StackyClient.cs">
       <Link>StackyClient\StackyClient.cs</Link>
     </Compile>
-    <Compile Include="..\Stacky\StackyClient\SuggestedEditMethods.cs">
-      <Link>StackyClient\SuggestedEditMethods.cs</Link>
+    <Compile Include="..\Stacky\StackyClient\StatsMethods.cs">
+      <Link>StackyClient\StatsMethods.cs</Link>
     </Compile>
     <Compile Include="..\Stacky\UrlClient.cs">
       <Link>UrlClient.cs</Link>
     <Compile Include="StackyClient\AnswerMethods.cs" />
     <Compile Include="StackyClient\BadgeMethods.cs" />
     <Compile Include="StackyClient\CommentMethods.cs" />
+    <Compile Include="StackyClient\PostMethods.cs" />
     <Compile Include="StackyClient\QuestionMethods.cs" />
     <Compile Include="StackyClient\RevisionMethods.cs" />
     <Compile Include="StackyClient\StackyClientWithOptions.cs" />
-    <Compile Include="StackyClient\StatsMethods.cs" />
+    <Compile Include="StackyClient\SuggestedEditMethods.cs" />
     <Compile Include="StackyClient\TagMethods.cs" />
     <Compile Include="StackyClient\UserMethods.cs" />
   </ItemGroup>

trunk/source/Stacky.Net35/StackyClient/BadgeMethods.cs

             return Execute<Badge, BadgeMinMax>("badges", new string[] { "name" }, options);
         }
 
-        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(Options options)
+        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(OptionsWithDates options)
         {
             return Execute<Badge, BadgeMinMax>("badges", new string[] { "recipients" }, options);
         }
 
-        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(int id, Options options)
+        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(int id, OptionsWithDates options)
         {
             return GetRecentlyAwardedBadges(id.ToArray(), options);
         }
 
-        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(IEnumerable<int> ids, Options options)
+        public virtual IPagedList<Badge> GetRecentlyAwardedBadges(IEnumerable<int> ids, OptionsWithDates options)
         {
             return Execute<Badge, BadgeMinMax>("badges", new string[] { ids.Vectorize(), "recipients" }, options);
         }

trunk/source/Stacky.Net35/StackyClient/CommentMethods.cs

 {
     public partial class StackyClient
     {
-        public virtual IPagedList<Comment> GetComments(IEnumerable<int> fromUserIds)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/comments
+        /// </summary>
+        public IPagedList<Comment> GetComments()
         {
-            return GetComments(fromUserIds, new CommentOptions());
+            return GetComments(null);
         }
 
-        public virtual IPagedList<Comment> GetComments(IEnumerable<int> fromUserIds, CommentOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/comments
+        /// </summary>
+        public IPagedList<Comment> GetComments(Options<CommentSort> options)
         {
-            string[] urlParameters = null;
-            if (options.ToUserId.HasValue)
-            {
-                urlParameters = new string[] { fromUserIds.Vectorize(), "comments", options.ToUserId.ToString() };
-            }
-            else
-            {
-                urlParameters = new string[] { fromUserIds.Vectorize(), "comments" };
-            }
-
-            var response = MakeRequest<Comment>("users", urlParameters, new
-            {
-                site = this.SiteUrlName,
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null,
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                sort = options.SortBy.ToString().ToLower(),
-                order = GetSortDirection(options.SortDirection),
-                min = options.Min ?? null,
-                max = options.Max ?? null
-            });
-            return new PagedList<Comment>(response);
+            return Execute<Comment>("comments", null, options);
         }
 
-        public virtual IPagedList<Comment> GetComments(int fromUserId)
+        public IPagedList<Comment> GetComments(int id, Options<CommentSort> options)
         {
-            return GetComments(fromUserId.ToArray(), new CommentOptions());
+            return GetComments(id.ToArray(), options);
         }
 
-        public virtual IPagedList<Comment> GetComments(int fromUserId, CommentOptions options)
+        public IPagedList<Comment> GetComments(IEnumerable<int> ids, Options<CommentSort> options)
         {
-            return GetComments(fromUserId.ToArray(), options);
-        }
-
-        public virtual IPagedList<Comment> GetCommentsByPost(int postId)
-        {
-            return GetCommentsByPost(postId, new CommentsByPostOptions());
-        }
-
-        public virtual IPagedList<Comment> GetCommentsByPost(int postId, CommentsByPostOptions options)
-        {
-            return GetCommentsByPost(postId.ToArray(), options);
-        }
-
-        public virtual IPagedList<Comment> GetCommentsByPost(IEnumerable<int> postIds)
-        {
-            return GetCommentsByPost(postIds, new CommentsByPostOptions());
-        }
-
-        public virtual IPagedList<Comment> GetCommentsByPost(IEnumerable<int> postIds, CommentsByPostOptions options)
-        {
-            var response = MakeRequest<Comment>("posts", new string[] { postIds.Vectorize(), "comments" }, new
-            {
-                site = this.SiteUrlName,
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null,
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                sort = options.SortBy.ToString().ToLower(),
-                order = GetSortDirection(options.SortDirection),
-            });
-            return new PagedList<Comment>(response);
-        }
-
-        public virtual IPagedList<Comment> GetAnswerComments(int answerId)
-        {
-            return GetAnswerComments(answerId, new CommentsByPostOptions());
-        }
-
-        public virtual IPagedList<Comment> GetAnswerComments(int answerId, CommentsByPostOptions options)
-        {
-            return GetAnswerComments(answerId.ToArray(), options);
-        }
-
-        public virtual IPagedList<Comment> GetAnswerComments(IEnumerable<int> answerIds)
-        {
-            return GetAnswerComments(answerIds, new CommentsByPostOptions());
-        }
-
-        public virtual IPagedList<Comment> GetAnswerComments(IEnumerable<int> answerIds, CommentsByPostOptions options)
-        {
-            var response = MakeRequest<Comment>("answers", new string[] { answerIds.Vectorize(), "comments" }, new
-            {
-                site = this.SiteUrlName,
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null,
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                sort = options.SortBy.ToString().ToLower(),
-                order = GetSortDirection(options.SortDirection),
-                min = options.Min ?? null,
-                max = options.Max ?? null
-            });
-            return new PagedList<Comment>(response);
+            return Execute<Comment>("comments", new string[] { ids.Vectorize() }, options);
         }
     }
 }

trunk/source/Stacky.Net35/StackyClient/PostMethods.cs

+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+namespace Stacky
+{
+    public partial class StackyClient
+    {
+        public IPagedList<Post> GetPosts()
+        {
+            return GetPosts(null);
+        }
+
+        public IPagedList<Post> GetPosts(Options<PostSort> options)
+        {
+            return Execute<Post>("posts", null, options);
+        }
+
+        public IPagedList<Post> GetPosts(IEnumerable<int> ids, Options<PostSort> options)
+        {
+            return Execute<Post>("posts", new string[] { ids.Vectorize() }, options);
+        }
+
+        public Post GetPosts(int id, Options<PostSort> options)
+        {
+            return GetPosts(id.ToArray(), options).FirstOrDefault();
+        }
+
+        public IPagedList<Comment> GetPostComments(IEnumerable<int> ids, Options<CommentSort> options)
+        {
+            return Execute<Comment>("posts", new string[] { ids.Vectorize(), "comments" }, options);
+        }
+
+        public IPagedList<Revision> GetPostRevisions(int id, OptionsWithDates options)
+        {
+            return GetPostRevisions(id.ToArray(), options);
+        }
+
+        public IPagedList<Revision> GetPostRevisions(IEnumerable<int> ids, OptionsWithDates options)
+        {
+            return Execute<Revision>("posts", new string[] { ids.Vectorize(), "revisions" }, options);
+        }
+
+        public IPagedList<SuggestedEdit> GetPostSuggestedEdits(int id, Options<SuggestedEditSort> options)
+        {
+            return GetPostSuggestedEdits(id.ToArray(), options);
+        }
+
+        public IPagedList<SuggestedEdit> GetPostSuggestedEdits(IEnumerable<int> ids, Options<SuggestedEditSort> options)
+        {
+            return Execute<SuggestedEdit>("posts", new string[] { ids.Vectorize(), "suggested-edits" }, options);
+        }
+    }
+}

trunk/source/Stacky.Net35/StackyClient/QuestionMethods.cs

 {
     public partial class StackyClient
     {
-        public virtual IPagedList<Question> GetQuestions()
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/questions
+        /// </summary>
+        public IPagedList<Question> GetQuestions()
         {
-            return GetQuestions(new QuestionOptions());
+            return GetQuestions(null);
         }
 
-        public virtual IPagedList<Question> GetQuestions(QuestionOptions options)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/questions
+        /// </summary>
+        public IPagedList<Question> GetQuestions(Options<QuestionSort> options)
         {
-            var sortArgs = options.SortBy.GetAttribute<SortArgsAttribute>();
-            return GetQuestions("questions", sortArgs.UrlArgs, sortArgs.Sort, GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.IncludeBody, options.IncludeComments, options.IncludeAnswers, options.FromDate, options.ToDate, options.Min, options.Max, options.Tags);
+            return Execute<Question>("questions", null, options);
         }
 
-        public virtual IPagedList<Question> GetQuestions(IEnumerable<int> questionIds)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/questions-by-ids
+        /// </summary>
+        public Question GetQuestion(int id, Options<QuestionSort> options)
         {
-            return GetQuestions(questionIds, new QuestionOptions());
+            return GetQuestions(id.ToArray(), options).FirstOrDefault();
         }
 
-        public virtual IPagedList<Question> GetQuestions(IEnumerable<int> questionIds, QuestionOptions options)
+        /// <summary>
+        /// https://api.stackexchange.com/docs/questions-by-ids
+        /// </summary>
+        public IPagedList<Question> GetQuestions(IEnumerable<int> ids, Options<QuestionSort> options)
         {
-            var sortArgs = options.SortBy.GetAttribute<SortArgsAttribute>();
-            string[] urlArgs = sortArgs.UrlArgs.Concat(new string[] { questionIds.Vectorize() }).ToArray();
-            return GetQuestions("questions", urlArgs, sortArgs.Sort, GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.IncludeBody, options.IncludeComments, options.IncludeAnswers, options.FromDate, options.ToDate, options.Min, options.Max, options.Tags);
+            return Execute<Question>("questions", new string[] { ids.Vectorize() }, options);
         }
 
-        public virtual IPagedList<Question> GetQuestionsByUser(int userId)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/answers-on-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Answer> GetQuestionAnswers(int id, Options<AnswerSort> options)
         {
-            return GetQuestionsByUser(userId, new QuestionByUserOptions());
+            return GetQuestionAnswers(id.ToArray(), options);
         }
 
-        public virtual IPagedList<Question> GetQuestionsByUser(int userId, QuestionByUserOptions options)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/answers-on-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Answer> GetQuestionAnswers(IEnumerable<int> ids, Options<AnswerSort> options)
         {
-            return GetQuestions("users", new string[] { userId.ToString(), "questions" }, options.SortBy.ToString().ToLower(), GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.IncludeBody, options.IncludeComments, options.IncludeAnswers, options.FromDate, options.ToDate, options.Min, options.Max, options.Tags);
+            return Execute<Answer>("questions", new string[] { ids.Vectorize(), "answers" }, options);
         }
 
-        public virtual IPagedList<Question> GetFavoriteQuestions(int userId)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/comments-on-questions
+        /// </summary>
+        public IPagedList<Comment> GetQuestionComments(int id, Options<CommentSort> options)
         {
-            return GetFavoriteQuestions(userId, new FavoriteQuestionOptions());
+            return GetQuestionComments(id.ToArray(), options);
         }
 
-        public virtual IPagedList<Question> GetFavoriteQuestions(int userId, FavoriteQuestionOptions options)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/comments-on-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Comment> GetQuestionComments(IEnumerable<int> ids, Options<CommentSort> options)
         {
-            return GetQuestions("users", new string[] { userId.ToString(), "favorites" }, options.SortBy.ToString().ToLower(), GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.IncludeBody, options.IncludeComments, options.IncludeAnswers, options.FromDate, options.ToDate, options.Min, options.Max, options.Tags);
+            return Execute<Comment>("questions", new string[] { ids.Vectorize(), "comments" }, options);
         }
 
-        private IPagedList<Question> GetQuestions(string method, string[] urlArguments, string sort, string sortDirection, int? page, int? pageSize, bool includeBody, bool includeComments, bool includeAnswers, DateTime? fromDate, DateTime? toDate, int? min, int? max, params string[] tags)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/linked-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetLinkedQuestions(int id, Options<QuestionSort> options)
         {
-            var response = MakeRequest<Question>(method, urlArguments, new
-            {
-                site = this.SiteUrlName,
-                page = page ?? null,
-                pagesize = pageSize ?? null,
-                body = includeBody ? (bool?)true : null,
-                comments = includeComments ? (bool?)true : null,
-                answers = includeAnswers ? (bool?)true : null,
-                fromdate = GetDateValue(fromDate),
-                todate = GetDateValue(toDate),
-                tagged = tags == null ? (string)null : String.Join(" ", tags),
-                sort = sort,
-                order = sortDirection,
-                min = min ?? null,
-                max = max ?? null
-            });
-            return new PagedList<Question>(response);
+            return GetLinkedQuestions(id.ToArray(), options);
         }
 
-        public virtual Question GetQuestion(int questionId)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/linked-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetLinkedQuestions(IEnumerable<int> ids, Options<QuestionSort> options)
         {
-            return GetQuestion(questionId, null, null, null);
+            return Execute<Question>("questions", new string[] { ids.Vectorize(), "linked" }, options);
         }
 
-        public virtual Question GetQuestion(int questionId, bool? includeBody, bool? includeComments, bool? includeAnswers)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/linked-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetRelatedQuestions(int id, Options<QuestionSort> options)
         {
-            return GetQuestions("questions", new string[] { questionId.ToString() }, null, null, null, null, includeBody ?? false, includeComments ?? false, includeAnswers ?? false, null, null, null, null, null).FirstOrDefault();
+            return GetRelatedQuestions(id.ToArray(), options);
         }
 
-        public virtual IPagedList<PostEvent> GetQuestionTimeline(IEnumerable<int> questionIds)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/linked-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetRelatedQuestions(IEnumerable<int> ids, Options<QuestionSort> options)
         {
-            return GetQuestionTimeline(questionIds, new QuestionTimelineOptions());
+            return Execute<Question>("questions", new string[] { ids.Vectorize(), "related" }, options);
         }
 
-        public virtual IPagedList<PostEvent> GetQuestionTimeline(IEnumerable<int> questionIds, QuestionTimelineOptions options)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/questions-timeline
+        /// </summary>
+        public IPagedList<QuestionTimeline> GetQuestionTimeline(int id, OptionsWithDates options)
         {
-            var response = MakeRequest<PostEvent>("questions", new string[] { questionIds.Vectorize(), "timeline" }, new
+            return GetQuestionTimeline(id.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/questions-timeline
+        /// </summary>
+        public IPagedList<QuestionTimeline> GetQuestionTimeline(IEnumerable<int> ids, OptionsWithDates options)
+        {
+            ValidateVectorizedParameters(ids);
+            return Execute<QuestionTimeline>("questions", new string[] { ids.Vectorize(), "timeline" }, options);
+        }
+
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/unanswered-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUnansweredQuestions(TaggedOptions<QuestionSort> options)
+        {
+            var response = MakeRequest<Question>("questions", new string[] { "unanswered" }, new
             {
                 site = this.SiteUrlName,
                 page = options.Page ?? null,
                 pagesize = options.PageSize ?? null,
                 fromdate = GetDateValue(options.FromDate),
                 todate = GetDateValue(options.ToDate),
+                sort = GetEnumValue(options.SortBy),
+                order = GetSortDirection(options.SortDirection),
+                min = GetDateValue(options.Min),
+                max = GetDateValue(options.Max),
+                tagged = options.Tagged,
+                filter = options.Filter
             });
-            return new PagedList<PostEvent>(response);
+            return new PagedList<Question>(response);
         }
 
-        public virtual IEnumerable<PostEvent> GetQuestionTimeline(int questionId)
+        // <summary>
+        /// See https://api.stackexchange.com/docs/unanswered-questions
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetQuestionsWithNoAnswers(TaggedOptions<QuestionSort> options)
         {
-            return GetQuestionTimeline(questionId.ToArray());
+            var response = MakeRequest<Question>("questions", new string[] { "no-answers" }, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
+                fromdate = GetDateValue(options.FromDate),
+                todate = GetDateValue(options.ToDate),
+                sort = GetEnumValue(options.SortBy),
+                order = GetSortDirection(options.SortDirection),
+                min = GetDateValue(options.Min),
+                max = GetDateValue(options.Max),
+                tagged = options.GetListValue(options.Tagged),
+                filter = options.Filter
+            });
+            return new PagedList<Question>(response);
         }
 
-        public virtual IEnumerable<PostEvent> GetQuestionTimeline(int questionId, QuestionTimelineOptions options)
+        // <summary>
+        /// See https://api.stackexchange.com/docs/search
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> SearchQuestions(QuestionSearchOptions options)
         {
-            return GetQuestionTimeline(questionId.ToArray(), options);
-        }
-
-        public virtual IPagedList<Question> Search(QuestionSearchOptions options)
-        {
-            string taggedString = null;
-            if (options.Tagged != null)
-                taggedString = String.Join(" ", options.Tagged.ToArray());
-
-            string notTaggedString = null;
-            if (options.NotTagged != null)
-                notTaggedString = String.Join(" ", options.NotTagged.ToArray());
+            if (((options.Tagged != null && options.Tagged.Count() == 0) || options.Tagged == null) &&
+                String.IsNullOrEmpty(options.InTitle))
+            {
+                throw new ArgumentException("At least one of tagged or intitle must be set on this method");
+            }
 
             var response = MakeRequest<Question>("search", null, new
             {
                 site = this.SiteUrlName,
-                intitle = options.InTitle,
-                tagged = taggedString,
-                nottagged = notTaggedString,
-                sort = options.SortBy.ToString(),
-                order = GetSortDirection(options.SortDirection),
                 page = options.Page ?? null,
                 pagesize = options.PageSize ?? null,
-                min = options.Min ?? null,
-                max = options.Max ?? null
+                fromdate = GetDateValue(options.FromDate),
+                todate = GetDateValue(options.ToDate),
+                sort = GetEnumValue(options.SortBy),
+                order = GetSortDirection(options.SortDirection),
+                min = GetDateValue(options.Min),
+                max = GetDateValue(options.Max),
+                tagged = options.GetListValue(options.Tagged),
+                nottagged = options.GetListValue(options.NotTagged),
+                intitle = options.InTitle,
+                filter = options.Filter
+            });
+            return new PagedList<Question>(response);
+        }
+
+        // <summary>
+        /// See https://api.stackexchange.com/docs/similar
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> SimiliarQuestions(string title, SimiliarQuestionsOptions options)
+        {
+            var response = MakeRequest<Question>("similar", null, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
+                fromdate = GetDateValue(options.FromDate),
+                todate = GetDateValue(options.ToDate),
+                sort = GetEnumValue(options.SortBy),
+                order = GetSortDirection(options.SortDirection),
+                min = GetDateValue(options.Min),
+                max = GetDateValue(options.Max),
+                tagged = options.GetListValue(options.Tagged),
+                nottagged = options.GetListValue(options.NotTagged),
+                title = title,
+                filter = options.Filter
             });
             return new PagedList<Question>(response);
         }

trunk/source/Stacky.Net35/StackyClient/RevisionMethods.cs

 {
     public partial class StackyClient
     {
-        public virtual IEnumerable<Revision> GetRevisions(IEnumerable<int> ids)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/revisions-by-guids
+        /// </summary>
+        public IPagedList<Revision> GetRevisions(IEnumerable<string> ids, OptionsWithDates options)
         {
-            return GetRevisions(ids, null, null);
+            return Execute<Revision>("revisions", new string[] { ids.Vectorize() }, options);
         }
 
-        public virtual IEnumerable<Revision> GetRevisions(IEnumerable<int> ids, DateTime? fromDate, DateTime? toDate)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/revisions-by-guids
+        /// </summary>
+        public IPagedList<Revision> GetRevisions(IEnumerable<Guid> ids, OptionsWithDates options)
         {
-            return MakeRequest<Revision>("revisions", new string[] { ids.Vectorize() }, new
-            {
-                site = this.SiteUrlName,
-                fromdate = GetDateValue(fromDate),
-                todate = GetDateValue(toDate)
-            }).Items;
+            return GetRevisions(ids.Select(i => i.ToString()), options);
         }
 
-        public virtual IEnumerable<Revision> GetRevisions(int id)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/revisions-by-guids
+        /// </summary>
+        public Revision GetRevision(string id, OptionsWithDates options)
         {
-            return GetRevisions(id.ToArray());
+            return GetRevisions(new string[] { id }, options).FirstOrDefault();
         }
 
-        public virtual IEnumerable<Revision> GetRevisions(int id, DateTime? fromDate, DateTime? toDate)
+        /// <summary>
+        /// See https://api.stackexchange.com/docs/revisions-by-guids
+        /// </summary>
+        public Revision GetRevision(Guid id, OptionsWithDates options)
         {
-            return GetRevisions(id.ToArray(), fromDate, toDate);
-        }
-
-        public virtual Revision GetRevision(int id, Guid revision)
-        {
-            return MakeRequest<Revision>("revisions", new string[] { id.ToString(), revision.ToString() }, new
-            {
-                site = this.SiteUrlName
-            }).Items.FirstOrDefault();
+            return GetRevisions(new string[] { id.ToString() }, options).FirstOrDefault();
         }
     }
 }

trunk/source/Stacky.Net35/StackyClient/StackyClientWithOptions.cs

                 site = this.SiteUrlName,
                 page = options.Page ?? null,
                 pagesize = options.PageSize ?? null,
+                filter = options.Filter
+            });
+            return new PagedList<TEntity>(response);
+        }
+
+        protected IPagedList<TEntity> Execute<TEntity>(string methodName, string[] urlArguments, OptionsWithDates options)
+            where TEntity : Entity, new()
+        {
+            var response = MakeRequest<TEntity>(methodName, urlArguments, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
                 fromdate = GetDateValue(options.FromDate),
                 todate = GetDateValue(options.ToDate),
                 filter = options.Filter

trunk/source/Stacky.Net35/StackyClient/StatsMethods.cs

-using System.Collections.Generic;
-using System.Linq;
-
-namespace Stacky
-{
-    public partial class StackyClient
-    {
-        public virtual SiteInfo GetSiteStats()
-        {
-            return MakeRequest<SiteInfo>("info", null, new
-            {
-                site = this.SiteUrlName
-            }).Items.FirstOrDefault();
-        }
-    }
-}

trunk/source/Stacky.Net35/StackyClient/SuggestedEditMethods.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Stacky
+{
+    public partial class StackyClient
+    {
+        /// <summary>
+        /// See http://api.stackexchange.com/docs/suggested-edits
+        /// </summary>
+        public IPagedList<SuggestedEdit> GetSuggestedEdits()
+        {
+            return GetSuggestedEdits(null);
+        }
+
+        /// <summary>
+        /// See http://api.stackexchange.com/docs/suggested-edits
+        /// </summary>
+        public IPagedList<SuggestedEdit> GetSuggestedEdits(Options<SuggestedEditSort> options)
+        {
+            return Execute<SuggestedEdit>("suggested-edits", null, options);
+        }
+
+        /// <summary>
+        /// See http://api.stackexchange.com/docs/suggested-edits-by-ids
+        /// </summary>
+        public IPagedList<SuggestedEdit> GetSuggestedEdits(IEnumerable<int> ids, Options<SuggestedEditSort> options)
+        {
+            return Execute<SuggestedEdit>("suggested-edits", new string[] { ids.Vectorize() }, options);
+        }
+
+        /// <summary>
+        /// See http://api.stackexchange.com/docs/suggested-edits-by-ids
+        /// </summary>
+        public SuggestedEdit GetSuggestedEdit(int id, Options<SuggestedEditSort> options)
+        {
+            return GetSuggestedEdits(id.ToArray(), options).FirstOrDefault();
+        }
+    }
+}

trunk/source/Stacky.Net35/StackyClient/TagMethods.cs

 {
     public partial class StackyClient
     {
-        public virtual IPagedList<Tag> GetTags()
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/tags
+        /// </summary>
+        public IPagedList<Tag> GetTags()
         {
-            return GetTags(new TagOptions());
+            return GetTags(null);
         }
 
-        public virtual IPagedList<Tag> GetTags(TagOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/tags
+        /// </summary>
+        public IPagedList<Tag> GetTags(TagOptions options)
         {
-            return GetTags("tags", null, options.Filter, options.SortBy.ToString(), GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.FromDate, options.ToDate, options.Min, options.Max);
-        }
-
-        private IPagedList<Tag> GetTags(string method, string[] urlParameters, string filter, string sort, string order, int? page, int? pageSize, DateTime? fromDate, DateTime? toDate, int? min, int? max)
-        {
-            var response = MakeRequest<Tag>(method, urlParameters, new
+            var response = MakeRequest<Tag>("tags", null, new
             {
                 site = this.SiteUrlName,
-                page = page ?? null,
-                pagesize = pageSize ?? null,
-                sort = sort,
-                order = order,
-                fromdate = GetDateValue(fromDate),
-                todate = GetDateValue(toDate),
-                min = min ?? null,
-                max = max ?? null
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
+                fromdate = GetDateValue(options.FromDate),
+                todate = GetDateValue(options.ToDate),
+                sort = GetEnumValue(options.SortBy),
+                order = GetSortDirection(options.SortDirection),
+                min = options.Min ?? null,
+                max = options.Max ?? null,
+                inname = options.InName,
+                filter = options.Filter
             });
             return new PagedList<Tag>(response);
         }
 
-        public virtual IPagedList<Tag> GetTagsByUser(int userId)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/tag-synonyms
+        /// </summary>
+        public IPagedList<TagSynonym> GetTagSynonyms(Options<TagSynonymSort> options)
         {
-            return GetTagsByUser(userId, new TagOptions());
+            return Execute<TagSynonym>("tags", new string[] { "synonyms" }, options);
         }
 
-        public virtual IPagedList<Tag> GetTagsByUser(int userId, TagOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/synonyms-by-tags
+        /// </summary>
+        public IPagedList<TagSynonym> GetTagSynonyms(IEnumerable<string> tags, Options<TagSynonymSort> options)
         {
-            return GetTagsByUser(userId.ToArray(), options);
+            return Execute<TagSynonym>("tags", new string[] { tags.Vectorize(), "synonyms" }, options);
         }
 
-        public virtual IPagedList<Tag> GetTagsByUser(IEnumerable<int> userIds)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/synonyms-by-tags
+        /// </summary>
+        public IPagedList<TagSynonym> GetTagSynonyms(string tag, Options<TagSynonymSort> options)
         {
-            return GetTagsByUser(userIds, new TagOptions());
+            return GetTagSynonyms(new string[] { tag }, options);
         }
 
-        public virtual IPagedList<Tag> GetTagsByUser(IEnumerable<int> userIds, TagOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-answerers-on-tags
+        /// </summary>
+        public IPagedList<TagScore> GetTagTopAnswerers(string tag, TopAnswerOptions options)
         {
-            return GetTags("users", new string[] { userIds.Vectorize(), "tags" }, options.Filter, options.SortBy.ToString(), GetSortDirection(options.SortDirection), options.Page, options.PageSize, options.FromDate, options.ToDate, options.Min, options.Max);
+            var response = MakeRequest<TagScore>("tags", new string[] { tag, "top-answerers", GetEnumValue(options.Period) }, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
+                filter = options.Filter
+            });
+            return new PagedList<TagScore>(response);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-askers-on-tags
+        /// </summary>
+        public IPagedList<TagScore> GetTagTopAskers(string tag, TopAnswerOptions options)
+        {
+            var response = MakeRequest<TagScore>("tags", new string[] { tag, "top-askers", GetEnumValue(options.Period) }, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.PageSize ?? null,
+                filter = options.Filter
+            });
+            return new PagedList<TagScore>(response);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/wikis-by-tags
+        /// </summary>
+        public IPagedList<TagWiki> GetTagWikis(IEnumerable<string> tags, Options options)
+        {
+            var response = MakeRequest<TagWiki>("tags", new string[] { tags.Vectorize(), "wikis" }, new
+            {
+                site = this.SiteUrlName,
+                page = options.Page ?? null,
+                pagesize = options.Page ?? null,
+                filter = options.Filter
+            });
+            return new PagedList<TagWiki>(response);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/wikis-by-tags
+        /// </summary>
+        public IPagedList<TagWiki> GetTagWikis(string tag, Options options)
+        {
+            return GetTagWikis(new string[] { tag }, options);
         }
     }
 }

trunk/source/Stacky.Net35/StackyClient/UserMethods.cs

 {
     public partial class StackyClient
     {
-        public virtual IPagedList<User> GetUsers()
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/users
+        /// </summary>
+        public IPagedList<User> GetUsers()
         {
-            return GetUsers(new UserOptions());
+            return GetUsers(null);
         }
 
-        public virtual IPagedList<User> GetUsers(UserOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/users
+        /// </summary>
+        public IPagedList<User> GetUsers(Options<UserSort, int> options)
         {
-            return GetUsers(options, null);
+            return Execute<User, Int32>("users", null, options);
         }
 
-        public virtual IPagedList<User> GetUsers(IEnumerable<int> userIds)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/users-by-ids
+        /// </summary>
+        public IPagedList<User> GetUsers(IEnumerable<int> ids, Options<UserSort, int> options)
         {
-            return GetUsers(userIds, new UserOptions());
+            return Execute<User, Int32>("users", new string[] { ids.Vectorize() }, options);
         }
 
-        public virtual IPagedList<User> GetUsers(IEnumerable<int> userIds, UserOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/users-by-ids
+        /// </summary>
+        public User GetUser(int id, Options<UserSort, int> options)
         {
-            return GetUsers(options, new string[] { userIds.Vectorize() });
+            return GetUsers(id.ToArray(), options).FirstOrDefault();
         }
 
-        private IPagedList<User> GetUsers(UserOptions options, string[] urlParameters)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/answers-on-users
+        /// </summary>
+        public IPagedList<Answer> GetUserAnswers(IEnumerable<int> ids, Options<UserSort> options)
         {
-            var response = MakeRequest<User>("users", urlParameters, new
-            {
-                site = this.SiteUrlName,
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null,
-                filter = options.Filter,
-                sort = options.SortBy.ToString().ToLower(),
-                order = GetSortDirection(options.SortDirection),
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                min = options.Min ?? null,
-                max = options.Max ?? null
-            });
-            return new PagedList<User>(response);
+            return Execute<Answer>("users", new string[] { ids.Vectorize(), "answers" }, options);
         }
 
-        public virtual User GetUser(int userId)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/answers-on-users
+        /// </summary>
+        public IPagedList<Answer> GetUserAnswers(int id, Options<UserSort> options)
         {
-            return GetUsers(userId.ToArray()).FirstOrDefault();
+            return GetUserAnswers(id.ToArray(), options);
         }
 
-        public virtual IPagedList<Comment> GetUserMentions(int userId)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/badges-on-users
+        /// </summary>
+        public IPagedList<Badge> GetUserBadges(IEnumerable<int> ids, Options<UserSort, BadgeMinMax> options)
         {
-            return GetUserMentions(userId, new UserMentionsOptions());
+            return Execute<Badge, BadgeMinMax>("users", new string[] { ids.Vectorize(), "badges" }, options);
         }
 
-        public virtual IPagedList<Comment> GetUserMentions(int userId, UserMentionsOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/badges-on-users
+        /// </summary>
+        public IPagedList<Badge> GetUserBadges(int id, Options<UserSort, BadgeMinMax> options)
+        {
+            return GetUserBadges(id.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/comments-on-users
+        /// </summary>
+        public IPagedList<Comment> GetUserComments(IEnumerable<int> ids, Options<UserSort> options)
+        {
+            return Execute<Comment>("users", new string[] { ids.Vectorize(), "comments" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/comments-on-users
+        /// </summary>
+        public IPagedList<Comment> GetUserComments(int id, Options<UserSort> options)
+        {
+            return GetUserComments(id.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/comments-by-users-to-user
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Comment> GetUserCommentsTo(IEnumerable<int> fromIds, IEnumerable<int> toIds, Options<UserSort> options)
+        {
+            return Execute<Comment>("users", new string[] { fromIds.Vectorize(), "comments", toIds.Vectorize() }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/favorites-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserFavoriteQuestions(IEnumerable<int> userIds, Options<QuestionSort> options)
+        {
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "favorites" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/favorites-on-users
+        /// </summary>
+        public IPagedList<Question> GetUserFavoriteQuestions(int userId, Options<QuestionSort> options)
+        {
+            return GetUserFavoriteQuestions(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/mentions-on-users
+        /// </summary>
+        public IPagedList<Comment> GetUserMentions(IEnumerable<int> userIds, Options<CommentSort> options)
+        {
+            return Execute<Comment>("users", new string[] { userIds.Vectorize(), "mentioned" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/mentions-on-users
+        /// </summary>
+        public IPagedList<Comment> GetUserMentions(int userId, Options<CommentSort> options)
         {
             return GetUserMentions(userId.ToArray(), options);
         }
 
-        public virtual IPagedList<Comment> GetUserMentions(IEnumerable<int> userIds)
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/privileges-on-users
+        /// </summary>
+        public IPagedList<Privilege> GetUserPrivileges(IEnumerable<int> userIds, Options options)
         {
-            return GetUserMentions(userIds, new UserMentionsOptions());
+            return Execute<Privilege>("users", new string[] { userIds.Vectorize(), "privileges" }, options);
         }
 
-        public virtual IPagedList<Comment> GetUserMentions(IEnumerable<int> userIds, UserMentionsOptions options)
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/privileges-on-users
+        /// </summary>
+        public IPagedList<Privilege> GetUserPrivileges(int userId, Options options)
         {
-            var response = MakeRequest<Comment>("users", new string[] { userIds.Vectorize(), "mentioned" }, new
-            {
-                site = this.SiteUrlName,
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null,
-                filter = options.Filter,
-                sort = options.SortBy.ToString().ToLower(),
-                order = GetSortDirection(options.SortDirection),
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                min = options.Min ?? null,
-                max = options.Max ?? null
-            });
-            return new PagedList<Comment>(response);
+            return GetUserPrivileges(userId.ToArray(), options);
         }
 
-        public virtual IPagedList<UserEvent> GetUserTimeline(int userId)
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/questions-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserQuestions(IEnumerable<int> userIds, Options<QuestionSort> options)
         {
-            return GetUserTimeline(userId, new UserTimelineOptions());
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "questions" }, options);
         }
 
-        public virtual IPagedList<UserEvent> GetUserTimeline(int userId, UserTimelineOptions options)
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/questions-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserQuestions(int userId, Options<QuestionSort> options)
+        {
+            return GetUserQuestions(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/no-answer-questions-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserQuestionsWithNoAnswers(IEnumerable<int> userIds, Options<QuestionSort> options)
+        {
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "questions", "no-answers" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/no-answer-questions-on-users    
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserQuestionsWithNoAnswers(int userId, Options<QuestionSort> options)
+        {
+            return GetUserQuestionsWithNoAnswers(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/unaccepted-questions-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserUnacceptedQuestions(IEnumerable<int> userIds, Options<QuestionSort> options)
+        {
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "questions", "unaccepted" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/unaccepted-questions-on-users    
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserUnacceptedQuestions(int userId, Options<QuestionSort> options)
+        {
+            return GetUserUnacceptedQuestions(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/unanswered-questions-on-users
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserUnansweredQuestions(IEnumerable<int> userIds, Options<QuestionSort> options)
+        {
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "questions", "unanswered" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/unanswered-questions-on-users  
+        /// </summary>
+        /// TODO: Fix Sort
+        public IPagedList<Question> GetUserUnansweredQuestions(int userId, Options<QuestionSort> options)
+        {
+            return GetUserUnansweredQuestions(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/reputation-on-users
+        /// </summary>
+        public IPagedList<Reputation> GetUserReputation(IEnumerable<int> userIds, OptionsWithDates options)
+        {
+            return Execute<Reputation>("users", new string[] { userIds.Vectorize(), "reputation" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/reputation-on-users 
+        /// </summary>
+        public IPagedList<Reputation> GetUserReputation(int userId, OptionsWithDates options)
+        {
+            return GetUserReputation(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/suggested-edits-on-users
+        /// </summary>
+        public IPagedList<SuggestedEdit> GetUserSuggestedEdits(IEnumerable<int> userIds, Options<SuggestedEditSort> options)
+        {
+            return Execute<SuggestedEdit>("users", new string[] { userIds.Vectorize(), "suggested-edits" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/suggested-edits-on-users 
+        /// </summary>
+        public IPagedList<SuggestedEdit> GetUserUnansweredQuestions(int userId, Options<SuggestedEditSort> options)
+        {
+            return GetUserSuggestedEdits(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/tags-on-users
+        /// </summary>
+        public IPagedList<Tag> GetUserTags(IEnumerable<int> userIds, Options<TagSort> options)
+        {
+            return Execute<Tag>("users", new string[] { userIds.Vectorize(), "tags" }, options);
+        }
+
+        /// <summary>
+        /// See: https://api.stackexchange.com/docs/tags-on-users
+        /// </summary>
+        public IPagedList<Tag> GetUserTags(int userId, Options<TagSort> options)
+        {
+            return GetUserTags(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-user-answers-in-tags
+        /// </summary>
+        public IPagedList<Answer> GetUserTopAnswersByTag(IEnumerable<int> userIds, IEnumerable<string> tags, Options<AnswerSort> options)
+        {
+            return Execute<Answer>("users", new string[] { userIds.Vectorize(), "tags", tags.Vectorize(), "top-answers" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-user-answers-in-tags
+        /// </summary>
+        public IPagedList<Answer> GetUserTopAnswersByTag(int userId, IEnumerable<string> tags, Options<AnswerSort> options)
+        {
+            return GetUserTopAnswersByTag(userId.ToArray(), tags, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-answer-tags-on-users
+        /// </summary>
+        public IPagedList<TopTag> GetUserTopAnswersByTag(IEnumerable<int> userIds, Options options)
+        {
+            return Execute<TopTag>("users", new string[] { userIds.Vectorize(), "top-answer-tags" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-answer-tags-on-users
+        /// </summary>
+        public IPagedList<TopTag> GetUserTopAnswersByTag(int userId, Options options)
+        {
+            return GetUserTopAnswersByTag(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-user-questions-in-tags
+        /// </summary>
+        public IPagedList<Question> GetUserTopQuestionsByTag(IEnumerable<int> userIds, IEnumerable<string> tags, Options<QuestionSort> options)
+        {
+            return Execute<Question>("users", new string[] { userIds.Vectorize(), "tags", tags.Vectorize(), "top-questions" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-user-questions-in-tags
+        /// </summary>
+        public IPagedList<Question> GetUserTopQuestionsByTag(int userId, IEnumerable<string> tags, Options<QuestionSort> options)
+        {
+            return GetUserTopQuestionsByTag(userId.ToArray(), tags, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-question-tags-on-users
+        /// </summary>
+        public IPagedList<TopTag> GetUserTopQuestionsByTag(IEnumerable<int> userIds, Options options)
+        {
+            return Execute<TopTag>("users", new string[] { userIds.Vectorize(), "top-question-tags" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/top-question-tags-on-users
+        /// </summary>
+        public IPagedList<TopTag> GetUserTopQuestionsByTag(int userId, Options options)
+        {
+            return GetUserTopQuestionsByTag(userId.ToArray(), options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/timeline-on-users
+        /// </summary>
+        public IPagedList<UserTimeline> GetUserTimeline(IEnumerable<int> userIds, OptionsWithDates options)
+        {
+            return Execute<UserTimeline>("users", new string[] { userIds.Vectorize(), "timeline" }, options);
+        }
+
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/timeline-on-users
+        /// </summary>
+        public IPagedList<UserTimeline> GetUserTimeline(int userId, OptionsWithDates options)
         {
             return GetUserTimeline(userId.ToArray(), options);
         }
 
-        public virtual IPagedList<UserEvent> GetUserTimeline(IEnumerable<int> userIds)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/moderators
+        /// </summary>
+        public IPagedList<User> GetModerators()
         {
-            return GetUserTimeline(userIds, new UserTimelineOptions());
+            return GetModerators(null);
         }
 
-        public virtual IPagedList<UserEvent> GetUserTimeline(IEnumerable<int> userIds, UserTimelineOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/moderators
+        /// </summary>
+        public IPagedList<User> GetModerators(Options<UserSort, int> options)
         {
-            var response = MakeRequest<UserEvent>("users", new string[] { userIds.Vectorize(), "timeline" }, new
-            {
-                site = this.SiteUrlName,
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null
-            });
-            return new PagedList<UserEvent>(response);
+            return Execute<User, Int32>("users", new string[] { "moderators" }, options);
         }
 
-        public virtual IPagedList<Reputation> GetUserReputation(int userId)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/elected-moderators
+        /// </summary>
+        public IPagedList<User> GetElectedModerators()
         {
-            return GetUserReputation(userId, new ReputationOptions());
+            return GetElectedModerators(null);
         }
 
-        public virtual IPagedList<Reputation> GetUserReputation(int userId, ReputationOptions options)
+        /// <summary>
+        /// See: http://api.stackexchange.com/docs/elected-moderators
+        /// </summary>
+        public IPagedList<User> GetElectedModerators(Options<UserSort, int> options)
         {
-            return GetUserReputation(userId.ToArray(), options);
-        }
-
-        public virtual IPagedList<Reputation> GetUserReputation(IEnumerable<int> userIds)
-        {
-            return GetUserReputation(userIds, new ReputationOptions());
-        }
-
-        public virtual IPagedList<Reputation> GetUserReputation(IEnumerable<int> userIds, ReputationOptions options)
-        {
-            var response = MakeRequest<Reputation>("users", new string[] { userIds.Vectorize(), "reputation" }, new
-            {
-                site = this.SiteUrlName,
-                fromdate = GetDateValue(options.FromDate),
-                todate = GetDateValue(options.ToDate),
-                page = options.Page ?? null,
-                pagesize = options.PageSize ?? null
-            });
-            return new PagedList<Reputation>(response);
-        }
-
-        public virtual IPagedList<User> GetModerators()
-        {
-            return GetModerators(new UserOptions());
-        }
-
-        public virtual IPagedList<User> GetModerators(UserOptions options)
-        {
-            return GetUsers(options, new string[] { "moderators" });
+            return Execute<User, Int32>("users", new string[] { "moderators", "elected" }, options);
         }
     }
 }

trunk/source/Stacky/StackyClient/QuestionMethods.cs

         public IPagedList<Question> SearchQuestions(QuestionSort? sortBy = null, SortDirection? sortDirection = null, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, DateTime? min = null, DateTime? max = null, string[] tagged = null, string[] notTagged = null, string inTitle = null, string filter = null)
         {
             if (((tagged != null && tagged.Length == 0) || tagged == null) &&
-                ((notTagged != null && notTagged.Length == 0) || notTagged == null))
+                String.IsNullOrEmpty(inTitle))
             {
                 throw new ArgumentException("At least one of tagged or intitle must be set on this method");
             }

trunk/source/Tests/Stacky.Net35.IntegrationTests/CommentTests.cs

     [TestClass]
     public class CommentTests : IntegrationTest
     {
-        [TestMethod]
-        public void Comments_GetComments()
-        {
-            var comments = Client.GetComments(22656);
-            Assert.IsNotNull(comments);
-        }
+        //[TestMethod]
+        //public void Comments_GetComments()
+        //{
+        //    var comments = Client.GetComments(22656);
+        //    Assert.IsNotNull(comments);
+        //}
 
-        [TestMethod]
-        public void Comments_GetComments_ContainsPagingInformation()
-        {
-            var comments = Client.GetComments(22656);
-            Assert.IsNotNull(comments);
-            Assert.IsTrue(comments.PageSize > 0);
-            Assert.IsTrue(comments.CurrentPage > 0);
-            Assert.IsTrue(comments.TotalItems > 0);
-        }
+        //[TestMethod]
+        //public void Comments_GetComments_ContainsPagingInformation()
+        //{
+        //    var comments = Client.GetComments(22656);
+        //    Assert.IsNotNull(comments);
+        //    Assert.IsTrue(comments.PageSize > 0);
+        //    Assert.IsTrue(comments.CurrentPage > 0);
+        //    Assert.IsTrue(comments.TotalItems > 0);
+        //}
 
-        [TestMethod]
-        public void GetCommentsByPost_ByQuestionId()
-        {
-            var comments = Client.GetCommentsByPost(9033);
-            Assert.IsNotNull(comments);
-            Assert.AreEqual(PostType.Question, comments.FirstOrDefault().PostType);
-        }
+        //[TestMethod]
+        //public void GetCommentsByPost_ByQuestionId()
+        //{
+        //    var comments = Client.GetCommentsByPost(9033);
+        //    Assert.IsNotNull(comments);
+        //    Assert.AreEqual(PostType.Question, comments.FirstOrDefault().PostType);
+        //}
 
-        [TestMethod]
-        public void GetCommentsByPost_ByAnswerId()
-        {
-            var comments = Client.GetCommentsByPost(11738);
-            Assert.IsNotNull(comments);
-            Assert.AreEqual(PostType.Answer, comments.FirstOrDefault().PostType);
-        }
+        //[TestMethod]
+        //public void GetCommentsByPost_ByAnswerId()
+        //{
+        //    var comments = Client.GetCommentsByPost(11738);
+        //    Assert.IsNotNull(comments);
+        //    Assert.AreEqual(PostType.Answer, comments.FirstOrDefault().PostType);
+        //}
 
-        [TestMethod]
-        public void GetAnswerComments()
-        {
-            var answers = Client.GetAnswerComments(1330865);
-            Assert.IsNotNull(answers);
-        }
+        //[TestMethod]
+        //public void GetAnswerComments()
+        //{
+        //    var answers = Client.GetAnswerComments(1330865);
+        //    Assert.IsNotNull(answers);
+        //}
     }
 }

trunk/source/Tests/Stacky.Net35.IntegrationTests/QuestionTests.cs

             Assert.IsNotNull(questions);
         }
 
-        [TestMethod]
-        public void GetQuestions_SortByActive_Desc()
-        {
-            var questions = Client.GetQuestions(new QuestionOptions
-            {
-                SortBy = QuestionSort.Activity,
-                SortDirection = SortDirection.Descending
-            });
+        //[TestMethod]
+        //public void GetQuestions_SortByActive_Desc()
+        //{
+        //    var questions = Client.GetQuestions(new QuestionOptions
+        //    {
+        //        SortBy = QuestionSort.Activity,
+        //        SortDirection = SortDirection.Descending
+        //    });
 
-            Assert.IsNotNull(questions);
-            Assert.AreEqual(30, questions.Count());
-        }
+        //    Assert.IsNotNull(questions);
+        //    Assert.AreEqual(30, questions.Count());
+        //}
 
-        [TestMethod]
-        public void Question_GetQuestionTimeline()
-        {
-            var events = Client.GetQuestionTimeline(31415);
-            Assert.IsNotNull(events);
-        }
+        //[TestMethod]
+        //public void Question_GetQuestionTimeline()
+        //{
+        //    var events = Client.GetQuestionTimeline(31415);
+        //    Assert.IsNotNull(events);
+        //}
 
-        [TestMethod]
-        public void Question_Search()
-        {
-            var questions = Client.Search(new QuestionSearchOptions
-            {
-                InTitle = "Thread"
-            });
-            Assert.IsNotNull(questions);
-        }
+        //[TestMethod]
+        //public void Question_Search()
+        //{
+        //    var questions = Client.Search(new QuestionSearchOptions
+        //    {
+        //        InTitle = "Thread"
+        //    });
+        //    Assert.IsNotNull(questions);
+        //}
 
         [TestMethod]
         public void Question_GetQuestions_HasPagingInformation()
             Assert.IsTrue(questions.TotalItems > 0);
         }
 
-        [TestMethod]
-        public void Question_GetQuestion_ContainsOwner()
-        {
-            var question = Client.GetQuestion(2930182);
-            Assert.IsNotNull(question);
-            Assert.IsNotNull(question.Owner);
-            Assert.IsNotNull(question.Owner.Id);
-        }
+        //[TestMethod]
+        //public void Question_GetQuestion_ContainsOwner()
+        //{
+        //    var question = Client.GetQuestion(2930182);
+        //    Assert.IsNotNull(question);
+        //    Assert.IsNotNull(question.Owner);
+        //    Assert.IsNotNull(question.Owner.Id);
+        //}
 
-        [TestMethod]
-        public void MigratedQuestion_CanDeserialize()
-        {
-            var question = Client.GetQuestion(970696);
-            Assert.IsNotNull(question);
-            Assert.IsNotNull(question.MigratedFrom);
-            Assert.IsNotNull(question.MigratedTo);
-        }
+        //[TestMethod]
+        //public void MigratedQuestion_CanDeserialize()
+        //{
+        //    var question = Client.GetQuestion(970696);
+        //    Assert.IsNotNull(question);
+        //    Assert.IsNotNull(question.MigratedFrom);
+        //    Assert.IsNotNull(question.MigratedTo);
+        //}
 
-        [TestMethod]
-        public void Bug4_GetQuestionTimeline()
-        {
-            IPagedList<Question> questions = Client.GetQuestionsByUser(16587);
-            var editedQuestionIds = from q in questions
-                                    select Convert.ToInt32(q.Id);
-            var events = Client.GetQuestionTimeline(editedQuestionIds); //line that causes problems
-            Assert.IsNotNull(events);
-        }
+        //[TestMethod]
+        //public void Bug4_GetQuestionTimeline()
+        //{
+        //    IPagedList<Question> questions = Client.GetQuestionsByUser(16587);
+        //    var editedQuestionIds = from q in questions
+        //                            select Convert.ToInt32(q.Id);
+        //    var events = Client.GetQuestionTimeline(editedQuestionIds); //line that causes problems
+        //    Assert.IsNotNull(events);
+        //}
     }
 }

trunk/source/Tests/Stacky.Net35.IntegrationTests/RevisionTests.cs

     [TestClass]
     public class RevisionTests : IntegrationTest
     {
-        [TestMethod]
-        public void Revision_GetRevisions()
-        {
-            var revisions = Client.GetRevisions(31415);
-            Assert.IsNotNull(revisions);
-        }
+        //[TestMethod]
+        //public void Revision_GetRevisions()
+        //{
+        //    var revisions = Client.GetRevisions(31415);
+        //    Assert.IsNotNull(revisions);
+        //}
 
-        [TestMethod]
-        public void Revision_GetRevision()
-        {
-            var revision = Client.GetRevision(31415, new Guid("5a1fd2ac-421a-43a9-a2a3-2e9b5afe1b23"));
-            Assert.IsNotNull(revision);
-        }
+        //[TestMethod]
+        //public void Revision_GetRevision()
+        //{
+        //    var revision = Client.GetRevision(31415, new Guid("5a1fd2ac-421a-43a9-a2a3-2e9b5afe1b23"));
+        //    Assert.IsNotNull(revision);
+        //}
     }
 }

trunk/source/Tests/Stacky.Net35.IntegrationTests/TagTests.cs

             Assert.IsTrue(tags.TotalItems > 0);
         }
 
-        [TestMethod]
-        public void Tag_GetTagsByUser()
-        {
-            var tags = Client.GetTagsByUser(1464);
-            Assert.IsNotNull(tags);
-        }
+        //[TestMethod]
+        //public void Tag_GetTagsByUser()
+        //{
+        //    var tags = Client.GetTagsByUser(1464);
+        //    Assert.IsNotNull(tags);
+        //}
     }
 }

trunk/source/Tests/Stacky.Net35.IntegrationTests/UserTests.cs

             Assert.IsTrue(users.TotalItems > 0);
         }
 
-        [TestMethod]
-        public void User_GetUserMentions()
-        {
-            var mentions = Client.GetUserMentions(22656);
-            Assert.IsNotNull(mentions);
-        }
+        //[TestMethod]
+        //public void User_GetUserMentions()
+        //{
+        //    var mentions = Client.GetUserMentions(22656);
+        //    Assert.IsNotNull(mentions);
+        //}
 
-        [TestMethod]
-        public void User_GetUserMentions_ContainsPagingInformation()
-        {
-            var mentions = Client.GetUserMentions(22656);
-            Assert.IsNotNull(mentions);
-            Assert.IsTrue(mentions.PageSize > 0);
-            Assert.IsTrue(mentions.CurrentPage > 0);
-            Assert.IsTrue(mentions.TotalItems > 0);
-        }
+        //[TestMethod]
+        //public void User_GetUserMentions_ContainsPagingInformation()
+        //{
+        //    var mentions = Client.GetUserMentions(22656);
+        //    Assert.IsNotNull(mentions);
+        //    Assert.IsTrue(mentions.PageSize > 0);
+        //    Assert.IsTrue(mentions.CurrentPage > 0);
+        //    Assert.IsTrue(mentions.TotalItems > 0);
+        //}
 
         //[TestMethod]
         //public void User_GetQuestionAnswers()
         //    Assert.IsTrue(answers.TotalItems > 0);
         //}
 
-        [TestMethod]
-        public void User_GetUserTimeline()
-        {
-            var events = Client.GetUserTimeline(22656);
-            Assert.IsNotNull(events);
-        }
+        //[TestMethod]
+        //public void User_GetUserTimeline()
+        //{
+        //    var events = Client.GetUserTimeline(22656);
+        //    Assert.IsNotNull(events);
+        //}
 
-        [TestMethod]
-        public void User_GetUserTimeline_ContainsPagingInformation()
-        {
-            var events = Client.GetUserTimeline(22656);
-            Assert.IsNotNull(events);
-            Assert.IsTrue(events.PageSize > 0);
-            Assert.IsTrue(events.CurrentPage > 0);
-            Assert.IsTrue(events.TotalItems > 0);
-        }
+        //[TestMethod]
+        //public void User_GetUserTimeline_ContainsPagingInformation()
+        //{
+        //    var events = Client.GetUserTimeline(22656);
+        //    Assert.IsNotNull(events);
+        //    Assert.IsTrue(events.PageSize > 0);
+        //    Assert.IsTrue(events.CurrentPage > 0);
+        //    Assert.IsTrue(events.TotalItems > 0);
+        //}
 
-        [TestMethod]
-        public void User_GetUserReputation()
-        {
-            var rep = Client.GetUserReputation(22656);
-            Assert.IsNotNull(rep);
-        }
+        //[TestMethod]
+        //public void User_GetUserReputation()
+        //{
+        //    var rep = Client.GetUserReputation(22656);
+        //    Assert.IsNotNull(rep);
+        //}
 
-        [TestMethod]
-        public void User_GetUserReputation_ContainsPagingInformation()
-        {
-            var rep = Client.GetUserReputation(22656);
-            Assert.IsNotNull(rep);
-            Assert.IsTrue(rep.PageSize > 0);
-            Assert.IsTrue(rep.CurrentPage > 0);
-            Assert.IsTrue(rep.TotalItems > 0);
-        }
+        //[TestMethod]
+        //public void User_GetUserReputation_ContainsPagingInformation()
+        //{
+        //    var rep = Client.GetUserReputation(22656);
+        //    Assert.IsNotNull(rep);
+        //    Assert.IsTrue(rep.PageSize > 0);
+        //    Assert.IsTrue(rep.CurrentPage > 0);
+        //    Assert.IsTrue(rep.TotalItems > 0);
+        //}
 
-        [TestMethod]
-        public void User_Returns_Badge_Counts()
-        {
-            var user = Client.GetUser(22656);
+        //[TestMethod]
+        //public void User_Returns_Badge_Counts()
+        //{
+        //    var user = Client.GetUser(22656);
 
-            Assert.IsNotNull(user);
-            Assert.IsNotNull(user.BadgeCounts);
-            Assert.IsTrue(user.BadgeCounts.Bronze > 0);
-        }
+        //    Assert.IsNotNull(user);
+        //    Assert.IsNotNull(user.BadgeCounts);
+        //    Assert.IsTrue(user.BadgeCounts.Bronze > 0);
+        //}
 
         [TestMethod]
         public void GetModerators()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.