opentok 0.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +16 -2
- data/.travis.yml +6 -0
- data/.yardopts +1 -0
- data/CONTRIBUTING.md +47 -0
- data/DEVELOPING.md +91 -0
- data/LICENSE +19 -5
- data/README.md +170 -53
- data/Rakefile +10 -5
- data/doc/OpenTok.html +411 -0
- data/doc/OpenTok/Archive.html +1320 -0
- data/doc/OpenTok/ArchiveList.html +216 -0
- data/doc/OpenTok/Archives.html +1028 -0
- data/doc/OpenTok/Client.html +695 -0
- data/doc/OpenTok/OpenTok.html +1046 -0
- data/doc/OpenTok/OpenTokArchiveError.html +142 -0
- data/doc/OpenTok/OpenTokAuthenticationError.html +143 -0
- data/doc/OpenTok/OpenTokError.html +138 -0
- data/doc/OpenTok/Session.html +665 -0
- data/doc/OpenTok/TokenGenerator.html +204 -0
- data/doc/OpenTok/TokenGenerator/ClassMethods.html +187 -0
- data/doc/README.md +15 -0
- data/doc/_index.html +182 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +87 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +87 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +227 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/opentok.rb +3 -14
- data/lib/opentok/archive.rb +92 -0
- data/lib/opentok/archive_list.rb +17 -0
- data/lib/opentok/archives.rb +120 -0
- data/lib/opentok/client.rb +125 -0
- data/lib/opentok/constants.rb +5 -0
- data/lib/opentok/exceptions.rb +10 -0
- data/lib/opentok/opentok.rb +174 -0
- data/lib/opentok/session.rb +76 -0
- data/lib/opentok/token_generator.rb +101 -0
- data/lib/opentok/version.rb +4 -0
- data/opentok.gemspec +29 -22
- data/sample/Archiving/Gemfile +4 -0
- data/sample/Archiving/README.md +212 -0
- data/sample/Archiving/archiving_sample.rb +80 -0
- data/sample/Archiving/public/css/sample.css +22 -0
- data/sample/Archiving/public/img/archiving-off.png +0 -0
- data/sample/Archiving/public/img/archiving-on-idle.png +0 -0
- data/sample/Archiving/public/img/archiving-on-message.png +0 -0
- data/sample/Archiving/public/js/host.js +37 -0
- data/sample/Archiving/public/js/participant.js +13 -0
- data/sample/Archiving/views/history.erb +65 -0
- data/sample/Archiving/views/host.erb +69 -0
- data/sample/Archiving/views/index.erb +48 -0
- data/sample/Archiving/views/layout.erb +29 -0
- data/sample/Archiving/views/participant.erb +55 -0
- data/sample/HelloWorld/Gemfile +4 -0
- data/sample/HelloWorld/README.md +123 -0
- data/sample/HelloWorld/hello_world.rb +27 -0
- data/sample/HelloWorld/public/js/helloworld.js +32 -0
- data/sample/HelloWorld/views/index.erb +21 -0
- data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +48 -0
- data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +49 -0
- data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +32 -0
- data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +46 -0
- data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +48 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +104 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +71 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +60 -0
- data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +82 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +39 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +39 -0
- data/spec/matchers/token.rb +48 -0
- data/spec/opentok/archives_spec.rb +91 -0
- data/spec/opentok/opentok_spec.rb +144 -0
- data/spec/opentok/session_spec.rb +71 -0
- data/spec/shared/opentok_generates_tokens.rb +62 -0
- data/spec/shared/session_generates_tokens.rb +63 -0
- data/spec/spec_helper.rb +6 -7
- metadata +197 -59
- data/.rspec +0 -3
- data/CHANGES +0 -33
- data/doc/reference.md +0 -122
- data/lib/open_tok/archive.rb +0 -53
- data/lib/open_tok/archive_timeline_event.rb +0 -22
- data/lib/open_tok/archive_video_resource.rb +0 -28
- data/lib/open_tok/exception.rb +0 -50
- data/lib/open_tok/open_tok_sdk.rb +0 -198
- data/lib/open_tok/request.rb +0 -63
- data/lib/open_tok/role_constants.rb +0 -18
- data/lib/open_tok/session.rb +0 -25
- data/lib/open_tok/session_property_constants.rb +0 -30
- data/lib/open_tok/utils.rb +0 -10
- data/lib/open_tok/version.rb +0 -5
- data/sample/sample.rb +0 -26
- data/spec/cassettes/archives.yml +0 -83
- data/spec/cassettes/deleteArchive.yml +0 -91
- data/spec/cassettes/invalidSession.yml +0 -41
- data/spec/cassettes/session.yml +0 -46
- data/spec/cassettes/stitchArchive.yml +0 -42
- data/spec/opentok_exception_spec.rb +0 -38
- data/spec/opentok_spec.rb +0 -135
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Exception: OpenTok::OpenTokArchiveError
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../';
|
|
20
|
+
framesUrl = "../frames.html#!OpenTok/OpenTokArchiveError.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="../_index.html">Index (O)</a> »
|
|
35
|
+
<span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">OpenTokArchiveError</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Exception: OpenTok::OpenTokArchiveError
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">StandardError</li>
|
|
82
|
+
|
|
83
|
+
<li class="next"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></li>
|
|
84
|
+
|
|
85
|
+
<li class="next">OpenTok::OpenTokArchiveError</li>
|
|
86
|
+
|
|
87
|
+
</ul>
|
|
88
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
89
|
+
|
|
90
|
+
</dd>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<dt class="r2 last">Defined in:</dt>
|
|
101
|
+
<dd class="r2 last">lib/opentok/exceptions.rb</dd>
|
|
102
|
+
|
|
103
|
+
</dl>
|
|
104
|
+
<div class="clear"></div>
|
|
105
|
+
|
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
|
107
|
+
<div class="discussion">
|
|
108
|
+
|
|
109
|
+
<p>Defines errors raised by archive-related methods of the OpenTok Ruby SDK.</p>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="tags">
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div id="footer">
|
|
136
|
+
Generated on Tue May 27 13:24:51 2014 by
|
|
137
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
138
|
+
0.8.7.4 (ruby-1.9.3).
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
</body>
|
|
142
|
+
</html>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Exception: OpenTok::OpenTokAuthenticationError
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../';
|
|
20
|
+
framesUrl = "../frames.html#!OpenTok/OpenTokAuthenticationError.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="../_index.html">Index (O)</a> »
|
|
35
|
+
<span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">OpenTokAuthenticationError</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Exception: OpenTok::OpenTokAuthenticationError
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">StandardError</li>
|
|
82
|
+
|
|
83
|
+
<li class="next"><span class='object_link'><a href="OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span></li>
|
|
84
|
+
|
|
85
|
+
<li class="next">OpenTok::OpenTokAuthenticationError</li>
|
|
86
|
+
|
|
87
|
+
</ul>
|
|
88
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
89
|
+
|
|
90
|
+
</dd>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<dt class="r2 last">Defined in:</dt>
|
|
101
|
+
<dd class="r2 last">lib/opentok/exceptions.rb</dd>
|
|
102
|
+
|
|
103
|
+
</dl>
|
|
104
|
+
<div class="clear"></div>
|
|
105
|
+
|
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
|
107
|
+
<div class="discussion">
|
|
108
|
+
|
|
109
|
+
<p>Defines errors raised when you attempt an operation using an invalid
|
|
110
|
+
OpenTok API key or secret.</p>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="tags">
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div id="footer">
|
|
137
|
+
Generated on Tue May 27 13:24:51 2014 by
|
|
138
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
139
|
+
0.8.7.4 (ruby-1.9.3).
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
</body>
|
|
143
|
+
</html>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Exception: OpenTok::OpenTokError
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../';
|
|
20
|
+
framesUrl = "../frames.html#!OpenTok/OpenTokError.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="../_index.html">Index (O)</a> »
|
|
35
|
+
<span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">OpenTokError</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Exception: OpenTok::OpenTokError
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName">StandardError</span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">StandardError</li>
|
|
82
|
+
|
|
83
|
+
<li class="next">OpenTok::OpenTokError</li>
|
|
84
|
+
|
|
85
|
+
</ul>
|
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
87
|
+
|
|
88
|
+
</dd>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
|
99
|
+
<dd class="r2 last">lib/opentok/exceptions.rb</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<p>Defines errors raised by methods of the OpenTok Ruby SDK.</p>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="tags">
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
</div><div id="subclasses">
|
|
116
|
+
<h2>Direct Known Subclasses</h2>
|
|
117
|
+
<p class="children"><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span>, <span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></p>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div id="footer">
|
|
132
|
+
Generated on Tue May 27 13:24:51 2014 by
|
|
133
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
134
|
+
0.8.7.4 (ruby-1.9.3).
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
</body>
|
|
138
|
+
</html>
|
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: OpenTok::Session
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../';
|
|
20
|
+
framesUrl = "../frames.html#!OpenTok/Session.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="../_index.html">Index (S)</a> »
|
|
35
|
+
<span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
|
|
36
|
+
»
|
|
37
|
+
<span class="title">Session</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Class: OpenTok::Session
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName">Object</span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">OpenTok::Session</li>
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
85
|
+
|
|
86
|
+
</dd>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
|
97
|
+
<dd class="r2 last">lib/opentok/session.rb</dd>
|
|
98
|
+
|
|
99
|
+
</dl>
|
|
100
|
+
<div class="clear"></div>
|
|
101
|
+
|
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
|
103
|
+
<div class="discussion">
|
|
104
|
+
|
|
105
|
+
<p>Represents an OpenTok session.</p>
|
|
106
|
+
|
|
107
|
+
<p>Use the OpenTok.createSession() method to create an OpenTok session. Use
|
|
108
|
+
the session_id property of the Session object to get the session ID.</p>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="tags">
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
<h2>Constant Summary</h2>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
|
124
|
+
<ul class="summary">
|
|
125
|
+
|
|
126
|
+
<li class="public ">
|
|
127
|
+
<span class="summary_signature">
|
|
128
|
+
|
|
129
|
+
<a href="#location-instance_method" title="#location (instance method)">- (String) <strong>location</strong> </a>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
</span>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<span class="note title readonly">readonly</span>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<span class="summary_desc"><div class='inline'>
|
|
149
|
+
<p>The location hint IP address.</p>
|
|
150
|
+
</div></span>
|
|
151
|
+
|
|
152
|
+
</li>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<li class="public ">
|
|
156
|
+
<span class="summary_signature">
|
|
157
|
+
|
|
158
|
+
<a href="#media_mode-instance_method" title="#media_mode (instance method)">- (String) <strong>media_mode</strong> </a>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
</span>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<span class="note title readonly">readonly</span>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<span class="summary_desc"><div class='inline'>
|
|
178
|
+
<p>Set to :routed if the session uses the OpenTok Media Router or to :relayed
|
|
179
|
+
if the session attempts to transmit streams directly between clients.</p>
|
|
180
|
+
</div></span>
|
|
181
|
+
|
|
182
|
+
</li>
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
<li class="public ">
|
|
186
|
+
<span class="summary_signature">
|
|
187
|
+
|
|
188
|
+
<a href="#session_id-instance_method" title="#session_id (instance method)">- (String) <strong>session_id</strong> </a>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
</span>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<span class="note title readonly">readonly</span>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
<span class="summary_desc"><div class='inline'>
|
|
208
|
+
<p>The session ID.</p>
|
|
209
|
+
</div></span>
|
|
210
|
+
|
|
211
|
+
</li>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</ul>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<h2>
|
|
221
|
+
Instance Method Summary
|
|
222
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
223
|
+
</h2>
|
|
224
|
+
|
|
225
|
+
<ul class="summary">
|
|
226
|
+
|
|
227
|
+
<li class="public ">
|
|
228
|
+
<span class="summary_signature">
|
|
229
|
+
|
|
230
|
+
<a href="#generate_token-instance_method" title="#generate_token (instance method)">- (String) <strong>generate_token</strong>(options) </a>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
</span>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<span class="summary_desc"><div class='inline'>
|
|
245
|
+
<p>Generates a token.</p>
|
|
246
|
+
</div></span>
|
|
247
|
+
|
|
248
|
+
</li>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
</ul>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<div id="instance_attr_details" class="attr_details">
|
|
262
|
+
<h2>Instance Attribute Details</h2>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<span id=""></span>
|
|
266
|
+
<div class="method_details first">
|
|
267
|
+
<h3 class="signature first" id="location-instance_method">
|
|
268
|
+
|
|
269
|
+
- (<tt>String</tt>) <strong>location</strong> <span class="extras">(readonly)</span>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
</h3><div class="docstring">
|
|
276
|
+
<div class="discussion">
|
|
277
|
+
|
|
278
|
+
<p>The location hint IP address. See the OpenTok.createSession() method.</p>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
<div class="tags">
|
|
284
|
+
|
|
285
|
+
<p class="tag_title">Returns:</p>
|
|
286
|
+
<ul class="return">
|
|
287
|
+
|
|
288
|
+
<li>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
—
|
|
296
|
+
<div class='inline'>
|
|
297
|
+
<p>the current value of location</p>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
</li>
|
|
301
|
+
|
|
302
|
+
</ul>
|
|
303
|
+
|
|
304
|
+
</div><table class="source_code">
|
|
305
|
+
<tr>
|
|
306
|
+
<td>
|
|
307
|
+
<pre class="lines">
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
43
|
|
311
|
+
44
|
|
312
|
+
45</pre>
|
|
313
|
+
</td>
|
|
314
|
+
<td>
|
|
315
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
|
|
316
|
+
|
|
317
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_location'>location</span>
|
|
318
|
+
<span class='ivar'>@location</span>
|
|
319
|
+
<span class='kw'>end</span></pre>
|
|
320
|
+
</td>
|
|
321
|
+
</tr>
|
|
322
|
+
</table>
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
<span id=""></span>
|
|
327
|
+
<div class="method_details ">
|
|
328
|
+
<h3 class="signature " id="media_mode-instance_method">
|
|
329
|
+
|
|
330
|
+
- (<tt>String</tt>) <strong>media_mode</strong> <span class="extras">(readonly)</span>
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
</h3><div class="docstring">
|
|
337
|
+
<div class="discussion">
|
|
338
|
+
|
|
339
|
+
<p>Set to :routed if the session uses the OpenTok Media Router or to :relayed
|
|
340
|
+
if the session attempts to transmit streams directly between clients.</p>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
<div class="tags">
|
|
346
|
+
|
|
347
|
+
<p class="tag_title">Returns:</p>
|
|
348
|
+
<ul class="return">
|
|
349
|
+
|
|
350
|
+
<li>
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
—
|
|
358
|
+
<div class='inline'>
|
|
359
|
+
<p>the current value of media_mode</p>
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
</li>
|
|
363
|
+
|
|
364
|
+
</ul>
|
|
365
|
+
|
|
366
|
+
</div><table class="source_code">
|
|
367
|
+
<tr>
|
|
368
|
+
<td>
|
|
369
|
+
<pre class="lines">
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
43
|
|
373
|
+
44
|
|
374
|
+
45</pre>
|
|
375
|
+
</td>
|
|
376
|
+
<td>
|
|
377
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
|
|
378
|
+
|
|
379
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_media_mode'>media_mode</span>
|
|
380
|
+
<span class='ivar'>@media_mode</span>
|
|
381
|
+
<span class='kw'>end</span></pre>
|
|
382
|
+
</td>
|
|
383
|
+
</tr>
|
|
384
|
+
</table>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
<span id=""></span>
|
|
389
|
+
<div class="method_details ">
|
|
390
|
+
<h3 class="signature " id="session_id-instance_method">
|
|
391
|
+
|
|
392
|
+
- (<tt>String</tt>) <strong>session_id</strong> <span class="extras">(readonly)</span>
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
</h3><div class="docstring">
|
|
399
|
+
<div class="discussion">
|
|
400
|
+
|
|
401
|
+
<p>The session ID.</p>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
<div class="tags">
|
|
407
|
+
|
|
408
|
+
<p class="tag_title">Returns:</p>
|
|
409
|
+
<ul class="return">
|
|
410
|
+
|
|
411
|
+
<li>
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
—
|
|
419
|
+
<div class='inline'>
|
|
420
|
+
<p>the current value of session_id</p>
|
|
421
|
+
</div>
|
|
422
|
+
|
|
423
|
+
</li>
|
|
424
|
+
|
|
425
|
+
</ul>
|
|
426
|
+
|
|
427
|
+
</div><table class="source_code">
|
|
428
|
+
<tr>
|
|
429
|
+
<td>
|
|
430
|
+
<pre class="lines">
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
43
|
|
434
|
+
44
|
|
435
|
+
45</pre>
|
|
436
|
+
</td>
|
|
437
|
+
<td>
|
|
438
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
|
|
439
|
+
|
|
440
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_session_id'>session_id</span>
|
|
441
|
+
<span class='ivar'>@session_id</span>
|
|
442
|
+
<span class='kw'>end</span></pre>
|
|
443
|
+
</td>
|
|
444
|
+
</tr>
|
|
445
|
+
</table>
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
</div>
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
<div id="instance_method_details" class="method_details_list">
|
|
452
|
+
<h2>Instance Method Details</h2>
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
<div class="method_details first">
|
|
456
|
+
<h3 class="signature first" id="generate_token-instance_method">
|
|
457
|
+
|
|
458
|
+
- (<tt>String</tt>) <strong>generate_token</strong>(options)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
</h3><div class="docstring">
|
|
465
|
+
<div class="discussion">
|
|
466
|
+
|
|
467
|
+
<p>Generates a token.</p>
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
<div class="tags">
|
|
473
|
+
<p class="tag_title">Parameters:</p>
|
|
474
|
+
<ul class="param">
|
|
475
|
+
|
|
476
|
+
<li>
|
|
477
|
+
|
|
478
|
+
<span class='name'>options</span>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
</li>
|
|
486
|
+
|
|
487
|
+
</ul>
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
493
|
+
<ul class="option">
|
|
494
|
+
|
|
495
|
+
<li>
|
|
496
|
+
<span class="name">:role</span>
|
|
497
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
498
|
+
<span class="default">
|
|
499
|
+
|
|
500
|
+
</span>
|
|
501
|
+
|
|
502
|
+
— <div class='inline'>
|
|
503
|
+
<p>The role for the token. Set this to one of the following values:</p>
|
|
504
|
+
<ul><li>
|
|
505
|
+
<p><tt>:subscriber</tt> -- A subscriber can only subscribe to streams.</p>
|
|
506
|
+
</li><li>
|
|
507
|
+
<p><tt>:publisher</tt> -- A publisher can publish streams, subscribe to
|
|
508
|
+
streams, and signal. (This is the default value if you do not specify a
|
|
509
|
+
role.)</p>
|
|
510
|
+
</li><li>
|
|
511
|
+
<p><tt>:moderator</tt> -- In addition to the privileges granted to a
|
|
512
|
+
publisher, in clients using the OpenTok.js 2.2 library, a moderator can
|
|
513
|
+
call the <tt>forceUnpublish()</tt> and <tt>forceDisconnect()</tt> method of
|
|
514
|
+
the Session object.</p>
|
|
515
|
+
</li></ul>
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
</li>
|
|
519
|
+
|
|
520
|
+
<li>
|
|
521
|
+
<span class="name">:expire_time</span>
|
|
522
|
+
<span class="type">(<tt>integer</tt>)</span>
|
|
523
|
+
<span class="default">
|
|
524
|
+
|
|
525
|
+
</span>
|
|
526
|
+
|
|
527
|
+
— <div class='inline'>
|
|
528
|
+
<p>The expiration time, in seconds since the UNIX epoch. Pass in 0 to use the
|
|
529
|
+
default expiration time of 24 hours after the token creation time. The
|
|
530
|
+
maximum expiration time is 30 days after the creation time.</p>
|
|
531
|
+
</div>
|
|
532
|
+
|
|
533
|
+
</li>
|
|
534
|
+
|
|
535
|
+
<li>
|
|
536
|
+
<span class="name">:data</span>
|
|
537
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
538
|
+
<span class="default">
|
|
539
|
+
|
|
540
|
+
</span>
|
|
541
|
+
|
|
542
|
+
— <div class='inline'>
|
|
543
|
+
<p>A string containing connection metadata describing the end-user. For
|
|
544
|
+
example, you can pass the user ID, name, or other data describing the
|
|
545
|
+
end-user. The length of the string is limited to 1000 characters. This data
|
|
546
|
+
cannot be updated once it is set.</p>
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
</li>
|
|
550
|
+
|
|
551
|
+
</ul>
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
<p class="tag_title">Returns:</p>
|
|
555
|
+
<ul class="return">
|
|
556
|
+
|
|
557
|
+
<li>
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
—
|
|
565
|
+
<div class='inline'>
|
|
566
|
+
<p>The token string.</p>
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
</li>
|
|
570
|
+
|
|
571
|
+
</ul>
|
|
572
|
+
|
|
573
|
+
</div><table class="source_code">
|
|
574
|
+
<tr>
|
|
575
|
+
<td>
|
|
576
|
+
<pre class="lines">
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
43
|
|
580
|
+
44
|
|
581
|
+
45
|
|
582
|
+
46
|
|
583
|
+
47
|
|
584
|
+
48
|
|
585
|
+
49
|
|
586
|
+
50
|
|
587
|
+
51
|
|
588
|
+
52
|
|
589
|
+
53
|
|
590
|
+
54
|
|
591
|
+
55
|
|
592
|
+
56
|
|
593
|
+
57
|
|
594
|
+
58
|
|
595
|
+
59
|
|
596
|
+
60
|
|
597
|
+
61
|
|
598
|
+
62
|
|
599
|
+
63
|
|
600
|
+
64
|
|
601
|
+
65
|
|
602
|
+
66
|
|
603
|
+
67
|
|
604
|
+
68
|
|
605
|
+
69
|
|
606
|
+
70
|
|
607
|
+
71
|
|
608
|
+
72
|
|
609
|
+
73
|
|
610
|
+
74
|
|
611
|
+
75</pre>
|
|
612
|
+
</td>
|
|
613
|
+
<td>
|
|
614
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
|
|
615
|
+
|
|
616
|
+
<span class='kw'>class</span> <span class='const'>Session</span>
|
|
617
|
+
|
|
618
|
+
<span class='id identifier rubyid_include'>include</span> <span class='const'>TokenGenerator</span>
|
|
619
|
+
<span class='id identifier rubyid_generates_tokens'>generates_tokens</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
|
620
|
+
<span class='symbol'>:api_key</span> <span class='op'>=></span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_api_key'>api_key</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
|
621
|
+
<span class='symbol'>:api_secret</span> <span class='op'>=></span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_api_secret'>api_secret</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
|
622
|
+
<span class='symbol'>:session_id</span> <span class='op'>=></span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_session_id'>session_id</span> <span class='rbrace'>}</span>
|
|
623
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
624
|
+
|
|
625
|
+
<span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:session_id</span><span class='comma'>,</span> <span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:location</span><span class='comma'>,</span> <span class='symbol'>:api_key</span><span class='comma'>,</span> <span class='symbol'>:api_secret</span>
|
|
626
|
+
|
|
627
|
+
<span class='comment'># @private
|
|
628
|
+
</span> <span class='comment'># this implementation doesn't completely understand the format of a Session ID
|
|
629
|
+
</span> <span class='comment'># that is intentional, that is too much responsibility.
|
|
630
|
+
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_belongs_to_api_key?'>belongs_to_api_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span>
|
|
631
|
+
<span class='id identifier rubyid_encoded'>encoded</span> <span class='op'>=</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='lbracket'>[</span><span class='int'>2</span><span class='op'>..</span><span class='id identifier rubyid_session_id'>session_id</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rbracket'>]</span><span class='period'>
|
|
632
|
+
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>+</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>
|
|
633
|
+
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
634
|
+
<span class='id identifier rubyid_decoded'>decoded</span> <span class='op'>=</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_decode64'>decode64</span><span class='lparen'>(</span><span class='id identifier rubyid_encoded'>encoded</span><span class='rparen'>)</span>
|
|
635
|
+
<span class='id identifier rubyid_decoded'>decoded</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_api_key'>api_key</span>
|
|
636
|
+
<span class='kw'>end</span>
|
|
637
|
+
|
|
638
|
+
<span class='comment'># @private
|
|
639
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
640
|
+
<span class='ivar'>@api_key</span><span class='comma'>,</span> <span class='ivar'>@api_secret</span><span class='comma'>,</span> <span class='ivar'>@session_id</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span> <span class='id identifier rubyid_api_secret'>api_secret</span><span class='comma'>,</span> <span class='id identifier rubyid_session_id'>session_id</span>
|
|
641
|
+
<span class='ivar'>@media_mode</span><span class='comma'>,</span> <span class='ivar'>@location</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:media_mode</span><span class='comma'>,</span> <span class='symbol'>:routed</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:location</span><span class='rbracket'>]</span>
|
|
642
|
+
<span class='kw'>end</span>
|
|
643
|
+
|
|
644
|
+
<span class='comment'># @private
|
|
645
|
+
</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
|
646
|
+
<span class='ivar'>@session_id</span>
|
|
647
|
+
<span class='kw'>end</span>
|
|
648
|
+
<span class='kw'>end</span></pre>
|
|
649
|
+
</td>
|
|
650
|
+
</tr>
|
|
651
|
+
</table>
|
|
652
|
+
</div>
|
|
653
|
+
|
|
654
|
+
</div>
|
|
655
|
+
|
|
656
|
+
</div>
|
|
657
|
+
|
|
658
|
+
<div id="footer">
|
|
659
|
+
Generated on Tue May 27 13:24:51 2014 by
|
|
660
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
661
|
+
0.8.7.4 (ruby-1.9.3).
|
|
662
|
+
</div>
|
|
663
|
+
|
|
664
|
+
</body>
|
|
665
|
+
</html>
|