示例#1
0
        public Task <IReadOnlyList <Deal> > GetAllForUserId(long userId, DealFilters filters)
        {
            Ensure.ArgumentNotNull(filters, nameof(filters));

            var parameters = filters.Parameters;

            parameters.Add("user_id", userId.ToString());
            var options = new ApiOptions
            {
                StartPage = filters.StartPage,
                PageCount = filters.PageCount,
                PageSize  = filters.PageSize
            };

            return(ApiConnection.GetAll <Deal>(ApiUrls.Deals(), parameters, options));
        }
示例#2
0
        public Task <IReadOnlyList <Deal> > GetAllForCurrent(DealFilters filters)
        {
            Ensure.ArgumentNotNull(filters, nameof(filters));

            var parameters = filters.Parameters;

            parameters.Add("owned_by_you", "1");
            var options = new ApiOptions
            {
                StartPage = filters.StartPage,
                PageCount = filters.PageCount,
                PageSize  = filters.PageSize
            };

            return(ApiConnection.GetAll <Deal>(ApiUrls.Deals(), parameters, options));
        }