public virtual void GetUserReputation(IEnumerable <int> userIds, Action <IPagedList <Reputation> > onSuccess, Action <ApiException> onError, ReputationOptions options) { MakeRequest <ReputationResponse>("users", new string[] { userIds.Vectorize(), "reputation" }, 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 <Reputation>(items.Reputation, items)), onError); }
public virtual IPagedList<Reputation> GetUserReputation(IEnumerable<int> userIds, ReputationOptions options) { var response = MakeRequest<ReputationResponse>("users", new string[] { userIds.Vectorize(), "reputation" }, 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<Reputation>(response.Reputation, response); }
public virtual void GetUserReputation(int userId, Action <IPagedList <Reputation> > onSuccess, Action <ApiException> onError, ReputationOptions options) { GetUserReputation(new int[] { userId }, onSuccess, onError, options); }
public virtual IPagedList<Reputation> GetUserReputation(int userId, ReputationOptions options) { return GetUserReputation(userId.ToArray(), options); }