ValvePython / csgo

🔫 Python package for interacting with CS:GO Game Coordinator
http://csgo.readthedocs.io
124 stars 17 forks source link

request_preview_data_block usage #11

Closed yznts closed 6 years ago

yznts commented 7 years ago

Usage is not provided in docs. Example:

import csgo.features.items

Items = csgo.features.items.Items()
res = Items.request_preview_data_block(s=76561198390812765, a=11899154096, d=14908795644343063777, m=0)

Not working

rossengeorgiev commented 7 years ago

All features are automatically mixed into CSGOClient. So you just use the method from there.



cs = CSGOClient(...)
cs.request_preview_data_block(s=76561198390812765, a=11899154096, d=14908795644343063777, m=0)
yznts commented 7 years ago

image

rossengeorgiev commented 7 years ago

You have to login before you make requests.

client = SteamClient()
client.cli_login()
cs = CSGOClient(client)
cs.launch()
cs.wait_event('ready')
cs.request_preview_data_block(s=76561198390812765, a=11899154096, d=14908795644343063777, m=0)

Obviously, you need to do more if you want to make this reliable.

rossengeorgiev commented 6 years ago

Closing this due to inactivity