Repository navigation
Expand file tree
/
Copy pathpubnub_dev_console.html
More file actions
102 lines (88 loc) · 2.88 KB
/
Copy pathpubnub_dev_console.html
File metadata and controls
102 lines (88 loc) · 2.88 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<html>
<head>
<script src=../pubnub.js></script>
<script src=../pubnub-crypto.min.js></script>
<script src=./pubnub_dev_console.js></script>
<style>
#currentAuthKey {
color: blue;
}
button {
margin-bottom: 5px;
margin-top: 10px;
}
code {
display: block;
margin-bottom: 20px;
}
div.inline {
float: left;
margin-right: 100px;
}
.clear {
clear: both;
}
</style>
</head>
<body>
<p>
<h2>Please open Developer Tools->Console and click around below to begin</h2>
</p>
<p>
<h3>Init Methods</h3>
Init with demo keys:
<button onclick='dev_console.init("pubsub.pubnub.com","demo","demo","demo","myAuthKey", false)'>Init</button>
<code>dev_console.init("pubsub.pubnub.com","demo","demo","demo","myAuthKey", false)</code>
Init with PAM-enabled domain:
<button onclick='dev_console.init("pam-beta.pubnub.com")'>Init</button>
<code>dev_console.init("pam-beta.pubnub.com")</code>
Init with test PAM-enabled domain and default keys:
<button onclick='dev_console.init("pam-beta.pubnub.com","pub-c-c077418d-f83c-4860-b213-2f6c77bde29a","sub-c-e8839098-f568-11e2-a11a-02ee2ddab7fe","sec-c-OGU3Y2Q4ZWUtNDQwMC00NTI1LThjNWYtNWJmY2M4OGIwNjEy","myAuthKey", true)'>
Init
</button>
<code>dev_console.init("pam-beta.pubnub.com","pub-c-a2650a22-deb1-44f5-aa87-15170494d5","sub-c-a478dd2a-c33d-11e2-883f-02ee2ddab7fe","sec-c-YjFmNzYzMGMtYmI3NC00NzJkLTlkYzYtY2MwMzI4YTJhNDVh","myAuthKey",
true)</code>
<h2>Output</h2>
<button onclick='clearOutputs()'>Clear</button>
<h3>Successful Response</h3>
<div id="output">You'll find your JSON output here!</div>
<h3>Error Response</h3>
<div id="error">You'll find your default error callback output here!</div>
<div class="clear"></div>
<h2>Operations</h2>
<div class="inline">
Subscribe:
<button onclick="dev_console.input(1)">dev_console.input(1)</button>
<p/>
Publish:
<button onclick="dev_console.input(2)">dev_console.input(2)</button>
<p/>
History:
<button onclick="dev_console.input(3)">dev_console.input(3)</button>
<p/>
Here Now:
<button onclick="dev_console.input(4)">dev_console.input(4)</button>
<p/>
Unsubscribe:
<button onclick="dev_console.input(5)">dev_console.input(5)</button>
<p/>
Time:
<button onclick="dev_console.input(6)">dev_console.input(6)</button>
<p/>
</div>
<div class="inline">
Set auth key:
<button onclick="dev_console.input(7)">dev_console.input(7)</button>
<div id="currentAuthKey"></div>
<p/>
PAM Grant:
<button onclick="dev_console.input(8)">dev_console.input(8)</button>
<p/>
PAM Revoke:
<button onclick="dev_console.input(9)">dev_console.input(9)</button>
</p>
PAM Audit:
<button onclick="dev_console.input(10)">dev_console.input(10)</button>
</div>
</body>
</html>