File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ '''
2+ The TRKD API sample code is provided for informational purposes only
3+ and without knowledge or assumptions of the end users development environment.
4+ We offer this code to provide developers practical and useful guidance while developing their own code.
5+ However, we do not offer support and troubleshooting of issues that are related to the use of this code
6+ in a particular environment; it is offered solely as sample code for guidance.
7+ Please see the Thomson Reuters Knowledge Direct product page at http://customers.thomsonreuters.com
8+ for additional information regarding the TRKD API.'''
9+
10+
111import os
212import sys
313import requests
1020password = getpass .getpass (prompt = 'Please input password: ' )
1121appid = raw_input ('Please input appid: ' )
1222
13- #username = 'trcsmnldauki@thomsonreuters.com'
14- #appid = 'rkdapi'
15- #password = 'Welcome75'
16-
1723print '############### Sending Authentication request message to TRKD ###############'
1824
1925##create authentication request URL, message and header
2733 if result .status_code == 200 :
2834 print 'Request success'
2935 print 'response status %s' % (result .status_code )
36+ ##get Token
3037 token = result .json ()['CreateServiceToken_Response_1' ]['Token' ]
3138 print 'Token: %s' % (token )
39+ ##get expiraion
3240 expire = result .json ()['CreateServiceToken_Response_1' ]['Expiration' ]
3341 print 'Exipre: %s' % (expire )
3442 elif result .status_code == 500 :
You can’t perform that action at this time.
0 commit comments