opentok 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +34 -113
- data/doc/reference.md +122 -0
- data/lib/open_tok/exception.rb +3 -6
- data/lib/open_tok/request.rb +2 -2
- data/lib/open_tok/version.rb +1 -1
- data/sample/sample.rb +26 -0
- data/spec/cassettes/session.yml +1 -1
- data/spec/cassettes/stitchArchive.yml +1 -1
- data/spec/opentok_spec.rb +4 -4
- metadata +19 -77
- data/doc/CHANGES.html +0 -128
- data/doc/Gemfile.html +0 -114
- data/doc/Hash.html +0 -228
- data/doc/LICENCE.html +0 -133
- data/doc/Net.html +0 -167
- data/doc/Net/HTTP.html +0 -260
- data/doc/OpenTok.html +0 -173
- data/doc/OpenTok/OpenTokException.html +0 -172
- data/doc/OpenTok/OpenTokSDK.html +0 -520
- data/doc/OpenTok/RoleConstants.html +0 -190
- data/doc/OpenTok/Session.html +0 -284
- data/doc/OpenTok/SessionPropertyConstants.html +0 -195
- data/doc/Rakefile.html +0 -111
- data/doc/created.rid +0 -13
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -100
- data/doc/js/darkfish.js +0 -116
- data/doc/js/jquery.js +0 -32
- data/doc/js/quicksearch.js +0 -114
- data/doc/js/thickbox-compressed.js +0 -10
- data/doc/lib/monkey_patches_rb.html +0 -52
- data/doc/lib/open_tok/exceptions_rb.html +0 -52
- data/doc/lib/open_tok/open_tok_sdk_rb.html +0 -64
- data/doc/lib/open_tok/session_rb.html +0 -52
- data/doc/lib/open_tok/version_rb.html +0 -52
- data/doc/lib/opentok_rb.html +0 -70
- data/doc/rdoc.css +0 -706
- data/doc/spec/opentok_spec_rb.html +0 -54
- data/doc/spec/spec_helper_rb.html +0 -54
data/doc/OpenTok.html
DELETED
@@ -1,173 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
-
|
8
|
-
<title>Module: Opentok</title>
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
-
|
12
|
-
<script src="./js/jquery.js" type="text/javascript"
|
13
|
-
charset="utf-8"></script>
|
14
|
-
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
15
|
-
charset="utf-8"></script>
|
16
|
-
<script src="./js/quicksearch.js" type="text/javascript"
|
17
|
-
charset="utf-8"></script>
|
18
|
-
<script src="./js/darkfish.js" type="text/javascript"
|
19
|
-
charset="utf-8"></script>
|
20
|
-
|
21
|
-
</head>
|
22
|
-
<body class="module">
|
23
|
-
|
24
|
-
<div id="metadata">
|
25
|
-
<div id="home-metadata">
|
26
|
-
<div id="home-section" class="section">
|
27
|
-
<h3 class="section-header">
|
28
|
-
<a href="./index.html">Home</a>
|
29
|
-
<a href="./index.html#classes">Classes</a>
|
30
|
-
<a href="./index.html#methods">Methods</a>
|
31
|
-
</h3>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="file-metadata">
|
36
|
-
<div id="file-list-section" class="section">
|
37
|
-
<h3 class="section-header">In Files</h3>
|
38
|
-
<div class="section-body">
|
39
|
-
<ul>
|
40
|
-
|
41
|
-
<li><a href="./lib/open_tok/version_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
-
class="thickbox" title="lib/open_tok/version.rb">lib/open_tok/version.rb</a></li>
|
43
|
-
|
44
|
-
</ul>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
<div id="class-metadata">
|
52
|
-
|
53
|
-
<!-- Parent Class -->
|
54
|
-
|
55
|
-
|
56
|
-
<!-- Namespace Contents -->
|
57
|
-
|
58
|
-
|
59
|
-
<!-- Method Quickref -->
|
60
|
-
|
61
|
-
|
62
|
-
<!-- Included Modules -->
|
63
|
-
|
64
|
-
</div>
|
65
|
-
|
66
|
-
<div id="project-metadata">
|
67
|
-
|
68
|
-
|
69
|
-
<div id="fileindex-section" class="section project-section">
|
70
|
-
<h3 class="section-header">Files</h3>
|
71
|
-
<ul>
|
72
|
-
|
73
|
-
<li class="file"><a href="./CHANGES.html">CHANGES</a></li>
|
74
|
-
|
75
|
-
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
76
|
-
|
77
|
-
<li class="file"><a href="./LICENCE.html">LICENCE</a></li>
|
78
|
-
|
79
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
80
|
-
|
81
|
-
</ul>
|
82
|
-
</div>
|
83
|
-
|
84
|
-
|
85
|
-
<div id="classindex-section" class="section project-section">
|
86
|
-
<h3 class="section-header">Class Index
|
87
|
-
<span class="search-toggle"><img src="./images/find.png"
|
88
|
-
height="16" width="16" alt="[+]"
|
89
|
-
title="show/hide quicksearch" /></span></h3>
|
90
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
91
|
-
<fieldset>
|
92
|
-
<legend>Quicksearch</legend>
|
93
|
-
<input type="text" name="quicksearch" value=""
|
94
|
-
class="quicksearch-field" />
|
95
|
-
</fieldset>
|
96
|
-
</form>
|
97
|
-
|
98
|
-
<ul class="link-list">
|
99
|
-
|
100
|
-
<li><a href="./OpenTok.html">OpenTok</a></li>
|
101
|
-
|
102
|
-
<li><a href="./OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
103
|
-
|
104
|
-
<li><a href="./OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
105
|
-
|
106
|
-
<li><a href="./OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
107
|
-
|
108
|
-
<li><a href="./OpenTok/Session.html">OpenTok::Session</a></li>
|
109
|
-
|
110
|
-
<li><a href="./OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
111
|
-
|
112
|
-
<li><a href="./Net.html">Net</a></li>
|
113
|
-
|
114
|
-
<li><a href="./Net/HTTP.html">Net::HTTP</a></li>
|
115
|
-
|
116
|
-
<li><a href="./Hash.html">Hash</a></li>
|
117
|
-
|
118
|
-
<li><a href="./Opentok.html">Opentok</a></li>
|
119
|
-
|
120
|
-
</ul>
|
121
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
122
|
-
</div>
|
123
|
-
|
124
|
-
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
<div id="documentation">
|
129
|
-
<h1 class="module">Opentok</h1>
|
130
|
-
|
131
|
-
<div id="description">
|
132
|
-
|
133
|
-
</div>
|
134
|
-
|
135
|
-
<!-- Constants -->
|
136
|
-
|
137
|
-
<div id="constants-list" class="section">
|
138
|
-
<h3 class="section-header">Constants</h3>
|
139
|
-
<dl>
|
140
|
-
|
141
|
-
<dt><a name="VERSION">VERSION</a></dt>
|
142
|
-
|
143
|
-
<dd class="description"></dd>
|
144
|
-
|
145
|
-
|
146
|
-
</dl>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
|
150
|
-
<!-- Attributes -->
|
151
|
-
|
152
|
-
|
153
|
-
<!-- Methods -->
|
154
|
-
|
155
|
-
|
156
|
-
</div>
|
157
|
-
|
158
|
-
|
159
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
160
|
-
|
161
|
-
<p>Disabled; run with --debug to generate this.</p>
|
162
|
-
|
163
|
-
</div>
|
164
|
-
|
165
|
-
<div id="validator-badges">
|
166
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
167
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
168
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
169
|
-
</div>
|
170
|
-
|
171
|
-
</body>
|
172
|
-
</html>
|
173
|
-
|
@@ -1,172 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
-
|
8
|
-
<title>Class: OpenTok::OpenTokException</title>
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
-
|
12
|
-
<script src="../js/jquery.js" type="text/javascript"
|
13
|
-
charset="utf-8"></script>
|
14
|
-
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
-
charset="utf-8"></script>
|
16
|
-
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
-
charset="utf-8"></script>
|
18
|
-
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
-
charset="utf-8"></script>
|
20
|
-
|
21
|
-
</head>
|
22
|
-
<body class="class">
|
23
|
-
|
24
|
-
<div id="metadata">
|
25
|
-
<div id="home-metadata">
|
26
|
-
<div id="home-section" class="section">
|
27
|
-
<h3 class="section-header">
|
28
|
-
<a href="../index.html">Home</a>
|
29
|
-
<a href="../index.html#classes">Classes</a>
|
30
|
-
<a href="../index.html#methods">Methods</a>
|
31
|
-
</h3>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="file-metadata">
|
36
|
-
<div id="file-list-section" class="section">
|
37
|
-
<h3 class="section-header">In Files</h3>
|
38
|
-
<div class="section-body">
|
39
|
-
<ul>
|
40
|
-
|
41
|
-
<li><a href="../lib/open_tok/exceptions_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
-
class="thickbox" title="lib/open_tok/exceptions.rb">lib/open_tok/exceptions.rb</a></li>
|
43
|
-
|
44
|
-
</ul>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
<div id="class-metadata">
|
52
|
-
|
53
|
-
<!-- Parent Class -->
|
54
|
-
|
55
|
-
<div id="parent-class-section" class="section">
|
56
|
-
<h3 class="section-header">Parent</h3>
|
57
|
-
|
58
|
-
<p class="link">RuntimeError</p>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
|
62
|
-
|
63
|
-
<!-- Namespace Contents -->
|
64
|
-
|
65
|
-
|
66
|
-
<!-- Method Quickref -->
|
67
|
-
|
68
|
-
|
69
|
-
<!-- Included Modules -->
|
70
|
-
|
71
|
-
</div>
|
72
|
-
|
73
|
-
<div id="project-metadata">
|
74
|
-
|
75
|
-
|
76
|
-
<div id="fileindex-section" class="section project-section">
|
77
|
-
<h3 class="section-header">Files</h3>
|
78
|
-
<ul>
|
79
|
-
|
80
|
-
<li class="file"><a href="../CHANGES.html">CHANGES</a></li>
|
81
|
-
|
82
|
-
<li class="file"><a href="../Gemfile.html">Gemfile</a></li>
|
83
|
-
|
84
|
-
<li class="file"><a href="../LICENCE.html">LICENCE</a></li>
|
85
|
-
|
86
|
-
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
87
|
-
|
88
|
-
</ul>
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
<div id="classindex-section" class="section project-section">
|
93
|
-
<h3 class="section-header">Class Index
|
94
|
-
<span class="search-toggle"><img src="../images/find.png"
|
95
|
-
height="16" width="16" alt="[+]"
|
96
|
-
title="show/hide quicksearch" /></span></h3>
|
97
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
98
|
-
<fieldset>
|
99
|
-
<legend>Quicksearch</legend>
|
100
|
-
<input type="text" name="quicksearch" value=""
|
101
|
-
class="quicksearch-field" />
|
102
|
-
</fieldset>
|
103
|
-
</form>
|
104
|
-
|
105
|
-
<ul class="link-list">
|
106
|
-
|
107
|
-
<li><a href="../OpenTok.html">OpenTok</a></li>
|
108
|
-
|
109
|
-
<li><a href="../OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
110
|
-
|
111
|
-
<li><a href="../OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
112
|
-
|
113
|
-
<li><a href="../OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
114
|
-
|
115
|
-
<li><a href="../OpenTok/Session.html">OpenTok::Session</a></li>
|
116
|
-
|
117
|
-
<li><a href="../OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
118
|
-
|
119
|
-
<li><a href="../Net.html">Net</a></li>
|
120
|
-
|
121
|
-
<li><a href="../Net/HTTP.html">Net::HTTP</a></li>
|
122
|
-
|
123
|
-
<li><a href="../Hash.html">Hash</a></li>
|
124
|
-
|
125
|
-
<li><a href="../Opentok.html">Opentok</a></li>
|
126
|
-
|
127
|
-
</ul>
|
128
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
|
135
|
-
<div id="documentation">
|
136
|
-
<h1 class="class">OpenTok::OpenTokException</h1>
|
137
|
-
|
138
|
-
<div id="description">
|
139
|
-
<p>
|
140
|
-
The exception that gets thrown when an invalid api-key and/or secret is
|
141
|
-
given.
|
142
|
-
</p>
|
143
|
-
|
144
|
-
</div>
|
145
|
-
|
146
|
-
<!-- Constants -->
|
147
|
-
|
148
|
-
|
149
|
-
<!-- Attributes -->
|
150
|
-
|
151
|
-
|
152
|
-
<!-- Methods -->
|
153
|
-
|
154
|
-
|
155
|
-
</div>
|
156
|
-
|
157
|
-
|
158
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
159
|
-
|
160
|
-
<p>Disabled; run with --debug to generate this.</p>
|
161
|
-
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div id="validator-badges">
|
165
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
166
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
167
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
</body>
|
171
|
-
</html>
|
172
|
-
|
data/doc/OpenTok/OpenTokSDK.html
DELETED
@@ -1,520 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
-
<head>
|
6
|
-
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
-
|
8
|
-
<title>Class: OpenTok::OpenTokSDK</title>
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
-
|
12
|
-
<script src="../js/jquery.js" type="text/javascript"
|
13
|
-
charset="utf-8"></script>
|
14
|
-
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
-
charset="utf-8"></script>
|
16
|
-
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
-
charset="utf-8"></script>
|
18
|
-
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
-
charset="utf-8"></script>
|
20
|
-
|
21
|
-
</head>
|
22
|
-
<body class="class">
|
23
|
-
|
24
|
-
<div id="metadata">
|
25
|
-
<div id="home-metadata">
|
26
|
-
<div id="home-section" class="section">
|
27
|
-
<h3 class="section-header">
|
28
|
-
<a href="../index.html">Home</a>
|
29
|
-
<a href="../index.html#classes">Classes</a>
|
30
|
-
<a href="../index.html#methods">Methods</a>
|
31
|
-
</h3>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="file-metadata">
|
36
|
-
<div id="file-list-section" class="section">
|
37
|
-
<h3 class="section-header">In Files</h3>
|
38
|
-
<div class="section-body">
|
39
|
-
<ul>
|
40
|
-
|
41
|
-
<li><a href="../lib/open_tok/open_tok_sdk_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
-
class="thickbox" title="lib/open_tok/open_tok_sdk.rb">lib/open_tok/open_tok_sdk.rb</a></li>
|
43
|
-
|
44
|
-
</ul>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
<div id="class-metadata">
|
52
|
-
|
53
|
-
<!-- Parent Class -->
|
54
|
-
|
55
|
-
<div id="parent-class-section" class="section">
|
56
|
-
<h3 class="section-header">Parent</h3>
|
57
|
-
|
58
|
-
<p class="link">Object</p>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
|
62
|
-
|
63
|
-
<!-- Namespace Contents -->
|
64
|
-
|
65
|
-
|
66
|
-
<!-- Method Quickref -->
|
67
|
-
|
68
|
-
<div id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
<ul class="link-list">
|
71
|
-
|
72
|
-
<li><a href="#method-c-new">::new</a></li>
|
73
|
-
|
74
|
-
<li><a href="#method-i-create_session">#create_session</a></li>
|
75
|
-
|
76
|
-
<li><a href="#method-i-do_request">#do_request</a></li>
|
77
|
-
|
78
|
-
<li><a href="#method-i-generate_token">#generate_token</a></li>
|
79
|
-
|
80
|
-
<li><a href="#method-i-sign_string">#sign_string</a></li>
|
81
|
-
|
82
|
-
</ul>
|
83
|
-
</div>
|
84
|
-
|
85
|
-
|
86
|
-
<!-- Included Modules -->
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div id="project-metadata">
|
91
|
-
|
92
|
-
|
93
|
-
<div id="fileindex-section" class="section project-section">
|
94
|
-
<h3 class="section-header">Files</h3>
|
95
|
-
<ul>
|
96
|
-
|
97
|
-
<li class="file"><a href="../CHANGES.html">CHANGES</a></li>
|
98
|
-
|
99
|
-
<li class="file"><a href="../Gemfile.html">Gemfile</a></li>
|
100
|
-
|
101
|
-
<li class="file"><a href="../LICENCE.html">LICENCE</a></li>
|
102
|
-
|
103
|
-
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
104
|
-
|
105
|
-
</ul>
|
106
|
-
</div>
|
107
|
-
|
108
|
-
|
109
|
-
<div id="classindex-section" class="section project-section">
|
110
|
-
<h3 class="section-header">Class Index
|
111
|
-
<span class="search-toggle"><img src="../images/find.png"
|
112
|
-
height="16" width="16" alt="[+]"
|
113
|
-
title="show/hide quicksearch" /></span></h3>
|
114
|
-
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
115
|
-
<fieldset>
|
116
|
-
<legend>Quicksearch</legend>
|
117
|
-
<input type="text" name="quicksearch" value=""
|
118
|
-
class="quicksearch-field" />
|
119
|
-
</fieldset>
|
120
|
-
</form>
|
121
|
-
|
122
|
-
<ul class="link-list">
|
123
|
-
|
124
|
-
<li><a href="../OpenTok.html">OpenTok</a></li>
|
125
|
-
|
126
|
-
<li><a href="../OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
127
|
-
|
128
|
-
<li><a href="../OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
129
|
-
|
130
|
-
<li><a href="../OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
131
|
-
|
132
|
-
<li><a href="../OpenTok/Session.html">OpenTok::Session</a></li>
|
133
|
-
|
134
|
-
<li><a href="../OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
135
|
-
|
136
|
-
<li><a href="../Net.html">Net</a></li>
|
137
|
-
|
138
|
-
<li><a href="../Net/HTTP.html">Net::HTTP</a></li>
|
139
|
-
|
140
|
-
<li><a href="../Hash.html">Hash</a></li>
|
141
|
-
|
142
|
-
<li><a href="../Opentok.html">Opentok</a></li>
|
143
|
-
|
144
|
-
</ul>
|
145
|
-
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
146
|
-
</div>
|
147
|
-
|
148
|
-
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
|
152
|
-
<div id="documentation">
|
153
|
-
<h1 class="class">OpenTok::OpenTokSDK</h1>
|
154
|
-
|
155
|
-
<div id="description">
|
156
|
-
|
157
|
-
</div>
|
158
|
-
|
159
|
-
<!-- Constants -->
|
160
|
-
|
161
|
-
|
162
|
-
<!-- Attributes -->
|
163
|
-
|
164
|
-
<div id="attribute-method-details" class="method-section section">
|
165
|
-
<h3 class="section-header">Attributes</h3>
|
166
|
-
|
167
|
-
|
168
|
-
<div id="api-url-attribute-method" class="method-detail">
|
169
|
-
<a name="api_url"></a>
|
170
|
-
|
171
|
-
<a name="api_url="></a>
|
172
|
-
|
173
|
-
<div class="method-heading attribute-method-heading">
|
174
|
-
<span class="method-name">api_url</span><span
|
175
|
-
class="attribute-access-type">[RW]</span>
|
176
|
-
</div>
|
177
|
-
|
178
|
-
<div class="method-description">
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</div>
|
183
|
-
</div>
|
184
|
-
|
185
|
-
</div>
|
186
|
-
|
187
|
-
|
188
|
-
<!-- Methods -->
|
189
|
-
|
190
|
-
<div id="public-class-method-details" class="method-section section">
|
191
|
-
<h3 class="section-header">Public Class Methods</h3>
|
192
|
-
|
193
|
-
|
194
|
-
<div id="new-method" class="method-detail ">
|
195
|
-
<a name="method-c-new"></a>
|
196
|
-
|
197
|
-
<div class="method-heading">
|
198
|
-
|
199
|
-
<span class="method-name">new</span><span
|
200
|
-
class="method-args">(partner_id, partner_secret, options = nil)</span>
|
201
|
-
<span class="method-click-advice">click to toggle source</span>
|
202
|
-
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div class="method-description">
|
206
|
-
|
207
|
-
<p>
|
208
|
-
Create a new <a href="OpenTokSDK.html">OpenTokSDK</a> object.
|
209
|
-
</p>
|
210
|
-
<p>
|
211
|
-
The first two attributes are required; <tt>parnter_id</tt> and
|
212
|
-
<tt>partner_secret</tt> are the api-key and secret that are provided to
|
213
|
-
you.
|
214
|
-
</p>
|
215
|
-
<p>
|
216
|
-
You can also pass in optional options;
|
217
|
-
</p>
|
218
|
-
<ul>
|
219
|
-
<li><p>
|
220
|
-
<tt>:<a href="OpenTokSDK.html#api_url">api_url</a></tt> sets the location
|
221
|
-
of the api (staging or production)
|
222
|
-
</p>
|
223
|
-
</li>
|
224
|
-
</ul>
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
<div class="method-source-code"
|
229
|
-
id="new-source">
|
230
|
-
<pre>
|
231
|
-
<span class="ruby-comment cmt"># File lib/open_tok/open_tok_sdk.rb, line 46</span>
|
232
|
-
46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">partner_id</span>, <span class="ruby-identifier">partner_secret</span>, <span class="ruby-identifier">options</span> = <span class="ruby-keyword kw">nil</span>)
|
233
|
-
47: <span class="ruby-ivar">@partner_id</span> = <span class="ruby-identifier">partner_id</span>
|
234
|
-
48: <span class="ruby-ivar">@partner_secret</span> = <span class="ruby-identifier">partner_secret</span>.<span class="ruby-identifier">strip</span>
|
235
|
-
49:
|
236
|
-
50: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Hash</span>)
|
237
|
-
51: <span class="ruby-ivar">@api_url</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:api_url</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">API_URL</span>
|
238
|
-
52: <span class="ruby-keyword kw">end</span>
|
239
|
-
53:
|
240
|
-
54: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@api_url</span>
|
241
|
-
55: <span class="ruby-ivar">@api_url</span> = <span class="ruby-constant">API_URL</span>
|
242
|
-
56: <span class="ruby-keyword kw">end</span>
|
243
|
-
57: <span class="ruby-keyword kw">end</span></pre>
|
244
|
-
</div>
|
245
|
-
|
246
|
-
</div>
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
|
254
|
-
</div>
|
255
|
-
|
256
|
-
<div id="public-instance-method-details" class="method-section section">
|
257
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
258
|
-
|
259
|
-
|
260
|
-
<div id="create-session-method" class="method-detail ">
|
261
|
-
<a name="method-i-create_session"></a>
|
262
|
-
|
263
|
-
<div class="method-heading">
|
264
|
-
|
265
|
-
<span class="method-name">create_session</span><span
|
266
|
-
class="method-args">(location='', opts={})</span>
|
267
|
-
<span class="method-click-advice">click to toggle source</span>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
<div class="method-description">
|
272
|
-
|
273
|
-
<p>
|
274
|
-
Generates a new <a href="Session.html">OpenTok::Session</a> and set
|
275
|
-
it’s session_id, situating it in TokBox’s global network near
|
276
|
-
the IP of the specified @location@.
|
277
|
-
</p>
|
278
|
-
<p>
|
279
|
-
See <a
|
280
|
-
href="http://www.tokbox.com/opentok/tools/documentation/overview/session_creation.html">www.tokbox.com/opentok/tools/documentation/overview/session_creation.html</a>
|
281
|
-
for more information
|
282
|
-
</p>
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
<div class="method-source-code"
|
287
|
-
id="create-session-source">
|
288
|
-
<pre>
|
289
|
-
<span class="ruby-comment cmt"># File lib/open_tok/open_tok_sdk.rb, line 99</span>
|
290
|
-
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_session</span>(<span class="ruby-identifier">location</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">opts</span>={})
|
291
|
-
100: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">merge!</span>({<span class="ruby-value">:partner_id</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@partner_id</span>, <span class="ruby-value">:location=</span><span class="ruby-operator">></span><span class="ruby-identifier">location</span>})
|
292
|
-
101: <span class="ruby-identifier">doc</span> = <span class="ruby-identifier">do_request</span>(<span class="ruby-value str">"/session/create"</span>, <span class="ruby-identifier">opts</span>)
|
293
|
-
102: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">'Errors'</span>).<span class="ruby-identifier">empty?</span>
|
294
|
-
103: <span class="ruby-identifier">raise</span> <span class="ruby-constant">OpenTokException</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">'Errors'</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">'error'</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">children</span>.<span class="ruby-identifier">to_s</span>
|
295
|
-
104: <span class="ruby-keyword kw">end</span>
|
296
|
-
105: <span class="ruby-constant">OpenTok</span><span class="ruby-operator">::</span><span class="ruby-constant">Session</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">'Session'</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">get_elements</span>(<span class="ruby-value str">'session_id'</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">children</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_s</span>)
|
297
|
-
106: <span class="ruby-keyword kw">end</span></pre>
|
298
|
-
</div>
|
299
|
-
|
300
|
-
</div>
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
</div>
|
306
|
-
|
307
|
-
|
308
|
-
<div id="generate-token-method" class="method-detail ">
|
309
|
-
<a name="method-i-generate_token"></a>
|
310
|
-
|
311
|
-
<div class="method-heading">
|
312
|
-
|
313
|
-
<span class="method-name">generate_token</span><span
|
314
|
-
class="method-args">(opts = {})</span>
|
315
|
-
<span class="method-click-advice">click to toggle source</span>
|
316
|
-
|
317
|
-
</div>
|
318
|
-
|
319
|
-
<div class="method-description">
|
320
|
-
|
321
|
-
<p>
|
322
|
-
Generate token for the given session_id. The options you can provide are;
|
323
|
-
</p>
|
324
|
-
<ul>
|
325
|
-
<li><p>
|
326
|
-
<tt>:session_id</tt> (required) generate a token for the provided session
|
327
|
-
</p>
|
328
|
-
</li>
|
329
|
-
<li><p>
|
330
|
-
<tt>:create_time</tt>
|
331
|
-
</p>
|
332
|
-
</li>
|
333
|
-
<li><p>
|
334
|
-
<tt>:expire_time</tt> (optional) The time when the token will expire,
|
335
|
-
defined as an integer value for a Unix timestamp (in seconds). If you do
|
336
|
-
not specify this value, tokens expire in 24 hours after being created.
|
337
|
-
</p>
|
338
|
-
</li>
|
339
|
-
<li><p>
|
340
|
-
<tt>:role</tt> (optional) Added in <a href="../OpenTok.html">OpenTok</a>
|
341
|
-
v0.91.5. This defines the role the user will have. There are three roles:
|
342
|
-
subscriber, publisher, and moderator.
|
343
|
-
</p>
|
344
|
-
</li>
|
345
|
-
</ul>
|
346
|
-
<p>
|
347
|
-
See <a
|
348
|
-
href="http://www.tokbox.com/opentok/tools/documentation/overview/token_creation.html">www.tokbox.com/opentok/tools/documentation/overview/token_creation.html</a>
|
349
|
-
for more information on all options.
|
350
|
-
</p>
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
<div class="method-source-code"
|
355
|
-
id="generate-token-source">
|
356
|
-
<pre>
|
357
|
-
<span class="ruby-comment cmt"># File lib/open_tok/open_tok_sdk.rb, line 66</span>
|
358
|
-
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_token</span>(<span class="ruby-identifier">opts</span> = {})
|
359
|
-
67: {<span class="ruby-value">:session_id=</span><span class="ruby-operator">></span><span class="ruby-keyword kw">nil</span>, <span class="ruby-value">:create_time=</span><span class="ruby-operator">></span><span class="ruby-keyword kw">nil</span>, <span class="ruby-value">:expire_time=</span><span class="ruby-operator">></span><span class="ruby-keyword kw">nil</span>, <span class="ruby-value">:role=</span><span class="ruby-operator">></span><span class="ruby-keyword kw">nil</span>}.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">opts</span>)
|
360
|
-
68:
|
361
|
-
69: <span class="ruby-identifier">create_time</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:create_time</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:create_time</span>]
|
362
|
-
70: <span class="ruby-identifier">session_id</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:session_id</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-value str">''</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:session_id</span>]
|
363
|
-
71: <span class="ruby-identifier">role</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:role</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-constant">RoleConstants</span><span class="ruby-operator">::</span><span class="ruby-constant">PUBLISHER</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:role</span>]
|
364
|
-
72:
|
365
|
-
73: <span class="ruby-identifier">data_params</span> = {
|
366
|
-
74: <span class="ruby-value">:role</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">role</span>,
|
367
|
-
75: <span class="ruby-value">:session_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">session_id</span>,
|
368
|
-
76: <span class="ruby-value">:create_time</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">create_time</span>.<span class="ruby-identifier">to_i</span>,
|
369
|
-
77: <span class="ruby-value">:nonce</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rand</span>
|
370
|
-
78: }
|
371
|
-
79:
|
372
|
-
80: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:expire_time</span>].<span class="ruby-identifier">nil?</span>
|
373
|
-
81: <span class="ruby-identifier">data_params</span>[<span class="ruby-value">:expire_time</span>] = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:expire_time</span>].<span class="ruby-identifier">to_i</span>
|
374
|
-
82: <span class="ruby-keyword kw">end</span>
|
375
|
-
83:
|
376
|
-
84: <span class="ruby-identifier">data_string</span> = <span class="ruby-identifier">data_params</span>.<span class="ruby-identifier">urlencode</span>
|
377
|
-
85:
|
378
|
-
86: <span class="ruby-identifier">sig</span> = <span class="ruby-identifier">sign_string</span>(<span class="ruby-identifier">data_string</span>, <span class="ruby-ivar">@partner_secret</span>)
|
379
|
-
87: <span class="ruby-identifier">meta_string</span> = {
|
380
|
-
88: <span class="ruby-value">:partner_id</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@partner_id</span>,
|
381
|
-
89: <span class="ruby-value">:sdk_version</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">@@SDK_VERSION</span>,
|
382
|
-
90: <span class="ruby-value">:sig</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sig</span>
|
383
|
-
91: }.<span class="ruby-identifier">urlencode</span>
|
384
|
-
92:
|
385
|
-
93: <span class="ruby-identifier">@@TOKEN_SENTINEL</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">encode64</span>(<span class="ruby-identifier">meta_string</span> <span class="ruby-operator">+</span> <span class="ruby-value str">":"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">data_string</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"\n"</span>,<span class="ruby-value str">""</span>)
|
386
|
-
94: <span class="ruby-keyword kw">end</span></pre>
|
387
|
-
</div>
|
388
|
-
|
389
|
-
</div>
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
</div>
|
395
|
-
|
396
|
-
|
397
|
-
</div>
|
398
|
-
|
399
|
-
<div id="protected-instance-method-details" class="method-section section">
|
400
|
-
<h3 class="section-header">Protected Instance Methods</h3>
|
401
|
-
|
402
|
-
|
403
|
-
<div id="do-request-method" class="method-detail ">
|
404
|
-
<a name="method-i-do_request"></a>
|
405
|
-
|
406
|
-
<div class="method-heading">
|
407
|
-
|
408
|
-
<span class="method-name">do_request</span><span
|
409
|
-
class="method-args">(api_url, params, token=nil)</span>
|
410
|
-
<span class="method-click-advice">click to toggle source</span>
|
411
|
-
|
412
|
-
</div>
|
413
|
-
|
414
|
-
<div class="method-description">
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
<div class="method-source-code"
|
421
|
-
id="do-request-source">
|
422
|
-
<pre>
|
423
|
-
<span class="ruby-comment cmt"># File lib/open_tok/open_tok_sdk.rb, line 113</span>
|
424
|
-
113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_request</span>(<span class="ruby-identifier">api_url</span>, <span class="ruby-identifier">params</span>, <span class="ruby-identifier">token</span>=<span class="ruby-keyword kw">nil</span>)
|
425
|
-
114: <span class="ruby-identifier">url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@api_url</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">api_url</span>)
|
426
|
-
115: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">empty?</span>
|
427
|
-
116: <span class="ruby-identifier">req</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Post</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">url</span>.<span class="ruby-identifier">path</span>)
|
428
|
-
117: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">set_form_data</span>(<span class="ruby-identifier">params</span>)
|
429
|
-
118: <span class="ruby-keyword kw">else</span>
|
430
|
-
119: <span class="ruby-identifier">req</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Get</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">url</span>.<span class="ruby-identifier">path</span>)
|
431
|
-
120: <span class="ruby-keyword kw">end</span>
|
432
|
-
121:
|
433
|
-
122: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">token</span>.<span class="ruby-identifier">nil?</span>
|
434
|
-
123: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">add_field</span> <span class="ruby-value str">'X-TB-TOKEN-AUTH'</span>, <span class="ruby-identifier">token</span>
|
435
|
-
124: <span class="ruby-keyword kw">else</span>
|
436
|
-
125: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">add_field</span> <span class="ruby-value str">'X-TB-PARTNER-AUTH'</span>, <span class="ruby-node">"#{@partner_id}:#{@partner_secret}"</span>
|
437
|
-
126: <span class="ruby-keyword kw">end</span>
|
438
|
-
127: <span class="ruby-identifier">http</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">url</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">url</span>.<span class="ruby-identifier">port</span>)
|
439
|
-
128: <span class="ruby-identifier">http</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@api_url</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-value str">"https"</span>)
|
440
|
-
129: <span class="ruby-identifier">res</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">start</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span> <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">req</span>)}
|
441
|
-
130: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">res</span>
|
442
|
-
131: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPSuccess</span>, <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPRedirection</span>
|
443
|
-
132: <span class="ruby-comment cmt"># OK</span>
|
444
|
-
133: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">res</span>.<span class="ruby-identifier">read_body</span>)
|
445
|
-
134: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">doc</span>
|
446
|
-
135: <span class="ruby-keyword kw">else</span>
|
447
|
-
136: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">error!</span>
|
448
|
-
137: <span class="ruby-keyword kw">end</span>
|
449
|
-
138: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPExceptions</span>
|
450
|
-
139: <span class="ruby-identifier">raise</span>
|
451
|
-
140: <span class="ruby-identifier">raise</span> <span class="ruby-constant">OpenTokException</span>.<span class="ruby-identifier">new</span> <span class="ruby-value str">'Unable to create fufill request: '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">$!</span>
|
452
|
-
141: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NoMethodError</span>
|
453
|
-
142: <span class="ruby-identifier">raise</span>
|
454
|
-
143: <span class="ruby-identifier">raise</span> <span class="ruby-constant">OpenTokException</span>.<span class="ruby-identifier">new</span> <span class="ruby-value str">'Unable to create a fufill request at this time: '</span> <span class="ruby-operator">+</span> <span class="ruby-node">$1</span>
|
455
|
-
144: <span class="ruby-keyword kw">end</span></pre>
|
456
|
-
</div>
|
457
|
-
|
458
|
-
</div>
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
</div>
|
464
|
-
|
465
|
-
|
466
|
-
<div id="sign-string-method" class="method-detail ">
|
467
|
-
<a name="method-i-sign_string"></a>
|
468
|
-
|
469
|
-
<div class="method-heading">
|
470
|
-
|
471
|
-
<span class="method-name">sign_string</span><span
|
472
|
-
class="method-args">(data, secret)</span>
|
473
|
-
<span class="method-click-advice">click to toggle source</span>
|
474
|
-
|
475
|
-
</div>
|
476
|
-
|
477
|
-
<div class="method-description">
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
<div class="method-source-code"
|
484
|
-
id="sign-string-source">
|
485
|
-
<pre>
|
486
|
-
<span class="ruby-comment cmt"># File lib/open_tok/open_tok_sdk.rb, line 109</span>
|
487
|
-
109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sign_string</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">secret</span>)
|
488
|
-
110: <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">HMAC</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-constant">DIGEST</span>, <span class="ruby-identifier">secret</span>, <span class="ruby-identifier">data</span>)
|
489
|
-
111: <span class="ruby-keyword kw">end</span></pre>
|
490
|
-
</div>
|
491
|
-
|
492
|
-
</div>
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
</div>
|
498
|
-
|
499
|
-
|
500
|
-
</div>
|
501
|
-
|
502
|
-
|
503
|
-
</div>
|
504
|
-
|
505
|
-
|
506
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
507
|
-
|
508
|
-
<p>Disabled; run with --debug to generate this.</p>
|
509
|
-
|
510
|
-
</div>
|
511
|
-
|
512
|
-
<div id="validator-badges">
|
513
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
514
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
515
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
516
|
-
</div>
|
517
|
-
|
518
|
-
</body>
|
519
|
-
</html>
|
520
|
-
|