Apiki_Buscape_API.Apiki_Buscape_API.ViewUserRatings C# (CSharp) Method

ViewUserRatings() public method

Recupera as avaliações dos usuários sobre um determinado produto
public ViewUserRatings ( int productId, string callback ) : string
productId int Código do produto
callback string Função de retorno a ser executada caso esteja usando json
return string
        public string ViewUserRatings(int productId, string callback)
        {
            string param = string.Empty;

            if (productId != 0)
                param = "?productId=" + productId.ToString();
            else
                this.ShowErrors(string.Format("ID do produto requerido na função <b>{0}</b>.", Services.viewUserRatings));

            param += (!string.IsNullOrEmpty(callback)) ? "&callback=" + callback : string.Empty;
            param += (!string.IsNullOrEmpty(this.sourceId)) ? "&sourceId=" + this.sourceId : string.Empty;
            param += this.isJson;

            string url = string.Format("http://{0}.buscape.com/service/{1}/{2}/{3}/{4}", this.server, Services.viewUserRatings, this.applicationId, this.countryCode, param);

            return GetContent(url);
        }