Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
set default "item_name" values to an empty string ("")
having them at a random item name causes confusion for users
  • Loading branch information
Epicalert committed Dec 29, 2019
commit 23ff810bd09329bc9b9ee4e5197ed537b6dbbca3
6 changes: 3 additions & 3 deletions BackpackTF/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def deleteListing(self, listing_id=0):
# returns int: 0 or 1, states the success of the listing
#

def createListing(self, intent=0, id=0, quality=6, item_name="Haunted Hat", craftable=1, priceindex=0, offers=0, buyout=1, promoted=0, details="", currencies={"metal": 0}, account_token=""):
def createListing(self, intent=0, id=0, quality=6, item_name="", craftable=1, priceindex=0, offers=0, buyout=1, promoted=0, details="", currencies={"metal": 0}, account_token=""):
from requests_oauthlib import OAuth2Session
from oauthlib.oauth2 import BackendApplicationClient
from oauthlib.oauth2 import TokenExpiredError
Expand Down Expand Up @@ -168,7 +168,7 @@ def createListing(self, intent=0, id=0, quality=6, item_name="Haunted Hat", craf
# sheen - 0-7, in order team shine, deadly daffodil, manndarin, mean green, agonizing emerald, villainous violet, hot rod
# killstreaker - the id of the killstreaker
#
def search_Classifieds(self, intent="dual", page_size=10, fold=1, item_name="Soda Popper", steamid="", tradable="", craftable="", australium="", wear_tier="", quality="",
def search_Classifieds(self, intent="dual", page_size=10, fold=1, item_name="", steamid="", tradable="", craftable="", australium="", wear_tier="", quality="",
paint="", particle="", killstreak_tier="", sheen="", killstreaker="", page=0, texture_name=""):
import requests
import urllib.parse
Expand Down Expand Up @@ -239,4 +239,4 @@ def extract_trade_url(self, listingJSON, proxy=None):
url = tree.xpath("//li[@id='listing-" + listingJSON['id'] + "']/div[@class='listing-item']/div")[0].get('data-listing_offers_url')
return url
except:
raise IndexError('List index out of range')
raise IndexError('List index out of range')
4 changes: 2 additions & 2 deletions BackpackTF/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getCurrencies(self):
# here's a link to an item http://prntscr.com/pf2s0h
#

def priceHistory(self, name="Pyromancer's Mask", quality="Unique", craftable=1, tradable=1, priceIndex=0):
def priceHistory(self, name="", quality="Unique", craftable=1, tradable=1, priceIndex=0):
import requests
import urllib.parse
import json
Expand Down Expand Up @@ -81,7 +81,7 @@ def priceHistory(self, name="Pyromancer's Mask", quality="Unique", craftable=1,
# PriceIndex - Not really sure to be honest
#

def itemPrice(self, name="Pyromancer's Mask", quality="Unique", craftable=1, tradable=1, priceIndex=0):
def itemPrice(self, name="", quality="Unique", craftable=1, tradable=1, priceIndex=0):
import requests
import urllib.parse
import json
Expand Down