示例#1
0
 public virtual void GetUserTimeline(int userId, Action <IPagedList <UserEvent> > onSuccess, Action <ApiException> onError, UserTimelineOptions options)
 {
     GetUserTimeline(new int[] { userId }, onSuccess, onError, options);
 }
示例#2
0
 public virtual IPagedList<UserEvent> GetUserTimeline(IEnumerable<int> userIds, UserTimelineOptions options)
 {
     var response = MakeRequest<UserEventResponse>("users", new string[] { userIds.Vectorize(), "timeline" }, new
     {
         key = apiKey,
         fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null,
         todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null,
         page = options.Page ?? null,
         pagesize = options.PageSize ?? null
     });
     return new PagedList<UserEvent>(response.Events, response);
 }
示例#3
0
 public virtual void GetUserTimeline(IEnumerable <int> userIds, Action <IPagedList <UserEvent> > onSuccess, Action <ApiException> onError, UserTimelineOptions options)
 {
     MakeRequest <UserEventResponse>("users", new string[] { userIds.Vectorize(), "timeline" }, new
     {
         key      = apiKey,
         fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null,
         todate   = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null,
         page     = options.Page ?? null,
         pagesize = options.PageSize ?? null
     }, (items) => onSuccess(new PagedList <UserEvent>(items.Events, items)), onError);
 }
示例#4
0
 public virtual IPagedList<UserEvent> GetUserTimeline(int userId, UserTimelineOptions options)
 {
     return GetUserTimeline(userId.ToArray(), options);
 }