Пример #1
0
 public virtual IPagedList<PostEvent> GetQuestionTimeline(IEnumerable<int> questionIds, QuestionTimelineOptions options)
 {
     var response = MakeRequest<QuestionTimelineResponse>("questions", new string[] { questionIds.Vectorize(), "timeline" }, 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
     });
     return new PagedList<PostEvent>(response.Events, response);
 }
Пример #2
0
 public virtual IEnumerable<PostEvent> GetQuestionTimeline(int questionId, QuestionTimelineOptions options)
 {
     return GetQuestionTimeline(questionId.ToArray(), options);
 }
Пример #3
0
 public virtual void GetQuestionTimeline(IEnumerable <int> questionIds, Action <IPagedList <PostEvent> > onSuccess, Action <ApiException> onError, QuestionTimelineOptions options)
 {
     MakeRequest <QuestionTimelineResponse>("questions", new string[] { questionIds.Vectorize(), "timeline" }, 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
     }, (items) => onSuccess(new PagedList <PostEvent>(items.Events, items)), onError);
 }
Пример #4
0
 public virtual void GetQuestionTimeline(int questionId, Action <IPagedList <PostEvent> > onSuccess, Action <ApiException> onError, QuestionTimelineOptions options)
 {
     GetQuestionTimeline(questionId.ToArray(), onSuccess, onError, options);
 }
Пример #5
0
 public virtual void GetQuestionTimeline(IEnumerable<int> questionIds, Action<IPagedList<PostEvent>> onSuccess, Action<ApiException> onError, QuestionTimelineOptions options)
 {
     MakeRequest<QuestionTimelineResponse>("questions", new string[] { questionIds.Vectorize(), "timeline" }, 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
     }, (items) => onSuccess(new PagedList<PostEvent>(items.Events, items)), onError);
 }
Пример #6
0
 public virtual void GetQuestionTimeline(int questionId, Action<IPagedList<PostEvent>> onSuccess, Action<ApiException> onError, QuestionTimelineOptions options)
 {
     GetQuestionTimeline(questionId.ToArray(), onSuccess, onError, options);
 }
Пример #7
0
        public virtual IPagedList <PostEvent> GetQuestionTimeline(IEnumerable <int> questionIds, QuestionTimelineOptions options)
        {
            var response = MakeRequest <QuestionTimelineResponse>("questions", new string[] { questionIds.Vectorize(), "timeline" }, 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
            });

            return(new PagedList <PostEvent>(response.Events, response));
        }
Пример #8
0
 public virtual IEnumerable <PostEvent> GetQuestionTimeline(int questionId, QuestionTimelineOptions options)
 {
     return(GetQuestionTimeline(questionId.ToArray(), options));
 }