public ElwarkStorageClient(HttpClient client) { if (client is null) { throw new ArgumentNullException(nameof(client)); } _countryEndpoint = new CountryEndpoint(client); _blacklistEndpoint = new BlacklistEndpoint(client); _currencyEndpoint = new CurrencyEndpoint(client); _languageEndpoint = new LanguageEndpoint(client); _timezoneEndpoint = new TimezoneEndpoint(client); _staticEndpoint = new StaticEndpoint(client); _imageEndpoint = new ImageEndpoint(client); }
/// <summary> /// Create a R6S API instance with optional remember me option. /// </summary> /// <param name="email"> /// Email address of a Ubisoft account. /// </param> /// <param name="password"> /// Password of a Ubisoft account. /// </param> /// <param name="rememberMe"> /// Option for Ubisoft to remember this instance's session (can be changed over time by <see cref="RememberMe"/>. /// </param> public R6Api(string email, string password, bool rememberMe) { if (string.IsNullOrWhiteSpace(email)) { throw new ArgumentNullException(this.GetType().FullName, "Email address cannot be null or empty."); } else if (string.IsNullOrWhiteSpace(password)) { throw new ArgumentNullException(this.GetType().FullName, "Password cannot be null or empty."); } var _session = new SessionEndpoint(email, password, rememberMe); Profile = new ProfileEndpoint(_session); PlayerProgression = new PlayerProgressionEndpoint(_session); Player = new PlayerEndpoint(_session); Statistic = new StatisticEndpoint(_session); Static = new StaticEndpoint(); }