</td>
</tr>
<tr>
	<td>End time<span class="mandatory">*</span>:</td>
	<td>
		<input type="text" name="endTime" value="<?php 
echo isset($_POST['endTime']) ? $_POST['endTime'] : substr_replace(date(DATE_ISO8601), '', -5);
?>
"/>&nbsp;
		<input type="button" onclick="document.all['endTime'].value = ''" value="Clear" />&nbsp;
		<input type="button" onclick="document.all['endTime'].value = '<?php 
echo substr_replace(date(DATE_ISO8601), '', -5);
?>
'" value="Default" />
	</td>
</tr>
<tr>
<td></td><td><input type="submit" /></td>
</tr>
</table>
<?php 
if (isset($_POST['symbol']) && isset($_POST['interval']) && isset($_POST['startTime']) && isset($_POST['endTime'])) {
    $requestor = new WebServices_TimeSeries1_GetInterdayTimeSeries2();
    $requestor->setSymbol($_POST['symbol']);
    $requestor->setInterval($_POST['interval']);
    $requestor->setStartTime($_POST['startTime']);
    $requestor->setEndTime($_POST['endTime']);
    $response = WebServices_RkdAuthSession::getInstance()->execute($requestor);
    $view = new Views_TimeSeries1_GetInterdayTimeSeries2Response($response);
    echo $view->getHTML();
}
Ejemplo n.º 2
0
</tr>
<tr>
<td>Password<span class="mandatory">*</span>:</td><td><input type="password" name="password" value="<?php 
echo isset($_POST['password']) ? $_POST['password'] : '';
?>
" /></td>
</tr>
<tr>
<td></td><td><input type="submit" /> <input type="button" value="Fast Login" onclick="document.all['fast'].value = true; submit();"/></td>
</tr>
</table>
<input type="hidden" name="fast" />
<span class="note">Note: Fast Login tries to retrieve the credentials from <i>config.php</i>. If not applicable then uses the form values from this page. This option has been added for the sake of faster debugging. Don't store your credentials in a config file unsecured in the production environment.</span>
<?php 
if (isset($_POST['fast']) && $_POST['fast'] == true) {
    $config = Config::getConfig();
    if (!empty($config['credentials']['serviceUserName'])) {
        $_POST['username'] = $config['credentials']['serviceUserName'];
    }
    if (!empty($config['credentials']['applicationId'])) {
        $_POST['applicationId'] = $config['credentials']['applicationId'];
    }
    if (!empty($config['credentials']['password'])) {
        $_POST['password'] = $config['credentials']['password'];
    }
}
if (isset($_POST['username']) && isset($_POST['applicationId']) && isset($_POST['password'])) {
    $response = WebServices_RkdAuthSession::getInstance()->createServiceToken($_POST['applicationId'], $_POST['username'], $_POST['password']);
    $view = new Views_TokenManagement1_TokenManagement1Response($response);
    echo $view->getHTML();
}
 /**
  * @see lib/Views/Views_ResponseViewAbstract::getHTML()
  */
 public function getHTML()
 {
     $config = Config::getConfig();
     $retval = '<hr/><h2>Token was created successfully:<br />' . WebServices_RkdAuthSession::getInstance()->getTokenHex() . '</h2><b>Expires (UTC)</b>:' . date(DATE_RFC822, strtotime($this->response->Expiration));
     return $retval;
 }
Ejemplo n.º 4
0
<?php

//The TRKD API sample code is provided for informational purposes only
//and without knowledge or assumptions of the end users development environment.
//We offer this code to provide developers practical and useful guidance while developing their own code.
//However, we do not offer support and troubleshooting of issues that are related to the use of this code
//in a particular environment; it is offered solely as sample code for guidance.
//Please see the Thomson Reuters Knowledge Direct product page at http://customers.thomsonreuters.com
//for additional information regarding the TRKD API.
?>
<h1>News_1/GetNewsTopics_1 Sample</h1>
<h2>There are no input parameters required for this request.<br/>Click Submit to post the request.</h2>
<input type="hidden" name="submit" value="1"><br/>
<input type="submit" />
<?php 
if (isset($_POST['submit'])) {
    $response = WebServices_RkdAuthSession::getInstance()->execute(new WebServices_News1_GetNewsTopics1());
    $view = new Views_News1_GetNewsTopics1Response($response);
    echo $view->getHTML();
}
 >Unmanaged</option>
		<option value="Reuters" <?php 
