Как сделать что бы этот код отправлял трейд в стиме не на один предмет, а к примеру на 10 предметов?
from steampy.client import SteamClient, Asset
from steampy.utils import GameOptions, get_key_value_from_url, account_id_to_steam_id
from config import myapi, username, password
def find_item_in_inventory(item_hash_name, items):
for item in items.values():
market_hash_name = item['market_hash_name']
if market_hash_name != item_hash_name:
continue
return {
'market_hash_name': market_hash_name,
'id': item['id']
}
def make_trade_item(give_item, get_item, trade_link):
game = GameOptions.TF2
my_items = steam_client.get_my_inventory(game)
my_item_give = find_item_in_inventory(give_item, my_items)
my_asset = [Asset(my_item_give['id'], game)]
partner_account_id = get_key_value_from_url(trade_link, 'partner', True)
partner_steam_id = account_id_to_steam_id(partner_account_id)
partner_items = steam_client.get_partner_inventory(partner_steam_id, game)
partner_item_give = find_item_in_inventory(get_item, partner_items)
partner_asset = [Asset(partner_item_give['id'], game)]
steam_client.make_offer_with_url(my_asset, partner_asset, trade_link)
steam_client = SteamClient("api key")
steam_client.login("username", "password", "steam_guard.json")
trade_link = 'trade_url'
make_trade_item('Refined Metal', 'Refined Metal', trade_link)