def get_trade_offer(self, trade_offer_id: str, merge: bool = True) -> dict: params = {'key': self._api_key, 'tradeofferid': trade_offer_id, 'language': 'english'} response = self.api_call('GET', 'IEconService', 'GetTradeOffer', 'v1', params).json() if merge and "descriptions" in response['response']: descriptions = {get_description_key(offer): offer for offer in response['response']['descriptions']} offer = response['response']['offer'] response['response']['offer'] = merge_items_with_descriptions_from_offer(offer, descriptions) return response
def get_trade_offer(self, trade_offer_id: str, merge: bool = True) -> dict: params = {'key': self._api_key, 'tradeofferid': trade_offer_id, 'language': 'english'} response = self.api_call('GET', 'IEconService', 'GetTradeOffer', 'v1', params).json() if merge and "descriptions" in response['response']: descriptions = {get_description_key(offer): offer for offer in response['response']['descriptions']} offer = response['response']['offer'] response['response']['offer'] = merge_items_with_descriptions_from_offer(offer, descriptions) return response