Beispiel #1
0
        public async Task <byte[]> PerformRequestAsync()
        {
            AddAnonymousHeader("https://www.easports.com/de/fifa/ultimate-team/web-app/");

            return(await HttpClient
                   .GetByteArrayAsync(string.Format(Resources.PlayerImage, _auctionInfo.CalculateBaseId()))
                   .ConfigureAwait(false));
        }
Beispiel #2
0
        public async Task <byte[]> PerformRequestAsync()
        {
            AddUserAgent();
            AddAcceptHeader("*/*");
            AddReferrerHeader(Resources.BaseShowoff);
            AddAcceptEncodingHeader();
            AddAcceptLanguageHeader();

            return(await HttpClient
                   .GetByteArrayAsync(string.Format(Resources.PlayerImage, _auctionInfo.CalculateBaseId()))
                   .ConfigureAwait(false));
        }
        public async Task <byte[]> PerformRequestAsync()
        {
            if (AppVersion == AppVersion.WebApp)
            {
                AddAnonymousHeader();
            }
            else
            {
                AddAnonymousMobileHeader();
            }

            return(await HttpClient
                   .GetByteArrayAsync(string.Format(Resources.PlayerImage, _auctionInfo.CalculateBaseId()))
                   .ConfigureAwait(false));
        }
        public async Task <Item> PerformRequestAsync()
        {
            AddUserAgent();
            AddAcceptHeader("*/*");
            AddReferrerHeader(Resources.BaseShowoff);
            AddAcceptEncodingHeader();
            AddAcceptLanguageHeader();
            var itemResponseMessage = await HttpClient
                                      .GetAsync(string.Format(Resources.Item, _auctionInfo.CalculateBaseId()))
                                      .ConfigureAwait(false);

            var itemWrapper = await Deserialize <ItemWrapper>(itemResponseMessage);

            return(itemWrapper.Item);
        }
Beispiel #5
0
        public Task <Item> GetItemAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            return(_requestFactories.ItemRequestFactory(auctionInfo.CalculateBaseId()).PerformRequestAsync());
        }