Exemple #1
0
        public virtual async Task <IEnumerable <Collect> > ListAsync(CollectFilter options = null)
        {
            var req = PrepareRequest("collects.json");

            if (options != null)
            {
                req.QueryParams.AddRange(options.ToParameters());
            }

            return(await ExecuteRequestAsync <List <Collect> >(req, HttpMethod.Get, rootElement : "collects"));
        }
Exemple #2
0
        /// <summary>
        /// Gets a count of all of the collects (product-collection mappings).
        /// </summary>
        /// <returns>The count of all collects for the shop.</returns>
        public virtual async Task <int> CountAsync(CollectFilter filter = null)
        {
            var req = PrepareRequest("collects/count.json");

            if (filter != null)
            {
                req.QueryParams.AddRange(filter.ToParameters());
            }

            return(await ExecuteRequestAsync <int>(req, HttpMethod.Get, rootElement : "count"));
        }