davidteather / BackpackTf-API

Unoffical Backpack.tf wrapper in python
https://davidteather.github.io/BackpackTf-API/
MIT License
14 stars 7 forks source link

search_classifieds attribute #15

Closed SanyGGame closed 3 years ago

SanyGGame commented 3 years ago
import requests
import json
from BackpackTF import Currency
api = Currency(apikey="myapi")

key = api.search_classifieds(intent="Sell", page_size=1, page=0, fold=0, item_name="Mann Co. Supply Crate Key", tradable=1, craftable=1, australium=0, quality="Unique")
print(key)

Im getting an error: AttributeError: 'Currency' object has no attribute 'search_classifieds'

I'm new to programming so don't blame me please if this mistake is obvious

davidteather commented 3 years ago

Hi, the search_classifieds method is only available on the Account class.

from BackpackTF import Account
account_api = Account(client_id, client_secret, api_key)
account_api.search_classifieds()