-
Notifications
You must be signed in to change notification settings - Fork 1
tf2backpackpy backpack.py
parameters
- self.token
returns
None
function
Adds a self.key parameter
example
backpack = Backpack(Token=TOKEN)
backpack.get_key()
parameters
- self.key
returns
None
function
Adds a self.token parameter
example
backpack = Backpack(APIKEY)
backpack.get_token()
parameters
- self.token
- automatic - If set to "sell", marks your sell orders as automatic. If set to "all", marks all your listings as automatic.
returns
bumped - How many of your listings were autobumped.
function
Send a heartbeat to backpack.tf, updating your last online time, automatic status, and bumps your listings. Your bot experience must not diverge from what backpack.tf Automatic provides. You must check for SteamRep and backpack.tf All Features bans, you must not decline valid offers, and you must be able to handle multiple items per offer. Treating items you are buying as currency is optional.
example
backpack = Backpack(Token=TOKEN)
print('Bumped {} items'.format(backpack.beat('all' or 'sell')))
parameters
- self.token
returns
Subscriptions dictionary
function
View your price subscriptions.
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.subscriptions()
parameters
- self.token
returns
Listing subscriptions dictionary
function
View your price subscriptions.
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.subscriptions()
parameters
- self.token
- item_name ~ Name of the item
returns
subscribed - Set if the request succeeded.
function
Creates a price subscription
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.create_subscription("Ham Shank")
parameters
- self.token
- item_name ~ Name of the item
returns
unsubscribed - Set if the request succeeded.
function
Deletes a price subscription
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.delete_subscription("Ham Shank")
parameters
- self.token
returns
Subscriptions dictionary
function
Returns all listing subscriptions
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.listing_subscriptions()
parameters
- self.token item_name,intent,min,max,blanket=None,currency=None
- item_name - Fully qualified case-sensitive item name. You will receive notifications only for listings posted with this exact item name
- intent - * Either 0 (buy orders) or 1 (sell orders) to subscribe to.*
- blanket=None - If set, this subscription will be a blanket listing alert. This means you will receive notifications for all listings posted that match the specified item. Either blanket or price must be set. Please do not create blanket listings for extremely common items like keys, instead (re)create listing subscriptions with a relevant price range +/- some error should the market change radically.
- currency=None - If not using a blanket price, the currency key (e.g. metal) to be used. See IGetCurrencies.
- min (If using currency) - Low-end price. Decimal numbers are accepted (e.g. 1.33.) You will only receive notifications for items listed for [min, max].
- max (If using currency) - High-end price. Decimal numbers are accepted (e.g. 1.33.)
returns
subscribed - Set if the request succeeded.
function
Creates a listing subscription
example
backpack = Backpack(APIKEY)
backpack.get_token()
sub_dict = backpack.create_listing_subscription("Ham Shank",1,1)