Example #1
0
def get_user_ban(steamid: str):
    '''Fetch any ban associated with the provided SteamID. Bans are only issued in instances of chargeback fraud or alt accounts of chargeback fraudsters.\n
    `steamid` - The user's SteamID64 to fetch ban status for.'''

    bans = 'https://marketplace.tf/api/Bans/GetUserBan/v1'
    params = {'steamid': steamid}
    return request(bans, params)
Example #2
0
    def get_sales(self, num: int, start_before: int):
        '''Fetch the specified number of sales your account has made. v2 now provides prices in cents, not dollars.\n
        `num` - The number of sales to fetch. Defaults to 100. Maximum of 500.\n
        `start_before` - A unix timestamp for pagination. Will return all sales that occurred before this timestamp.'''

        params = {'num': num, 'start_before': start_before, 'key': self.key}
        return request(self.sales, params)
Example #3
0
    def get_pricelist(self, src: str, cur: str) -> dict:
        '''Gets all suggested prices\n
        `src` - The source of the prices. bptf, mplc\n
        `cur` - Currency to return the prices in USD, EUR, etc.'''

        url = self.items.format('?')
        params = {'src': src, 'cur': cur.upper()}
        return request(url, params, headers, True)
Example #4
0
    def get_all_snapshot(self, empty: bool, listings: bool, sku: str) -> dict:
        '''Gets all snapshots of an item\n
        `empty` - False\n
        `listings` - True\n
        `sku` - The SKU of the item'''

        url = self.items.format(sku) + '/snapshots?'
        params = {'empty': empty, 'listings': listings}
        return request(url, params, headers, True)
Example #5
0
    def get_price_history(self, sku: str, src: str, cur: str) -> dict:
        '''Gets the history of suggested prices\n
        `src` - The source of the prices. bptf, mplc\n
        `cur` - Currency to return the prices in USD, EUR, etc.\n
        `sku` - The SKU of the item'''

        params = {'src': src, 'cur': cur.upper()}
        url = self.items.format(sku) + '/history?'
        return request(url, params, headers, True)
Example #6
0
    def get_dashboard_items(self):
        '''Fetch all items currently deposited on Marketplace that you can act upon. This does not include items that have sold, 
        are still confirming deposit, or are under review. v2 returns item prices in cents, not dollars.'''

        params = {'key': self.key}
        return request(self.dashboard, params)
Example #7
0
 def get_store_meta_data(self, language: str = 'en'):
     params['language'] = language
     return request(self.store, params)
Example #8
0
 def get_schema_url(self):
     return request(self.schema_url, params)
Example #9
0
 def get_schema(self, language: str = 'en'):
     params['language'] = language.lower()
     return request(self.schema, params)
Example #10
0
 def get_player_items(self, steamid: str):
     params['steamid'] = steamid
     return request(self.items, params)
Example #11
0
 def get_schema(self) -> dict:
     params = {'key': self.key}
     return request(self.schema, params)
Example #12
0
def get_price(name: str, cur: int = 1, appid: int = 440) -> dict:
    overview = 'https://steamcommunity.com/market/priceoverview/'
    params = {'currency': cur, 'appid': appid, 'market_hash_name': name}
    return request(overview, params)
Example #13
0
    def get_single_snapshot(self, listing_id: str) -> dict:
        '''Gets a single snapshot with listings\n
        `listing_id` - Listing id to search for (5c7c222f3857c355db65f4ee)'''

        url = self.snapshot.format(listing_id)
        return request(url, {}, headers, True)
Example #14
0
    def get_snapshot(self, sku: str) -> dict:
        '''Gets most recent snapshot of an item\n
        `sku` - The SKU of the item'''

        url = self.items.format(sku) + '/snapshot'
        return request(url, {}, headers, True)
Example #15
0
def get_bots():
    '''Fetch a list of all Marketplace.tf bot SteamIDs'''

    bots = 'https://marketplace.tf/api/Bots/GetBots/v1'
    return request(bots)
Example #16
0
 def get_spreadsheet(self) -> dict:
     '''Documentation at https://www.trade.tf/user/api/key'''
     params = {'key': self.key}
     return request(self.spreadsheet, params)
Example #17
0
    def get_schema(self) -> dict:
        '''Gets all items recorded'''

        return request(self.schema, {}, headers, True)