public virtual void GetUserTimeline(int userId, Action <IPagedList <UserEvent> > onSuccess, Action <ApiException> onError, UserTimelineOptions options) { GetUserTimeline(new int[] { userId }, onSuccess, onError, options); }
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); }
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); }
public virtual IPagedList<UserEvent> GetUserTimeline(int userId, UserTimelineOptions options) { return GetUserTimeline(userId.ToArray(), options); }