def get_trade_offers(self, merge: bool = True, get_sent_offers=1, get_received_offers=1, get_descriptions=1, active_only=0, historical_only=0, language="english", time_historical_cutoff="") -> dict: params = { 'key': self._api_key, 'get_sent_offers': get_sent_offers, 'get_received_offers': get_received_offers, 'get_descriptions': get_descriptions, 'language': language, 'active_only': active_only, 'historical_only': historical_only, 'time_historical_cutoff': time_historical_cutoff } response = self.api_call('GET', 'IEconService', 'GetTradeOffers', 'v1', params) response.raise_for_status() response = response.json() # response = self._filter_non_active_offers(response) if merge: response = merge_items_with_descriptions_from_offers(response) return response
def get_trade_offers(self, merge: bool = True) -> dict: params = {'key': self._api_key, 'get_sent_offers': 1, 'get_received_offers': 1, 'get_descriptions': 1, 'language': 'english', 'active_only': 1, 'historical_only': 0, 'time_historical_cutoff': ''} response = self.api_call('GET', 'IEconService', 'GetTradeOffers', 'v1', params).json() response = self._filter_non_active_offers(response) if merge: response = merge_items_with_descriptions_from_offers(response) return response