Exemplo n.º 1
0
 public RiotClient(string apiKey)
 {
     Summoner  = new SummonerService(apiKey);
     League    = new LeagueService(apiKey);
     Masteries = new MasteryService(apiKey);
     Specate   = new SpecateService(apiKey);
 }
Exemplo n.º 2
0
 private void Init()
 {
     Champion = new ChampionService(LeagueApiConfiguration);
     Game     = new GameService(LeagueApiConfiguration);
     League   = new LeagueService(LeagueApiConfiguration);
     Stats    = new StatsService(LeagueApiConfiguration);
     Summoner = new SummonerService(LeagueApiConfiguration);
     Team     = new TeamService(LeagueApiConfiguration);
     Static   = new StaticService(LeagueApiConfiguration);
 }
Exemplo n.º 3
0
        public RiotAPI([NotNull] string apiKey)
        {
            INetworkClient networkClient = new NetworkClient(apiKey);
            IDeserializer  deserializer  = new JsonDeserializer();

            Champions         = new ChampionService(networkClient, deserializer);
            Summoners         = new SummonerService(networkClient, deserializer);
            ChampionMasteries = new ChampionMasteryService(networkClient, deserializer);
            Leagues           = new LeagueService(networkClient, deserializer);
            Status            = new StatusService(networkClient, deserializer);
            Matches           = new MatchService(networkClient, deserializer);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get mastery pages
        /// </summary>
        private static async Task <Dictionary <long, IEnumerable <IRunePage> > > GetRunePagesAsync(
            IApiModel leagueModel,
            IEnumerable <long> summonerIds,
            RegionEnum?region = null)
        {
            if (leagueModel == null)
            {
                throw new ArgumentNullException("leagueModel");
            }

            var summonerService = new SummonerService(leagueModel.ApiConfiguration);

            return(await summonerService.GetRunePagesBySummonerIdAsync(summonerIds, region));
        }
        /// <summary>
        /// Get mastery pages
        /// </summary>
        private static async Task <IEnumerable <IMasteryPage> > GetMasteryPagesAsync(
            IApiModel leagueModel,
            long summonerId,
            RegionEnum?region = null)
        {
            if (leagueModel == null)
            {
                throw new ArgumentNullException("leagueModel");
            }

            var summonerService = new SummonerService(leagueModel.ApiConfiguration);

            return(await summonerService.GetMasteryPagesBySummonerIdAsync(summonerId, region));
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            do
            {
                Console.Clear();
                Console.Write("Enter the Summoner Name: ");
                string          summonerName    = Console.ReadLine();
                SummonerService summonerService = new SummonerService(summonerName);
                Summoner        summoner        = summonerService.GetSummonerInfo();

                summoner.ChampionMasteryList = summonerService.GetTopMasteryByPoints();

                Console.WriteLine("\n" + summoner.ToString());
                Console.Write("Select ( 1 - Search again / 2 - Close Application ): ");
            } while (int.Parse(Console.ReadLine()) == 1);
        }
Exemplo n.º 7
0
 public SummonerController()
 {
     this.service = new SummonerService();
 }
Exemplo n.º 8
0
 public SummonerController(SummonerService summonerService, ILogger <SummonerController> logger)
 {
     _summonerService = summonerService;
     _logger          = logger;
 }
Exemplo n.º 9
0
 public SummonerController(ILogger <SummonerController> logger, SummonerService summonerService)
 {
     _logger          = logger;
     _summonerService = summonerService;
 }