예제 #1
0
        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);
        }
예제 #2
0
        public OpenDota(string apiKey = null, IWebProxy proxy = null)
        {
            _request       = new RequestHandler(apiKey, proxy);
            _jsonFormatter = new JsonFormatter(_request);

            Matches       = new MatchesEndpoint(_jsonFormatter);
            PlayersByRank = new PlayersByRankEndpoint(_jsonFormatter);
            Players       = new PlayersEndpoint(_jsonFormatter, _request);
            ProPlayers    = new ProPlayersEndpoint(_jsonFormatter);
            ProMatches    = new ProMatchesEndpoint(_jsonFormatter);
            PublicMatches = new PublicMatchesEndpoint(_jsonFormatter);
            ParsedMatches = new ParsedMatchesEndpoint(_jsonFormatter);
            Metadata      = new MetadataEndpoint(_jsonFormatter);
            Distributions = new DistributionsEndpoint(_jsonFormatter);
            Search        = new SearchEndpoint(_jsonFormatter);
            Rankings      = new RankingsEndpoint(_jsonFormatter);
            Benchmarks    = new BenchmarksEndpoint(_jsonFormatter);
            Status        = new StatusEndpoint(_jsonFormatter);
            Health        = new HealthEndpoint(_jsonFormatter);
            Request       = new RequestEndpoint(_jsonFormatter, _request);
            FindMatches   = new FindMatchesEndpoint(_jsonFormatter);
            Heroes        = new HeroesEndpoint(_jsonFormatter);
            HeroStats     = new HeroStatsEndpoint(_jsonFormatter);
            Leagues       = new LeaguesEndpoint(_jsonFormatter);
            Teams         = new TeamsEndpoint(_jsonFormatter);
            Replays       = new ReplaysEndpoint(_jsonFormatter);
            Records       = new RecordsEndpoint(_jsonFormatter);
            Live          = new LiveEndpoint(_jsonFormatter);
            Scenarios     = new ScenariosEndpoint(_jsonFormatter);
            Schema        = new SchemaEndpoint(_jsonFormatter);
            Constants     = new ConstantsEndpoint(_request);
        }