public static bool IsUserCorrect(AmazonUserInfo userInfo) { var rater = new AmazonRateInfo(); var sellerId = userInfo.MerchantId; var task = rater.GetRating(rater.GetSellerPage(sellerId)); try { var raiting = task.Result; return(true); } catch (AggregateException) { return(false); } }
public static AmazonUserRatingInfo GetUserRatingInfo(AmazonUserInfo userInfo) { var rater = new AmazonRateInfo(); string seller = userInfo.MerchantId; var sellerPage = rater.GetSellerPage(seller); var rate = rater.GetRating(sellerPage); var name = rater.GetName(sellerPage); var feedbackHistory = rater.FeedbackHistory(sellerPage); var info = new AmazonUserRatingInfo { Rating = rate.Result, FeedbackHistory = feedbackHistory.Result, Name = name.Result, SubmittedDate = DateTime.UtcNow, }; info.IncrementRequests("GetUserRating", "from WEB"); return(info); }