Base class for colors in Hsv or Rgb The important method is ToString() on Object, which is used to put it into Urls
Ejemplo n.º 1
0
        /// <summary>
        /// Search for listings by keywords and average color of primary image.
        /// </summary>
        /// <param name="keywords">Specify keywords to search on, separated by spaces or semicolons. You can also use the operators AND and NOT to control keyword matching.</param>
        /// <param name="color">Specify an HSV color</param>
        /// <param name="wiggle">Specify the degree of tolerance for color matching; where 0 is the most accurate, and 15 is the least.</param>
        /// <param name="offset">To page through large result sets</param>
        /// <param name="limit">Specify the number of results to return</param>
        /// <param name="detailLevel">control how much information to return</param>
        /// <returns>the async state of the request</returns>
        public IAsyncResult GetListingsByColorAndKeywords(IEnumerable<string> keywords, EtsyColor color, int wiggle, int offset, int limit, DetailLevel detailLevel)
        {
            if (!ServiceHelper.TestCallPrerequisites(this, this.GetListingsByColorAndKeywordsCompleted, this.etsyContext))
            {
                return null;
            }

            if (!this.TestWiggle(wiggle, this.GetListingsByColorAndKeywordsCompleted))
            {
                return null;
            }

            UriBuilder uriBuilder = UriBuilder.Start(this.etsyContext, "listings/color", color)
                .Append("/keywords/").Append(keywords)
                .Param("wiggle", wiggle)
                .OffsetLimit(offset, limit)
                .DetailLevel(detailLevel);

            return ServiceHelper.GenerateRequest(this, uriBuilder.Result(), this.GetListingsByColorAndKeywordsCompleted);
        }
 /// <summary>
 /// Search for listings by keywords and average color of primary image.
 /// </summary>
 /// <param name="keywords">Specify keywords to search on, separated by spaces or semicolons. You can also use the operators AND and NOT to control keyword matching.</param>
 /// <param name="color">Specify an HSV color</param>
 /// <param name="wiggle">Specify the degree of tolerance for color matching; where 0 is the most accurate, and 15 is the least.</param>
 /// <param name="offset">To page through large result sets</param>
 /// <param name="limit">Specify the number of results to return</param>
 /// <param name="detailLevel">control how much information to return</param>
 /// <returns>the async state of the request</returns>
 public IAsyncResult GetListingsByColorAndKeywords(IEnumerable<string> keywords, EtsyColor color, int wiggle, int offset, int limit, DetailLevel detailLevel)
 {
     return this.wrappedService.GetListingsByColorAndKeywords(keywords, color, wiggle, offset, limit, detailLevel);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Start the Uri with the base uri and a path under that
        /// </summary>
        /// <param name="etsyContext">the etsy context</param>
        /// <param name="basePath">the path on the base uri</param>
        /// <param name="color">the color to append</param>
        /// <returns>the Uri builder</returns>
        public static UriBuilder Start(EtsyContext etsyContext, string basePath, EtsyColor color)
        {
            if (color == null)
            {
                return Start(etsyContext, basePath);
            }

            return Start(etsyContext, basePath, color.ToString());
        }
 /// <summary>
 /// Search for listings by average color of primary image.
 /// </summary>
 /// <param name="color">The average color of primary image</param>
 /// <param name="wiggle">Specify the degree of tolerance for color matching; where 0 is the most accurate, and 15 is the leas</param>
 /// <param name="offset">To page through large result sets</param>
 /// <param name="limit">Specify the number of results to return</param>
 /// <param name="detailLevel">control how much information to return</param>
 /// <returns>the async state of the request</returns>
 public IAsyncResult GetListingsByColor(EtsyColor color, int wiggle, int offset, int limit, DetailLevel detailLevel)
 {
     return this.wrappedService.GetListingsByColor(color, wiggle, offset, limit, detailLevel);
 }