/
index.html
52 lines (51 loc) · 2.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head>
<title>Marketing Cloud Javascript SDK</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="wsse.js"></script>
<script type="text/javascript" src="marketing_cloud.js"></script>
</head>
<body>
<h1>Call the Marketing Cloud APIs</h1>
<form id="api-call-form">
<table>
<tr>
<td><label>Username</label></td><td><input type="text" size="50" id="username"/><td><td><a href="https://sc.omniture.com/p/suite/1.3/index.html?a=User.GetAccountInfo" target="_blank">where is this?</a></td>
</tr>
<tr>
<td><label>Secret</label></td><td><input type="text" size="50" id="secret"/></td>
</tr>
<tr>
<td><label>Method</label></td><td><input type="text" value="Company.GetReportSuites" size="50" id="method"/></td>
</tr>
<tr>
<td><label>Endpoint</label>
<td>
<select id="endpoint">
<option value="api.omniture.com" selected>San Jose</option>
<option value="api2.omniture.com">Dallas</option>
<option value="api3.omniture.com">London</option>
<option value="api4.omniture.com">Singapore</option>
</select>
</td>
</tr>
<tr>
<td><input type="submit" /></td>
</tr>
</table>
</form>
<div id="api-response"> </div>
<script type="text/javascript">
$(document).ready(function() {
$('#api-call-form').submit(function(e) {
$('#api-response').html('calling...');
MarketingCloud.makeRequest($('#username').val(), $('#secret').val(), $('#method').val(), {}, $('#endpoint').val(), function(e) {
$('#api-response').html(e.responseText)
});
return false;
});
});
</script>
</body>
</html>
<form>