public virtual void GetUserMentions(IEnumerable <int> userIds, Action <IPagedList <Comment> > onSuccess, Action <ApiException> onError, UserMentionSort sortBy = UserMentionSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, DateTime?fromDate = null, DateTime?toDate = null, int?min = null, int?max = null) { MakeRequest <CommentResponse>("users", new string[] { userIds.Vectorize(), "mentioned" }, new { key = apiKey, fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null, todate = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null, page = page ?? null, pagesize = pageSize ?? null, min = min ?? null, max = max ?? null, sort = sortBy.ToString().ToLower(), order = GetSortDirection(sortDirection) }, (items) => onSuccess(new PagedList <Comment>(items.Comments, items)), onError); }
public virtual void GetUserMentions(IEnumerable<int> userIds, Action<IPagedList<Comment>> onSuccess, Action<ApiException> onError = null, UserMentionSort sortBy = UserMentionSort.Creation, SortDirection sortDirection = SortDirection.Descending, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, int? min = null, int? max = null) { MakeRequest<CommentResponse>("users", new string[] { userIds.Vectorize(), "mentioned" }, new { key = apiKey, fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null, todate = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null, page = page ?? null, pagesize = pageSize ?? null, min = min ?? null, max = max ?? null, sort = sortBy.ToString().ToLower(), order = GetSortDirection(sortDirection) }, (items) => onSuccess(new PagedList<Comment>(items.Comments, items)), onError); }
public virtual IPagedList<Comment> GetUserMentions(IEnumerable<int> userIds, UserMentionSort sortBy = UserMentionSort.Creation, SortDirection sortDirection = SortDirection.Descending, int? page = null, int? pageSize = null, DateTime? fromDate = null, DateTime? toDate = null, int? min = null, int? max = null) { var response = MakeRequest<CommentResponse>("users", new string[] { userIds.Vectorize(), "mentioned" }, new { key = apiKey, fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null, todate = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null, page = page ?? null, pagesize = pageSize ?? null, min = min ?? null, max = max ?? null, sort = sortBy.ToString().ToLower(), order = GetSortDirection(sortDirection) }); return new PagedList<Comment>(response.Comments, response); }
public virtual IPagedList <Comment> GetUserMentions(IEnumerable <int> userIds, UserMentionSort sortBy = UserMentionSort.Creation, SortDirection sortDirection = SortDirection.Descending, int?page = null, int?pageSize = null, DateTime?fromDate = null, DateTime?toDate = null, int?min = null, int?max = null) { var response = MakeRequest <CommentResponse>("users", new string[] { userIds.Vectorize(), "mentioned" }, new { key = apiKey, fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null, todate = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null, page = page ?? null, pagesize = pageSize ?? null, min = min ?? null, max = max ?? null, sort = sortBy.ToString().ToLower(), order = GetSortDirection(sortDirection) }); return(new PagedList <Comment>(response.Comments, response)); }