Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 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);
 }
Пример #4
0
        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));
        }