Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public virtual void GetUserReputation(int userId, Action <IPagedList <Reputation> > onSuccess, Action <ApiException> onError, ReputationOptions options)
 {
     GetUserReputation(new int[] { userId }, onSuccess, onError, options);
 }
Exemplo n.º 4
0
 public virtual IPagedList<Reputation> GetUserReputation(int userId, ReputationOptions options)
 {
     return GetUserReputation(userId.ToArray(), options);
 }