Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public virtual IEnumerable<PostEvent> GetQuestionTimeline(int questionId, QuestionTimelineOptions options)
 {
     return GetQuestionTimeline(questionId.ToArray(), options);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public virtual void GetQuestionTimeline(int questionId, Action <IPagedList <PostEvent> > onSuccess, Action <ApiException> onError, QuestionTimelineOptions options)
 {
     GetQuestionTimeline(questionId.ToArray(), onSuccess, onError, options);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 6
0
 public virtual void GetQuestionTimeline(int questionId, Action<IPagedList<PostEvent>> onSuccess, Action<ApiException> onError, QuestionTimelineOptions options)
 {
     GetQuestionTimeline(questionId.ToArray(), onSuccess, onError, options);
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 8
0
 public virtual IEnumerable <PostEvent> GetQuestionTimeline(int questionId, QuestionTimelineOptions options)
 {
     return(GetQuestionTimeline(questionId.ToArray(), options));
 }