if (isset($_POST['userType']) && $_POST['userType'] == 'Reuters') {
    echo 'selected';
}
?>
 >Reuters</option>
	</select>  
</td>
</tr>
<tr>
<td></td><td><input type="submit" /> <input type="button" value="Fast Login" onclick="document.all['fast'].value = true; submit();" /></td>
</tr>
</table>
<input type="hidden" name="fast" />
<span class="note">Note: Fast Login tries to retrieve the credentials from <i>config.php</i>. If not applicable then uses the form values from this page.</span>
<?php 
if (isset($_POST['fast']) && $_POST['fast'] == true) {
    $config = Config::getConfig();
    if (!empty($config['credentials']['effectiveUserName'])) {
        $_POST['effectiveUserName'] = $config['credentials']['effectiveUserName'];
    }
    if (!empty($config['credentials']['userType'])) {
        $_POST['userType'] = $config['credentials']['userType'];
    }
}
if (isset($_POST['effectiveUserName']) && isset($_POST['userType'])) {
    $response = WebServices_RkdAuthSession::getInstance()->createImpersonationToken($_POST['effectiveUserName'], $_POST['userType']);
    $view = new Views_TokenManagement1_TokenManagement1Response($response);
    echo $view->getHTML();
}
Ejemplo n.º 6
0
<?php

//The TRKD API sample code is provided for informational purposes only
//and without knowledge or assumptions of the end users development environment.
//We offer this code to provide developers practical and useful guidance while developing their own code.
//However, we do not offer support and troubleshooting of issues that are related to the use of this code
//in a particular environment; it is offered solely as sample code for guidance.
//Please see the Thomson Reuters Knowledge Direct product page at http://customers.thomsonreuters.com
//for additional information regarding the TRKD API.
WebServices_RkdAuthSession::destroy();
echo '<h2>Token was reset successfuly.</h2><a href="index.php">&lt;&lt; Back</a>';
Ejemplo n.º 7
0
<?php

//The TRKD API sample code is provided for informational purposes only
//and without knowledge or assumptions of the end users development environment.
//We offer this code to provide developers practical and useful guidance while developing their own code.
//However, we do not offer support and troubleshooting of issues that are related to the use of this code
//in a particular environment; it is offered solely as sample code for guidance.
//Please see the Thomson Reuters Knowledge Direct product page at http://customers.thomsonreuters.com
//for additional information regarding the TRKD API.
?>
<h1>TimeSeries_1/GetTimezoneList_1 Sample</h1>
<h2>There are no input parameters required for this request.<br/>Click Submit to post the request.</h2>
<input type="hidden" name="submit" value="1"><br/>
<input type="submit" />
<?php 
if (isset($_POST['submit'])) {
    $response = WebServices_RkdAuthSession::getInstance()->execute(new WebServices_TimeSeries1_GetTimezoneList1());
    $view = new Views_TimeSeries1_GetTimezoneList1Response($response);
    echo $view->getHTML();
}
Ejemplo n.º 8
0
<?php

//The TRKD API sample code is provided for informational purposes only
//and without knowledge or assumptions of the end users development environment.
//We offer this code to provide developers practical and useful guidance while developing their own code.
//However, we do not offer support and troubleshooting of issues that are related to the use of this code
//in a particular environment; it is offered solely as sample code for guidance.
//Please see the Thomson Reuters Knowledge Direct product page at http://customers.thomsonreuters.com
//for additional information regarding the TRKD API.
?>
<h1>OnlineReports_1/GetTopics_2 Sample</h1>
<h2>There are no input parameters required for this request.<br/>Click Submit to post the request.</h2>
<input type="hidden" name="submit" value="1"><br/>
<input type="submit" />
<?php 
if (isset($_POST['submit'])) {
    $response = WebServices_RkdAuthSession::getInstance()->execute(new WebServices_OnlineReports1_GetTopics2());
    $view = new Views_OnlineReports1_GetTopics2Response($response);
    echo $view->getHTML();
}