Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions intralinks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ def download_splash_image(self, exchange, path_without_extension):

return intralinks.functions.v1.splashes.download_splash_image(self.api_client, exchange_id, path_without_extension)

def enter_exchange(self, exchange, accept_splash=None):
def enter_exchange(self, exchange, accept_splash=None, one_time_password=None):
exchange_id = self._get_id(exchange)

if self.api_client.is_v1() or self.use_v1:
return intralinks.functions.v1.splashes.enter_exchange(self.api_client, exchange_id, accept_splash=accept_splash)
return intralinks.functions.v1.splashes.enter_exchange(self.api_client, exchange_id, accept_splash=accept_splash, one_time_password=one_time_password)
else:
return intralinks.functions.v2.splashes.enter_exchange(self.api_client, exchange_id, accept_splash=accept_splash)
return intralinks.functions.v2.splashes.enter_exchange(self.api_client, exchange_id, accept_splash=accept_splash, one_time_password=one_time_password)

###########################################################################################################
# Folders
Expand Down
9 changes: 7 additions & 2 deletions intralinks/functions/v1/splashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ def get_splash(api_client, exchange_id):

return data

def enter_exchange(api_client, exchange_id, accept_splash=None):
def enter_exchange(api_client, exchange_id, accept_splash=None, one_time_password=False):
if one_time_password:
enter_content = {'xml':to_xml({'acceptSplash':accept_splash, 'oneTimePassword':one_time_password }, 'workspaceEntryRequest')}
else:
enter_content = {'xml':to_xml({'acceptSplash':accept_splash}, 'workspaceEntryRequest')}

response = api_client.create(
'/services/workspaces/entry',
params={
'workspaceId':exchange_id
},
data={'xml':to_xml({'acceptSplash':accept_splash}, 'workspaceEntryRequest')},
data=enter_content,
api_version=1
)

Expand Down
10 changes: 8 additions & 2 deletions intralinks/functions/v2/splashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ def get_splash(api_client, exchange_id):

return get_node_as_item(data, 'splash')

def enter_exchange(api_client, exchange_id, accept_splash=False):
def enter_exchange(api_client, exchange_id, accept_splash=False, one_time_password=False):

enter_content = {'acceptSplash': accept_splash}

if one_time_password:
enter_content['oneTimePassword'] = one_time_password

response = api_client.create(
'/v2/workspaces/{}/splash'.format(exchange_id),
data=json.dumps({'acceptSplash': accept_splash}),
data=json.dumps(enter_content),
headers={'Content-Type': 'application/json'},
api_version=2
)
Expand Down