public virtual void GetCommentsByPost(IEnumerable<int> postIds, Action<IPagedList<Comment>> onSuccess, Action<ApiException> onError, CommentsByPostOptions options) { MakeRequest<CommentResponse>("posts", new string[] { postIds.Vectorize(), "comments" }, new { key = apiKey, page = options.Page ?? null, pagesize = options.PageSize ?? null, fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null, todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null, sort = options.SortBy.ToString().ToLower(), order = GetSortDirection(options.SortDirection), }, (items) => onSuccess(new PagedList<Comment>(items.Comments, items)), onError); }
public virtual void GetAnswerComments(IEnumerable<int> answerIds, Action<IPagedList<Comment>> onSuccess, Action<ApiException> onError, CommentsByPostOptions options) { MakeRequest<CommentResponse>("answers", new string[] { answerIds.Vectorize(), "comments" }, new { key = apiKey, page = options.Page ?? null, pagesize = options.PageSize ?? null, fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null, todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null, sort = options.SortBy.ToString().ToLower(), order = GetSortDirection(options.SortDirection), min = options.Min ?? null, max = options.Max ?? null }, response => onSuccess(new PagedList<Comment>(response.Comments, response)), onError); }
public virtual void GetAnswerComments(int answerId, Action<IPagedList<Comment>> onSuccess, Action<ApiException> onError, CommentsByPostOptions options) { GetAnswerComments(answerId.ToArray(), onSuccess, onError, options); }
public virtual void GetAnswerComments(IEnumerable <int> answerIds, Action <IPagedList <Comment> > onSuccess, Action <ApiException> onError, CommentsByPostOptions options) { MakeRequest <CommentResponse>("answers", new string[] { answerIds.Vectorize(), "comments" }, new { key = apiKey, page = options.Page ?? null, pagesize = options.PageSize ?? null, fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null, todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null, sort = options.SortBy.ToString().ToLower(), order = GetSortDirection(options.SortDirection), min = options.Min ?? null, max = options.Max ?? null }, response => onSuccess(new PagedList <Comment>(response.Comments, response)), onError); }
public virtual void GetAnswerComments(int answerId, Action <IPagedList <Comment> > onSuccess, Action <ApiException> onError, CommentsByPostOptions options) { GetAnswerComments(answerId.ToArray(), onSuccess, onError, options); }
public virtual void GetCommentsByPost(IEnumerable <int> postIds, Action <IPagedList <Comment> > onSuccess, Action <ApiException> onError, CommentsByPostOptions options) { MakeRequest <CommentResponse>("posts", new string[] { postIds.Vectorize(), "comments" }, new { key = apiKey, page = options.Page ?? null, pagesize = options.PageSize ?? null, fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null, todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null, sort = options.SortBy.ToString().ToLower(), order = GetSortDirection(options.SortDirection), }, (items) => onSuccess(new PagedList <Comment>(items.Comments, items)), onError); }
public virtual IPagedList <Comment> GetAnswerComments(int answerId, CommentsByPostOptions options) { return(GetAnswerComments(answerId.ToArray(), options)); }
public virtual IPagedList <Comment> GetCommentsByPost(IEnumerable <int> postIds, CommentsByPostOptions options) { var response = MakeRequest <CommentResponse>("posts", new string[] { postIds.Vectorize(), "comments" }, new { key = apiKey, page = options.Page ?? null, pagesize = options.PageSize ?? null, fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null, todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null, sort = options.SortBy.ToString().ToLower(), order = GetSortDirection(options.SortDirection), }); return(new PagedList <Comment>(response.Comments, response)); }
public virtual IPagedList <Comment> GetCommentsByPost(int postId, CommentsByPostOptions options) { return(GetCommentsByPost(postId.ToArray(), options)); }