예제 #1
0
        public async void UsingAsync()
        {
            LolApi p         = new LolApi();
            var    champions = await LolApi.StaticApi.StaticDatav3.GetChampionsAsync(ServicePlatform.EUW1, false, null, null,
                                                                                     new List <ChampionTag>() { ChampionTag.all }, true);

            Assert.False(champions.HasError);
        }
예제 #2
0
 public HomeController()
 {
     LolApi = ApiSettings.GetService <LolApi>();
 }
예제 #3
0
 public HomeController(LolApi _api)
 {
     LolApi = _api;
 }
예제 #4
0
파일: Form1.cs 프로젝트: fbl07/RiotAPI
        private async Task Other_ChampImage(LolApi.Common.Constants.ImageTypes type)
        {
            byte[] result;
            if (type == LolApi.Common.Constants.ImageTypes.Square)
                result = await LolApi.Test.InternalTester.RequestChampImage(type, txtFieldOne.Text);
            else
                result = await LolApi.Test.InternalTester.RequestChampImage(type, txtFieldOne.Text, Convert.ToInt32(txtFieldTwo.Text));

            MemoryStream ms = new MemoryStream(result);
            pbxImageResponse.BackgroundImage = Bitmap.FromStream(ms); 
        }