/// <summary> /// Uses the current accound information and tries to validate them at trakt. /// </summary> public void TestAccount() { try { TraktResponse result = TraktAPI.TestAccount(new TraktAccount { Username = Username, Password = Password }); if (!string.IsNullOrWhiteSpace(result.Error)) { TestStatus = result.Error; } else if (!string.IsNullOrWhiteSpace(result.Message)) { TestStatus = result.Message; } else { TestStatus = string.Empty; } BuildBannerUrls(); } catch (Exception ex) { TestStatus = "Error"; ServiceRegistration.Get <ILogger>().Error("Trakt.tv: Exception while testing account.", ex); } }
public bool TestCredentials(string username, string password) { var data = new TraktAccountTestData() { UserName = username, Password = HashPassword(password) }; var resp = TraktAPI.TestAccount(data); return(resp.Status == "success"); }