コード例 #1
0
        public Task<AuctionResponse> PlaceBidAsync(AuctionInfo auctionInfo, uint bidAmount = 0)
        {
            auctionInfo.ThrowIfNullArgument();

            if (bidAmount == 0)
            {
                bidAmount = auctionInfo.CalculateBid();
            }

            return _requestFactories.PlaceBidRequestFactory(auctionInfo, bidAmount).PerformRequestAsync();
        }
コード例 #2
0
        public async Task<Item> GetItemAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            try
            {
                return await _requestFactories.ItemRequestFactory(auctionInfo).PerformRequestAsync();
            }
            catch (Exception e)
            {
                throw new FutException("Get item failed", e);
            }
        }
コード例 #3
0
        public async Task<AuctionResponse> PlaceBidAsync(AuctionInfo auctionInfo, uint bidAmount = 0)
        {
            auctionInfo.ThrowIfNullArgument();

            if (bidAmount == 0)
            {
                bidAmount = auctionInfo.CalculateBid();
            }

            try
            {
                return await _requestFactories.PlaceBidRequestFactory(auctionInfo, bidAmount).PerformRequestAsync();
            }
            catch (Exception e)
            {
                throw new FutException("Placing bid failed", e);
            }
        }
コード例 #4
0
        public Task<byte[]> GetPlayerImageAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            return _requestFactories.PlayerImageRequestFactory(auctionInfo).PerformRequestAsync();
        }
コード例 #5
0
        public Task<Item> GetItemAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            return _requestFactories.ItemRequestFactory(auctionInfo).PerformRequestAsync();
        }
コード例 #6
0
        public Task RemoveFromTradePileAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            return _requestFactories.RemoveFromTradePileRequestFactory(auctionInfo).PerformRequestAsync();
        }
コード例 #7
0
 public Task RemoveFromWatchlistAsync(AuctionInfo auctionInfo)
 {
     return RemoveFromWatchlistAsync(new[] { auctionInfo });
 }
コード例 #8
0
        public async Task<byte[]> GetPlayerImageAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            try
            {
                return await _requestFactories.PlayerImageRequestFactory(auctionInfo).PerformRequestAsync();
            }
            catch (Exception e)
            {
                throw new FutException("Get player image failed", e);
            }
        }
コード例 #9
0
 public Task AddToWatchlistRequestAsync(AuctionInfo auctionInfo)
 {
     return AddToWatchlistRequestAsync(new[] { auctionInfo });
 }
コード例 #10
0
        public async Task RemoveFromTradePileAsync(AuctionInfo auctionInfo)
        {
            auctionInfo.ThrowIfNullArgument();

            try
            {
                await _requestFactories.RemoveFromTradePileRequestFactory(auctionInfo).PerformRequestAsync();
            }
            catch (Exception e)
            {
                throw new FutException("Remove from trade pile failed", e);
            }
        }