示例#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);
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
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);
        }
示例#9
0
        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);
        }
示例#10
0
        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);
        }
示例#11
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);
        }
示例#12
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);
        }
示例#13
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);
        }
示例#14
0
 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);
 }