private OpenDotaApi(string apiKey, WebProxy proxy) { _request = new Request(apiKey, proxy); Matches = new MatchEndpoint(_request); Player = new PlayerEndpoint(_request); ProPlayers = new ProPlayerEndpoint(_request); ProMatches = new ProMatchesEndpoint(_request); PublicMatches = new PublicMatchEndpoint(_request); Metadata = new MetadataEndpoint(_request); MmrDistribution = new MmrDistributionEndpoint(_request); Search = new SearchEndpoint(_request); Ranking = new RankingEndpoint(_request); Benchmarks = new BenchmarksEndpoint(_request); Status = new StatusEndpoint(_request); Health = new HealthEndpoint(_request); Request = new RequestEndpoint(_request); FindMatch = new FindMatchEndpoint(_request); Hero = new HeroEndpoint(_request); HeroStats = new HeroStatsEndpoint(_request); League = new LeagueEndpoint(_request); Team = new TeamEndpoint(_request); Replay = new ReplayEndpoint(_request); Record = new RecordEndpoint(_request); Live = new LiveEndpoint(_request); Scenarios = new ScenariosEndpoint(_request); Schema = new SchemaEndpoint(_request); }
public SpotifyHttpClient(HttpClient httpClient) { _httpClient = httpClient; Player = new PlayerEndpoint(httpClient); Albums = new AlbumEndpoint(httpClient); Artists = new ArtistEndpoint(httpClient); Playlist = new PlaylistEndpoint(httpClient); Search = new SearchEndpoint(httpClient); }
/// <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."); } _session = new SessionEndpoint(email, password, rememberMe); Profile = new ProfileEndpoint(_session); PlayerProgression = new PlayerProgressionEndpoint(_session); Player = new PlayerEndpoint(_session); PlayersSkillRecordsEndpoint = new PlayersSkillRecordsEndpoint(_session); PlayerStatisticsEndpoint = new PlayerStatisticsEndpoint(_session); }