Beispiel #1
0
 /// <summary>
 /// custom set RiotGames API Key
 /// </summary>
 /// <param name="RiotApiKey"></param>
 public ApiService(string RiotApiKey)
 {
     ApiKey    = RiotApiKey;
     apiCache  = new ApiCache();
     Api       = new NonStaticApi(apiCache);
     staticApi = new StaticApi(apiCache);
     Status    = new StatusApi(apiCache);
 }
        public void GetTeamById()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            Team         data = api.GetTeam(summonerId1, Region);

            Assert.IsNotNull(data);
        }
        public void GetSummonerByName()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            Summoner     data = api.GetSummoner(summonerName1, Region);

            Assert.IsNotNull(data);
        }
        public void GetMatchDetail()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            MatchDetail  data = api.GetMatchDetail(gameId1, Region, true);

            Assert.IsNotNull(data);
        }
        public void GetMatchList()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            MatchList    data = api.GetMatchList(summonerId1, region.tr, null, null, null, null, null, null, null, true);

            Assert.IsNotNull(data);
        }
        public void GetFuturedGames()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            FuturedGames data = api.GetFuturedGames(Region);

            Assert.IsNotNull(data);
        }
        public void GetChampionMasteries()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi           api  = new NonStaticApi(new Api.Cache.ApiCache());
            List <ChampionMastery> data = api.GetChampionMasteries(summonerId1, Region);

            Assert.IsTrue(data.Count > 0);
        }
        public void GetChampionMastery()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi    api  = new NonStaticApi(new Api.Cache.ApiCache());
            ChampionMastery data = api.GetChampionMastery(summonerId1, championId1, Region);

            Assert.IsNotNull(data);
        }
        public void GetChampionRotationByChampId()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi   api  = new NonStaticApi(new Api.Cache.ApiCache());
            ChampionStatus data = api.GetChampionRotationById(region.tr, championId1);

            Assert.IsNotNull(data);
        }
        public void GetChampionRotation()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi     api  = new NonStaticApi(new Api.Cache.ApiCache());
            ChampionRotation data = api.GetChampionRotation(region.tr, true);

            Assert.IsTrue(data.Champions.Count > 0);
        }
        public void GetTeamsByIds()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            List <Team>  data = api.GetTeams(new List <long>()
            {
                summonerId1, summonerId2
            }, Region);

            Assert.IsTrue(data.Count > 0);
        }
        public void GetTeamByNames()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
            List <Team>  data = api.GetTeams(new List <string>()
            {
                teamName1, teamName2
            }, Region);

            Assert.IsTrue(data.Count > 0);
        }
        public void GetSummonerByNames()
        {
            ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
            NonStaticApi    api  = new NonStaticApi(new Api.Cache.ApiCache());
            List <Summoner> data = api.GetSummoners(new List <string>()
            {
                summonerName1, summonerName2
            }, Region);

            Assert.IsTrue(data.Count > 1);
        }
 public void GetCurrentGame()
 {
     ApiService.ApiKey = APIKEY;//you must add your project, if you dont use ninject
     NonStaticApi api  = new NonStaticApi(new Api.Cache.ApiCache());
     CurrentGame  data = api.GetCurrentGame(summonerId1, Region, true);
 }