diff --git a/setup.py b/setup.py index e526ddb..654d665 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='tableau_tools', - version='4.9.2', + version='4.9.3', packages=['tableau_tools', 'tableau_tools.tableau_rest_api', 'tableau_tools.tableau_documents', 'tableau_tools.examples'], url='https://github.com/bryantbhowell/tableau_tools', license='', diff --git a/tableau_rest_api/tableau_rest_api_connection.py b/tableau_rest_api/tableau_rest_api_connection.py index d9e7531..6136f20 100644 --- a/tableau_rest_api/tableau_rest_api_connection.py +++ b/tableau_rest_api/tableau_rest_api_connection.py @@ -279,6 +279,24 @@ def signin(self, user_luid_to_impersonate=None): self._request_obj.xml_request = None self.end_log_block() + def swap_token(self, site_luid, user_luid, token): + """ + :type token: unicode + :type site_luid: unicode + :type user_luid: unicode + :return: + """ + self.start_log_block() + self.token = token + self.site_luid = site_luid + self.user_luid = user_luid + if self._request_obj is None: + self._request_obj = RestXmlRequest(None, self.token, self.logger, ns_map_url=self.ns_map['t'], + verify_ssl_cert=self.verify_ssl_cert) + else: + self._request_obj.token = self.token + self.end_log_block() + def signout(self, session_token=None): """ :type session_token: unicode