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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +16 -2
  3. data/.travis.yml +6 -0
  4. data/.yardopts +1 -0
  5. data/CONTRIBUTING.md +47 -0
  6. data/DEVELOPING.md +91 -0
  7. data/LICENSE +19 -5
  8. data/README.md +170 -53
  9. data/Rakefile +10 -5
  10. data/doc/OpenTok.html +411 -0
  11. data/doc/OpenTok/Archive.html +1320 -0
  12. data/doc/OpenTok/ArchiveList.html +216 -0
  13. data/doc/OpenTok/Archives.html +1028 -0
  14. data/doc/OpenTok/Client.html +695 -0
  15. data/doc/OpenTok/OpenTok.html +1046 -0
  16. data/doc/OpenTok/OpenTokArchiveError.html +142 -0
  17. data/doc/OpenTok/OpenTokAuthenticationError.html +143 -0
  18. data/doc/OpenTok/OpenTokError.html +138 -0
  19. data/doc/OpenTok/Session.html +665 -0
  20. data/doc/OpenTok/TokenGenerator.html +204 -0
  21. data/doc/OpenTok/TokenGenerator/ClassMethods.html +187 -0
  22. data/doc/README.md +15 -0
  23. data/doc/_index.html +182 -0
  24. data/doc/class_list.html +54 -0
  25. data/doc/css/common.css +1 -0
  26. data/doc/css/full_list.css +57 -0
  27. data/doc/css/style.css +339 -0
  28. data/doc/file.README.html +87 -0
  29. data/doc/file_list.html +56 -0
  30. data/doc/frames.html +26 -0
  31. data/doc/index.html +87 -0
  32. data/doc/js/app.js +219 -0
  33. data/doc/js/full_list.js +178 -0
  34. data/doc/js/jquery.js +4 -0
  35. data/doc/method_list.html +227 -0
  36. data/doc/top-level-namespace.html +112 -0
  37. data/lib/opentok.rb +3 -14
  38. data/lib/opentok/archive.rb +92 -0
  39. data/lib/opentok/archive_list.rb +17 -0
  40. data/lib/opentok/archives.rb +120 -0
  41. data/lib/opentok/client.rb +125 -0
  42. data/lib/opentok/constants.rb +5 -0
  43. data/lib/opentok/exceptions.rb +10 -0
  44. data/lib/opentok/opentok.rb +174 -0
  45. data/lib/opentok/session.rb +76 -0
  46. data/lib/opentok/token_generator.rb +101 -0
  47. data/lib/opentok/version.rb +4 -0
  48. data/opentok.gemspec +29 -22
  49. data/sample/Archiving/Gemfile +4 -0
  50. data/sample/Archiving/README.md +212 -0
  51. data/sample/Archiving/archiving_sample.rb +80 -0
  52. data/sample/Archiving/public/css/sample.css +22 -0
  53. data/sample/Archiving/public/img/archiving-off.png +0 -0
  54. data/sample/Archiving/public/img/archiving-on-idle.png +0 -0
  55. data/sample/Archiving/public/img/archiving-on-message.png +0 -0
  56. data/sample/Archiving/public/js/host.js +37 -0
  57. data/sample/Archiving/public/js/participant.js +13 -0
  58. data/sample/Archiving/views/history.erb +65 -0
  59. data/sample/Archiving/views/host.erb +69 -0
  60. data/sample/Archiving/views/index.erb +48 -0
  61. data/sample/Archiving/views/layout.erb +29 -0
  62. data/sample/Archiving/views/participant.erb +55 -0
  63. data/sample/HelloWorld/Gemfile +4 -0
  64. data/sample/HelloWorld/README.md +123 -0
  65. data/sample/HelloWorld/hello_world.rb +27 -0
  66. data/sample/HelloWorld/public/js/helloworld.js +32 -0
  67. data/sample/HelloWorld/views/index.erb +21 -0
  68. data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +48 -0
  69. data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +49 -0
  70. data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +32 -0
  71. data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +46 -0
  72. data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +48 -0
  73. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +104 -0
  74. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +71 -0
  75. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +60 -0
  76. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +82 -0
  77. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +39 -0
  78. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +39 -0
  79. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +39 -0
  80. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +39 -0
  81. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml +39 -0
  82. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +39 -0
  83. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +39 -0
  84. data/spec/matchers/token.rb +48 -0
  85. data/spec/opentok/archives_spec.rb +91 -0
  86. data/spec/opentok/opentok_spec.rb +144 -0
  87. data/spec/opentok/session_spec.rb +71 -0
  88. data/spec/shared/opentok_generates_tokens.rb +62 -0
  89. data/spec/shared/session_generates_tokens.rb +63 -0
  90. data/spec/spec_helper.rb +6 -7
  91. metadata +197 -59
  92. data/.rspec +0 -3
  93. data/CHANGES +0 -33
  94. data/doc/reference.md +0 -122
  95. data/lib/open_tok/archive.rb +0 -53
  96. data/lib/open_tok/archive_timeline_event.rb +0 -22
  97. data/lib/open_tok/archive_video_resource.rb +0 -28
  98. data/lib/open_tok/exception.rb +0 -50
  99. data/lib/open_tok/open_tok_sdk.rb +0 -198
  100. data/lib/open_tok/request.rb +0 -63
  101. data/lib/open_tok/role_constants.rb +0 -18
  102. data/lib/open_tok/session.rb +0 -25
  103. data/lib/open_tok/session_property_constants.rb +0 -30
  104. data/lib/open_tok/utils.rb +0 -10
  105. data/lib/open_tok/version.rb +0 -5
  106. data/sample/sample.rb +0 -26
  107. data/spec/cassettes/archives.yml +0 -83
  108. data/spec/cassettes/deleteArchive.yml +0 -91
  109. data/spec/cassettes/invalidSession.yml +0 -41
  110. data/spec/cassettes/session.yml +0 -46
  111. data/spec/cassettes/stitchArchive.yml +0 -42
  112. data/spec/opentok_exception_spec.rb +0 -38
  113. data/spec/opentok_spec.rb +0 -135
data/Rakefile CHANGED
@@ -1,7 +1,12 @@
1
- require 'bundler'
2
- require 'rspec/core/rake_task'
3
-
4
- Bundler::GemHelper.install_tasks
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "yard"
5
4
 
6
5
  RSpec::Core::RakeTask.new(:spec)
7
- task :default => :spec
6
+
7
+ YARD::Rake::YardocTask.new do |t|
8
+ # t.files = ['lib/**/*.rb', OTHER_PATHS] # optional
9
+ # t.options = ['--any', '--extra', '--opts'] # optional
10
+ end
11
+
12
+ task :default => :spec
@@ -0,0 +1,411 @@
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
+ Module: OpenTok
8
+
9
+ &mdash; 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.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> &raquo;
35
+
36
+
37
+ <span class="title">OpenTok</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>Module: OpenTok
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/opentok.rb<span class="defines">,<br />
83
+ lib/opentok/client.rb,<br /> lib/opentok/session.rb,<br /> lib/opentok/version.rb,<br /> lib/opentok/opentok.rb,<br /> lib/opentok/archive.rb,<br /> lib/opentok/archives.rb,<br /> lib/opentok/constants.rb,<br /> lib/opentok/exceptions.rb,<br /> lib/opentok/archive_list.rb,<br /> lib/opentok/token_generator.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>Namespace for classes and modules in the OpenTok 2.2 Ruby SDK.</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+
105
+
106
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="OpenTok/Archive.html" title="OpenTok::Archive (class)">Archive</a></span>, <span class='object_link'><a href="OpenTok/ArchiveList.html" title="OpenTok::ArchiveList (class)">ArchiveList</a></span>, <span class='object_link'><a href="OpenTok/Archives.html" title="OpenTok::Archives (class)">Archives</a></span>, <span class='object_link'><a href="OpenTok/OpenTok.html" title="OpenTok::OpenTok (class)">OpenTok</a></span>, <span class='object_link'><a href="OpenTok/OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span>, <span class='object_link'><a href="OpenTok/OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span>, <span class='object_link'><a href="OpenTok/OpenTokError.html" title="OpenTok::OpenTokError (class)">OpenTokError</a></span>, <span class='object_link'><a href="OpenTok/Session.html" title="OpenTok::Session (class)">Session</a></span>
107
+
108
+
109
+ </p>
110
+
111
+ <h2>Constant Summary</h2>
112
+
113
+ <dl class="constants">
114
+
115
+ <dt id="API_URL-constant" class="">API_URL =
116
+
117
+ </dt>
118
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>https://api.opentok.com</span><span class='tstring_end'>&quot;</span></span></pre></dd>
119
+
120
+ <dt id="TOKEN_SENTINEL-constant" class="">TOKEN_SENTINEL =
121
+
122
+ </dt>
123
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>T1==</span><span class='tstring_end'>&quot;</span></span></pre></dd>
124
+
125
+ <dt id="ROLES-constant" class="">ROLES =
126
+
127
+ </dt>
128
+ <dd><pre class="code"><span class='lbrace'>{</span> <span class='label'>subscriber:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>subscriber</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>publisher:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>publisher</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>moderator:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>moderator</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span></pre></dd>
129
+
130
+ </dl>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <h2>
141
+ Instance Method Summary
142
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
143
+ </h2>
144
+
145
+ <ul class="summary">
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#generate_token-instance_method" title="#generate_token (instance method)">- (String) <strong>generate_token</strong>(options) </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ <span class="summary_desc"><div class='inline'>
165
+ <p>Generates a token for a given session.</p>
166
+ </div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+
176
+ <div id="instance_method_details" class="method_details_list">
177
+ <h2>Instance Method Details</h2>
178
+
179
+
180
+ <div class="method_details first">
181
+ <h3 class="signature first" id="generate_token-instance_method">
182
+
183
+ - (<tt>String</tt>) <strong>generate_token</strong>(options)
184
+
185
+
186
+
187
+
188
+
189
+ </h3><div class="docstring">
190
+ <div class="discussion">
191
+
192
+ <p>Generates a token for a given session.</p>
193
+
194
+
195
+ </div>
196
+ </div>
197
+ <div class="tags">
198
+ <p class="tag_title">Parameters:</p>
199
+ <ul class="param">
200
+
201
+ <li>
202
+
203
+ <span class='name'>sessioin_id</span>
204
+
205
+
206
+ <span class='type'>(<tt>String</tt>)</span>
207
+
208
+
209
+
210
+ &mdash;
211
+ <div class='inline'>
212
+ <p>The session ID of the session to be accessed by the client using the token.</p>
213
+ </div>
214
+
215
+ </li>
216
+
217
+ <li>
218
+
219
+ <span class='name'>options</span>
220
+
221
+
222
+ <span class='type'>(<tt>Hash</tt>)</span>
223
+
224
+
225
+
226
+ &mdash;
227
+ <div class='inline'>
228
+ <p>A hash defining options for the token.</p>
229
+ </div>
230
+
231
+ </li>
232
+
233
+ </ul>
234
+
235
+
236
+
237
+
238
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
239
+ <ul class="option">
240
+
241
+ <li>
242
+ <span class="name">:role</span>
243
+ <span class="type">(<tt>String</tt>)</span>
244
+ <span class="default">
245
+
246
+ </span>
247
+
248
+ &mdash; <div class='inline'>
249
+ <p>The role for the token. Set this to one of the following values:</p>
250
+ <ul><li>
251
+ <p><tt>:subscriber</tt> -- A subscriber can only subscribe to streams.</p>
252
+ </li><li>
253
+ <p><tt>:publisher</tt> -- A publisher can publish streams, subscribe to
254
+ streams, and signal. (This is the default value if you do not specify a
255
+ role.)</p>
256
+ </li><li>
257
+ <p><tt>:moderator</tt> -- In addition to the privileges granted to a
258
+ publisher, in clients using the OpenTok.js 2.2 library, a moderator can
259
+ call the <tt>forceUnpublish()</tt> and <tt>forceDisconnect()</tt> method of
260
+ the Session object.</p>
261
+ </li></ul>
262
+ </div>
263
+
264
+ </li>
265
+
266
+ <li>
267
+ <span class="name">:expire_time</span>
268
+ <span class="type">(<tt>integer</tt>)</span>
269
+ <span class="default">
270
+
271
+ </span>
272
+
273
+ &mdash; <div class='inline'>
274
+ <p>The expiration time, in seconds since the UNIX epoch. Pass in 0 to use the
275
+ default expiration time of 24 hours after the token creation time. The
276
+ maximum expiration time is 30 days after the creation time.</p>
277
+ </div>
278
+
279
+ </li>
280
+
281
+ <li>
282
+ <span class="name">:data</span>
283
+ <span class="type">(<tt>String</tt>)</span>
284
+ <span class="default">
285
+
286
+ </span>
287
+
288
+ &mdash; <div class='inline'>
289
+ <p>A string containing connection metadata describing the end-user. For
290
+ example, you can pass the user ID, name, or other data describing the
291
+ end-user. The length of the string is limited to 1000 characters. This data
292
+ cannot be updated once it is set.</p>
293
+ </div>
294
+
295
+ </li>
296
+
297
+ </ul>
298
+
299
+
300
+ <p class="tag_title">Returns:</p>
301
+ <ul class="return">
302
+
303
+ <li>
304
+
305
+
306
+ <span class='type'>(<tt>String</tt>)</span>
307
+
308
+
309
+
310
+ &mdash;
311
+ <div class='inline'>
312
+ <p>The token string.</p>
313
+ </div>
314
+
315
+ </li>
316
+
317
+ </ul>
318
+
319
+ </div><table class="source_code">
320
+ <tr>
321
+ <td>
322
+ <pre class="lines">
323
+
324
+
325
+ 43
326
+ 44
327
+ 45
328
+ 46
329
+ 47
330
+ 48
331
+ 49
332
+ 50
333
+ 51
334
+ 52
335
+ 53
336
+ 54
337
+ 55
338
+ 56
339
+ 57
340
+ 58
341
+ 59
342
+ 60
343
+ 61
344
+ 62
345
+ 63
346
+ 64
347
+ 65
348
+ 66
349
+ 67
350
+ 68
351
+ 69
352
+ 70
353
+ 71
354
+ 72
355
+ 73
356
+ 74
357
+ 75</pre>
358
+ </td>
359
+ <td>
360
+ <pre class="code"><span class="info file"># File 'lib/opentok/session.rb', line 43</span>
361
+
362
+ <span class='kw'>class</span> <span class='const'>Session</span>
363
+
364
+ <span class='id identifier rubyid_include'>include</span> <span class='const'>TokenGenerator</span>
365
+ <span class='id identifier rubyid_generates_tokens'>generates_tokens</span><span class='lparen'>(</span><span class='lbrace'>{</span>
366
+ <span class='symbol'>:api_key</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</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>
367
+ <span class='symbol'>:api_secret</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</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>
368
+ <span class='symbol'>:session_id</span> <span class='op'>=&gt;</span> <span class='tlambda'>-&gt;</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>
369
+ <span class='rbrace'>}</span><span class='rparen'>)</span>
370
+
371
+ <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>
372
+
373
+ <span class='comment'># @private
374
+ </span> <span class='comment'># this implementation doesn't completely understand the format of a Session ID
375
+ </span> <span class='comment'># that is intentional, that is too much responsibility.
376
+ </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>
377
+ <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'>
378
+ </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'>
379
+ </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>
380
+ <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>
381
+ <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>
382
+ <span class='kw'>end</span>
383
+
384
+ <span class='comment'># @private
385
+ </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>
386
+ <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>
387
+ <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>
388
+ <span class='kw'>end</span>
389
+
390
+ <span class='comment'># @private
391
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
392
+ <span class='ivar'>@session_id</span>
393
+ <span class='kw'>end</span>
394
+ <span class='kw'>end</span></pre>
395
+ </td>
396
+ </tr>
397
+ </table>
398
+ </div>
399
+
400
+ </div>
401
+
402
+ </div>
403
+
404
+ <div id="footer">
405
+ Generated on Tue May 27 13:24:51 2014 by
406
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
407
+ 0.8.7.4 (ruby-1.9.3).
408
+ </div>
409
+
410
+ </body>
411
+ </html>
@@ -0,0 +1,1320 @@
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::Archive
8
+
9
+ &mdash; 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/Archive.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 (A)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
36
+ &raquo;
37
+ <span class="title">Archive</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::Archive
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::Archive</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/archive.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 archive of an OpenTok session.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#created_at-instance_method" title="#created_at (instance method)">- (int) <strong>created_at</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'>
141
+ <p>The time at which the archive was created, in milliseconds since the UNIX
142
+ epoch.</p>
143
+ </div></span>
144
+
145
+ </li>
146
+
147
+
148
+ <li class="public ">
149
+ <span class="summary_signature">
150
+
151
+ <a href="#duration-instance_method" title="#duration (instance method)">- (string) <strong>duration</strong> </a>
152
+
153
+
154
+
155
+ </span>
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>The duration of the archive, in milliseconds.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#id-instance_method" title="#id (instance method)">- (string) <strong>id</strong> </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'>
196
+ <p>The archive ID.</p>
197
+ </div></span>
198
+
199
+ </li>
200
+
201
+
202
+ <li class="public ">
203
+ <span class="summary_signature">
204
+
205
+ <a href="#name-instance_method" title="#name (instance method)">- (string) <strong>name</strong> </a>
206
+
207
+
208
+
209
+ </span>
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'>
223
+ <p>The name of the archive.</p>
224
+ </div></span>
225
+
226
+ </li>
227
+
228
+
229
+ <li class="public ">
230
+ <span class="summary_signature">
231
+
232
+ <a href="#partner_id-instance_method" title="#partner_id (instance method)">- (string) <strong>partner_id</strong> </a>
233
+
234
+
235
+
236
+ </span>
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <span class="summary_desc"><div class='inline'>
250
+ <p>The API key associated with the archive.</p>
251
+ </div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#reason-instance_method" title="#reason (instance method)">- (string) <strong>reason</strong> </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <span class="summary_desc"><div class='inline'>
277
+ <p>For archives with the status "stopped", this can be set to "90 mins
278
+ exceeded", "failure", "session ended", or "user initiated".</p>
279
+ </div></span>
280
+
281
+ </li>
282
+
283
+
284
+ <li class="public ">
285
+ <span class="summary_signature">
286
+
287
+ <a href="#session_id-instance_method" title="#session_id (instance method)">- (string) <strong>session_id</strong> </a>
288
+
289
+
290
+
291
+ </span>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+ <span class="summary_desc"><div class='inline'>
305
+ <p>The session ID of the OpenTok session associated with this archive.</p>
306
+ </div></span>
307
+
308
+ </li>
309
+
310
+
311
+ <li class="public ">
312
+ <span class="summary_signature">
313
+
314
+ <a href="#size-instance_method" title="#size (instance method)">- (float) <strong>size</strong> </a>
315
+
316
+
317
+
318
+ </span>
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+ <span class="summary_desc"><div class='inline'>
332
+ <p>The size of the MP4 file.</p>
333
+ </div></span>
334
+
335
+ </li>
336
+
337
+
338
+ <li class="public ">
339
+ <span class="summary_signature">
340
+
341
+ <a href="#status-instance_method" title="#status (instance method)">- (string) <strong>status</strong> </a>
342
+
343
+
344
+
345
+ </span>
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+ <span class="summary_desc"><div class='inline'>
359
+ <p>The status of the archive, which can be one of the following:.</p>
360
+ </div></span>
361
+
362
+ </li>
363
+
364
+
365
+ <li class="public ">
366
+ <span class="summary_signature">
367
+
368
+ <a href="#url-instance_method" title="#url (instance method)">- (string) <strong>url</strong> </a>
369
+
370
+
371
+
372
+ </span>
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+ <span class="summary_desc"><div class='inline'>
386
+ <p>The download URL of the available MP4 file.</p>
387
+ </div></span>
388
+
389
+ </li>
390
+
391
+
392
+ </ul>
393
+
394
+
395
+
396
+
397
+
398
+ <h2>
399
+ Instance Method Summary
400
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
401
+ </h2>
402
+
403
+ <ul class="summary">
404
+
405
+ <li class="public ">
406
+ <span class="summary_signature">
407
+
408
+ <a href="#delete-instance_method" title="#delete (instance method)">- (Object) <strong>delete</strong> </a>
409
+
410
+
411
+
412
+ </span>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <span class="summary_desc"><div class='inline'>
423
+ <p>Deletes an OpenTok archive.</p>
424
+ </div></span>
425
+
426
+ </li>
427
+
428
+
429
+ <li class="public ">
430
+ <span class="summary_signature">
431
+
432
+ <a href="#stop-instance_method" title="#stop (instance method)">- (Object) <strong>stop</strong> </a>
433
+
434
+
435
+
436
+ </span>
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ <span class="summary_desc"><div class='inline'>
447
+ <p>Stops an OpenTok archive that is being recorded.</p>
448
+ </div></span>
449
+
450
+ </li>
451
+
452
+
453
+ <li class="public ">
454
+ <span class="summary_signature">
455
+
456
+ <a href="#to_json-instance_method" title="#to_json (instance method)">- (Object) <strong>to_json</strong> </a>
457
+
458
+
459
+
460
+ </span>
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+ <span class="summary_desc"><div class='inline'>
471
+ <p>A JSON encoded string representation of the archive.</p>
472
+ </div></span>
473
+
474
+ </li>
475
+
476
+
477
+ </ul>
478
+
479
+
480
+ <div id="method_missing_details" class="method_details_list">
481
+ <h2>Dynamic Method Handling</h2>
482
+ <p class="notice this">
483
+ This class handles dynamic methods through the <tt>method_missing</tt> method
484
+
485
+ </p>
486
+
487
+ <div class="method_details first">
488
+ <h3 class="signature first" id="method_missing-instance_method">
489
+
490
+ - (<tt>Object</tt>) <strong>method_missing</strong>(method, *args, &amp;block)
491
+
492
+
493
+
494
+
495
+
496
+ </h3><table class="source_code">
497
+ <tr>
498
+ <td>
499
+ <pre class="lines">
500
+
501
+
502
+ 82
503
+ 83
504
+ 84
505
+ 85
506
+ 86
507
+ 87
508
+ 88
509
+ 89
510
+ 90</pre>
511
+ </td>
512
+ <td>
513
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 82</span>
514
+
515
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
516
+ <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='symbol'>:lower</span><span class='rparen'>)</span>
517
+ <span class='kw'>if</span> <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='kw'>and</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
518
+ <span class='comment'># TODO: convert create_time method call to a Time object
519
+ </span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span>
520
+ <span class='kw'>else</span>
521
+ <span class='kw'>super</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
522
+ <span class='kw'>end</span>
523
+ <span class='kw'>end</span></pre>
524
+ </td>
525
+ </tr>
526
+ </table>
527
+ </div>
528
+
529
+ </div>
530
+
531
+ <div id="instance_attr_details" class="attr_details">
532
+ <h2>Instance Attribute Details</h2>
533
+
534
+
535
+ <span id="created_at=-instance_method"></span>
536
+ <div class="method_details first">
537
+ <h3 class="signature first" id="created_at-instance_method">
538
+
539
+ - (<tt>int</tt>) <strong>created_at</strong>
540
+
541
+
542
+
543
+
544
+
545
+ </h3><div class="docstring">
546
+ <div class="discussion">
547
+
548
+ <p>The time at which the archive was created, in milliseconds since the UNIX
549
+ epoch.</p>
550
+
551
+
552
+ </div>
553
+ </div>
554
+ <div class="tags">
555
+
556
+ <p class="tag_title">Returns:</p>
557
+ <ul class="return">
558
+
559
+ <li>
560
+
561
+
562
+ <span class='type'>(<tt>int</tt>)</span>
563
+
564
+
565
+
566
+ &mdash;
567
+ <div class='inline'>
568
+ <p>the current value of created_at</p>
569
+ </div>
570
+
571
+ </li>
572
+
573
+ </ul>
574
+
575
+ </div><table class="source_code">
576
+ <tr>
577
+ <td>
578
+ <pre class="lines">
579
+
580
+
581
+ 48
582
+ 49
583
+ 50</pre>
584
+ </td>
585
+ <td>
586
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
587
+
588
+ <span class='kw'>def</span> <span class='id identifier rubyid_created_at'>created_at</span>
589
+ <span class='ivar'>@created_at</span>
590
+ <span class='kw'>end</span></pre>
591
+ </td>
592
+ </tr>
593
+ </table>
594
+ </div>
595
+
596
+
597
+ <span id="duration=-instance_method"></span>
598
+ <div class="method_details ">
599
+ <h3 class="signature " id="duration-instance_method">
600
+
601
+ - (<tt>string</tt>) <strong>duration</strong>
602
+
603
+
604
+
605
+
606
+
607
+ </h3><div class="docstring">
608
+ <div class="discussion">
609
+
610
+ <p>The duration of the archive, in milliseconds.</p>
611
+
612
+
613
+ </div>
614
+ </div>
615
+ <div class="tags">
616
+
617
+ <p class="tag_title">Returns:</p>
618
+ <ul class="return">
619
+
620
+ <li>
621
+
622
+
623
+ <span class='type'>(<tt>string</tt>)</span>
624
+
625
+
626
+
627
+ &mdash;
628
+ <div class='inline'>
629
+ <p>the current value of duration</p>
630
+ </div>
631
+
632
+ </li>
633
+
634
+ </ul>
635
+
636
+ </div><table class="source_code">
637
+ <tr>
638
+ <td>
639
+ <pre class="lines">
640
+
641
+
642
+ 48
643
+ 49
644
+ 50</pre>
645
+ </td>
646
+ <td>
647
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
648
+
649
+ <span class='kw'>def</span> <span class='id identifier rubyid_duration'>duration</span>
650
+ <span class='ivar'>@duration</span>
651
+ <span class='kw'>end</span></pre>
652
+ </td>
653
+ </tr>
654
+ </table>
655
+ </div>
656
+
657
+
658
+ <span id="id=-instance_method"></span>
659
+ <div class="method_details ">
660
+ <h3 class="signature " id="id-instance_method">
661
+
662
+ - (<tt>string</tt>) <strong>id</strong>
663
+
664
+
665
+
666
+
667
+
668
+ </h3><div class="docstring">
669
+ <div class="discussion">
670
+
671
+ <p>The archive ID.</p>
672
+
673
+
674
+ </div>
675
+ </div>
676
+ <div class="tags">
677
+
678
+ <p class="tag_title">Returns:</p>
679
+ <ul class="return">
680
+
681
+ <li>
682
+
683
+
684
+ <span class='type'>(<tt>string</tt>)</span>
685
+
686
+
687
+
688
+ &mdash;
689
+ <div class='inline'>
690
+ <p>the current value of id</p>
691
+ </div>
692
+
693
+ </li>
694
+
695
+ </ul>
696
+
697
+ </div><table class="source_code">
698
+ <tr>
699
+ <td>
700
+ <pre class="lines">
701
+
702
+
703
+ 48
704
+ 49
705
+ 50</pre>
706
+ </td>
707
+ <td>
708
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
709
+
710
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
711
+ <span class='ivar'>@id</span>
712
+ <span class='kw'>end</span></pre>
713
+ </td>
714
+ </tr>
715
+ </table>
716
+ </div>
717
+
718
+
719
+ <span id="name=-instance_method"></span>
720
+ <div class="method_details ">
721
+ <h3 class="signature " id="name-instance_method">
722
+
723
+ - (<tt>string</tt>) <strong>name</strong>
724
+
725
+
726
+
727
+
728
+
729
+ </h3><div class="docstring">
730
+ <div class="discussion">
731
+
732
+ <p>The name of the archive. If no name was provided when the archive was
733
+ created, this is set to null.</p>
734
+
735
+
736
+ </div>
737
+ </div>
738
+ <div class="tags">
739
+
740
+ <p class="tag_title">Returns:</p>
741
+ <ul class="return">
742
+
743
+ <li>
744
+
745
+
746
+ <span class='type'>(<tt>string</tt>)</span>
747
+
748
+
749
+
750
+ &mdash;
751
+ <div class='inline'>
752
+ <p>the current value of name</p>
753
+ </div>
754
+
755
+ </li>
756
+
757
+ </ul>
758
+
759
+ </div><table class="source_code">
760
+ <tr>
761
+ <td>
762
+ <pre class="lines">
763
+
764
+
765
+ 48
766
+ 49
767
+ 50</pre>
768
+ </td>
769
+ <td>
770
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
771
+
772
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
773
+ <span class='ivar'>@name</span>
774
+ <span class='kw'>end</span></pre>
775
+ </td>
776
+ </tr>
777
+ </table>
778
+ </div>
779
+
780
+
781
+ <span id="partner_id=-instance_method"></span>
782
+ <div class="method_details ">
783
+ <h3 class="signature " id="partner_id-instance_method">
784
+
785
+ - (<tt>string</tt>) <strong>partner_id</strong>
786
+
787
+
788
+
789
+
790
+
791
+ </h3><div class="docstring">
792
+ <div class="discussion">
793
+
794
+ <p>The API key associated with the archive.</p>
795
+
796
+
797
+ </div>
798
+ </div>
799
+ <div class="tags">
800
+
801
+ <p class="tag_title">Returns:</p>
802
+ <ul class="return">
803
+
804
+ <li>
805
+
806
+
807
+ <span class='type'>(<tt>string</tt>)</span>
808
+
809
+
810
+
811
+ &mdash;
812
+ <div class='inline'>
813
+ <p>the current value of partner_id</p>
814
+ </div>
815
+
816
+ </li>
817
+
818
+ </ul>
819
+
820
+ </div><table class="source_code">
821
+ <tr>
822
+ <td>
823
+ <pre class="lines">
824
+
825
+
826
+ 48
827
+ 49
828
+ 50</pre>
829
+ </td>
830
+ <td>
831
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
832
+
833
+ <span class='kw'>def</span> <span class='id identifier rubyid_partner_id'>partner_id</span>
834
+ <span class='ivar'>@partner_id</span>
835
+ <span class='kw'>end</span></pre>
836
+ </td>
837
+ </tr>
838
+ </table>
839
+ </div>
840
+
841
+
842
+ <span id="reason=-instance_method"></span>
843
+ <div class="method_details ">
844
+ <h3 class="signature " id="reason-instance_method">
845
+
846
+ - (<tt>string</tt>) <strong>reason</strong>
847
+
848
+
849
+
850
+
851
+
852
+ </h3><div class="docstring">
853
+ <div class="discussion">
854
+
855
+ <p>For archives with the status "stopped", this can be set to "90 mins
856
+ exceeded", "failure", "session ended", or "user initiated". For archives
857
+ with the status "failed", this can be set to "system failure".</p>
858
+
859
+
860
+ </div>
861
+ </div>
862
+ <div class="tags">
863
+
864
+ <p class="tag_title">Returns:</p>
865
+ <ul class="return">
866
+
867
+ <li>
868
+
869
+
870
+ <span class='type'>(<tt>string</tt>)</span>
871
+
872
+
873
+
874
+ &mdash;
875
+ <div class='inline'>
876
+ <p>the current value of reason</p>
877
+ </div>
878
+
879
+ </li>
880
+
881
+ </ul>
882
+
883
+ </div><table class="source_code">
884
+ <tr>
885
+ <td>
886
+ <pre class="lines">
887
+
888
+
889
+ 48
890
+ 49
891
+ 50</pre>
892
+ </td>
893
+ <td>
894
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
895
+
896
+ <span class='kw'>def</span> <span class='id identifier rubyid_reason'>reason</span>
897
+ <span class='ivar'>@reason</span>
898
+ <span class='kw'>end</span></pre>
899
+ </td>
900
+ </tr>
901
+ </table>
902
+ </div>
903
+
904
+
905
+ <span id="session_id=-instance_method"></span>
906
+ <div class="method_details ">
907
+ <h3 class="signature " id="session_id-instance_method">
908
+
909
+ - (<tt>string</tt>) <strong>session_id</strong>
910
+
911
+
912
+
913
+
914
+
915
+ </h3><div class="docstring">
916
+ <div class="discussion">
917
+
918
+ <p>The session ID of the OpenTok session associated with this archive.</p>
919
+
920
+
921
+ </div>
922
+ </div>
923
+ <div class="tags">
924
+
925
+ <p class="tag_title">Returns:</p>
926
+ <ul class="return">
927
+
928
+ <li>
929
+
930
+
931
+ <span class='type'>(<tt>string</tt>)</span>
932
+
933
+
934
+
935
+ &mdash;
936
+ <div class='inline'>
937
+ <p>the current value of session_id</p>
938
+ </div>
939
+
940
+ </li>
941
+
942
+ </ul>
943
+
944
+ </div><table class="source_code">
945
+ <tr>
946
+ <td>
947
+ <pre class="lines">
948
+
949
+
950
+ 48
951
+ 49
952
+ 50</pre>
953
+ </td>
954
+ <td>
955
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
956
+
957
+ <span class='kw'>def</span> <span class='id identifier rubyid_session_id'>session_id</span>
958
+ <span class='ivar'>@session_id</span>
959
+ <span class='kw'>end</span></pre>
960
+ </td>
961
+ </tr>
962
+ </table>
963
+ </div>
964
+
965
+
966
+ <span id="size=-instance_method"></span>
967
+ <div class="method_details ">
968
+ <h3 class="signature " id="size-instance_method">
969
+
970
+ - (<tt>float</tt>) <strong>size</strong>
971
+
972
+
973
+
974
+
975
+
976
+ </h3><div class="docstring">
977
+ <div class="discussion">
978
+
979
+ <p>The size of the MP4 file. For archives that have not been generated, this
980
+ value is set to 0.</p>
981
+
982
+
983
+ </div>
984
+ </div>
985
+ <div class="tags">
986
+
987
+ <p class="tag_title">Returns:</p>
988
+ <ul class="return">
989
+
990
+ <li>
991
+
992
+
993
+ <span class='type'>(<tt>float</tt>)</span>
994
+
995
+
996
+
997
+ &mdash;
998
+ <div class='inline'>
999
+ <p>the current value of size</p>
1000
+ </div>
1001
+
1002
+ </li>
1003
+
1004
+ </ul>
1005
+
1006
+ </div><table class="source_code">
1007
+ <tr>
1008
+ <td>
1009
+ <pre class="lines">
1010
+
1011
+
1012
+ 48
1013
+ 49
1014
+ 50</pre>
1015
+ </td>
1016
+ <td>
1017
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
1018
+
1019
+ <span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span>
1020
+ <span class='ivar'>@size</span>
1021
+ <span class='kw'>end</span></pre>
1022
+ </td>
1023
+ </tr>
1024
+ </table>
1025
+ </div>
1026
+
1027
+
1028
+ <span id="status=-instance_method"></span>
1029
+ <div class="method_details ">
1030
+ <h3 class="signature " id="status-instance_method">
1031
+
1032
+ - (<tt>string</tt>) <strong>status</strong>
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+ </h3><div class="docstring">
1039
+ <div class="discussion">
1040
+
1041
+ <p>The status of the archive, which can be one of the following:</p>
1042
+ <ul><li>
1043
+ <p>"available" -- The archive is available for download from the OpenTok
1044
+ cloud.</p>
1045
+ </li><li>
1046
+ <p>"failed" -- The archive recording failed.</p>
1047
+ </li><li>
1048
+ <p>"started" -- The archive started and is in the process of being recorded.</p>
1049
+ </li><li>
1050
+ <p>"stopped" -- The archive stopped recording.</p>
1051
+ </li><li>
1052
+ <p>"uploaded" -- The archive is available for download from the the upload
1053
+ target S3 bucket.</p>
1054
+ </li></ul>
1055
+
1056
+
1057
+ </div>
1058
+ </div>
1059
+ <div class="tags">
1060
+
1061
+ <p class="tag_title">Returns:</p>
1062
+ <ul class="return">
1063
+
1064
+ <li>
1065
+
1066
+
1067
+ <span class='type'>(<tt>string</tt>)</span>
1068
+
1069
+
1070
+
1071
+ &mdash;
1072
+ <div class='inline'>
1073
+ <p>the current value of status</p>
1074
+ </div>
1075
+
1076
+ </li>
1077
+
1078
+ </ul>
1079
+
1080
+ </div><table class="source_code">
1081
+ <tr>
1082
+ <td>
1083
+ <pre class="lines">
1084
+
1085
+
1086
+ 48
1087
+ 49
1088
+ 50</pre>
1089
+ </td>
1090
+ <td>
1091
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
1092
+
1093
+ <span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
1094
+ <span class='ivar'>@status</span>
1095
+ <span class='kw'>end</span></pre>
1096
+ </td>
1097
+ </tr>
1098
+ </table>
1099
+ </div>
1100
+
1101
+
1102
+ <span id="url=-instance_method"></span>
1103
+ <div class="method_details ">
1104
+ <h3 class="signature " id="url-instance_method">
1105
+
1106
+ - (<tt>string</tt>) <strong>url</strong>
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+ </h3><div class="docstring">
1113
+ <div class="discussion">
1114
+
1115
+ <p>The download URL of the available MP4 file. This is only set for an archive
1116
+ with the status set to "available"; for other archives, (including archives
1117
+ with the status "uploaded") this property is set to null. The download URL
1118
+ is obfuscated, and the file is only available from the URL for 10 minutes.
1119
+ To generate a new URL, call the Archive.listArchives() or
1120
+ OpenTok.getArchive() method.</p>
1121
+
1122
+
1123
+ </div>
1124
+ </div>
1125
+ <div class="tags">
1126
+
1127
+ <p class="tag_title">Returns:</p>
1128
+ <ul class="return">
1129
+
1130
+ <li>
1131
+
1132
+
1133
+ <span class='type'>(<tt>string</tt>)</span>
1134
+
1135
+
1136
+
1137
+ &mdash;
1138
+ <div class='inline'>
1139
+ <p>the current value of url</p>
1140
+ </div>
1141
+
1142
+ </li>
1143
+
1144
+ </ul>
1145
+
1146
+ </div><table class="source_code">
1147
+ <tr>
1148
+ <td>
1149
+ <pre class="lines">
1150
+
1151
+
1152
+ 48
1153
+ 49
1154
+ 50</pre>
1155
+ </td>
1156
+ <td>
1157
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 48</span>
1158
+
1159
+ <span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
1160
+ <span class='ivar'>@url</span>
1161
+ <span class='kw'>end</span></pre>
1162
+ </td>
1163
+ </tr>
1164
+ </table>
1165
+ </div>
1166
+
1167
+ </div>
1168
+
1169
+
1170
+ <div id="instance_method_details" class="method_details_list">
1171
+ <h2>Instance Method Details</h2>
1172
+
1173
+
1174
+ <div class="method_details first">
1175
+ <h3 class="signature first" id="delete-instance_method">
1176
+
1177
+ - (<tt>Object</tt>) <strong>delete</strong>
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+ </h3><div class="docstring">
1184
+ <div class="discussion">
1185
+
1186
+ <p>Deletes an OpenTok archive.</p>
1187
+
1188
+ <p>You can only delete an archive which has a status of "available" or
1189
+ "uploaded". Deleting an archive removes its record from the list of
1190
+ archives. For an "available" archive, it also removes the archive file,
1191
+ making it unavailable for download.</p>
1192
+
1193
+
1194
+ </div>
1195
+ </div>
1196
+ <div class="tags">
1197
+
1198
+
1199
+ </div><table class="source_code">
1200
+ <tr>
1201
+ <td>
1202
+ <pre class="lines">
1203
+
1204
+
1205
+ 76
1206
+ 77
1207
+ 78
1208
+ 79</pre>
1209
+ </td>
1210
+ <td>
1211
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 76</span>
1212
+
1213
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
1214
+ <span class='comment'># TODO: validate returned json fits schema
1215
+ </span> <span class='ivar'>@json</span> <span class='op'>=</span> <span class='ivar'>@interface</span><span class='period'>.</span><span class='id identifier rubyid_delete_by_id'>delete_by_id</span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
1216
+ <span class='kw'>end</span></pre>
1217
+ </td>
1218
+ </tr>
1219
+ </table>
1220
+ </div>
1221
+
1222
+ <div class="method_details ">
1223
+ <h3 class="signature " id="stop-instance_method">
1224
+
1225
+ - (<tt>Object</tt>) <strong>stop</strong>
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+ </h3><div class="docstring">
1232
+ <div class="discussion">
1233
+
1234
+ <p>Stops an OpenTok archive that is being recorded.</p>
1235
+
1236
+ <p>Archives automatically stop recording after 90 minutes or when all clients
1237
+ have disconnected from the session being archived.</p>
1238
+
1239
+
1240
+ </div>
1241
+ </div>
1242
+ <div class="tags">
1243
+
1244
+
1245
+ </div><table class="source_code">
1246
+ <tr>
1247
+ <td>
1248
+ <pre class="lines">
1249
+
1250
+
1251
+ 66
1252
+ 67
1253
+ 68
1254
+ 69</pre>
1255
+ </td>
1256
+ <td>
1257
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>
1258
+
1259
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
1260
+ <span class='comment'># TODO: validate returned json fits schema
1261
+ </span> <span class='ivar'>@json</span> <span class='op'>=</span> <span class='ivar'>@interface</span><span class='period'>.</span><span class='id identifier rubyid_stop_by_id'>stop_by_id</span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
1262
+ <span class='kw'>end</span></pre>
1263
+ </td>
1264
+ </tr>
1265
+ </table>
1266
+ </div>
1267
+
1268
+ <div class="method_details ">
1269
+ <h3 class="signature " id="to_json-instance_method">
1270
+
1271
+ - (<tt>Object</tt>) <strong>to_json</strong>
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+ </h3><div class="docstring">
1278
+ <div class="discussion">
1279
+
1280
+ <p>A JSON encoded string representation of the archive</p>
1281
+
1282
+
1283
+ </div>
1284
+ </div>
1285
+ <div class="tags">
1286
+
1287
+
1288
+ </div><table class="source_code">
1289
+ <tr>
1290
+ <td>
1291
+ <pre class="lines">
1292
+
1293
+
1294
+ 58
1295
+ 59
1296
+ 60</pre>
1297
+ </td>
1298
+ <td>
1299
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 58</span>
1300
+
1301
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span>
1302
+ <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
1303
+ <span class='kw'>end</span></pre>
1304
+ </td>
1305
+ </tr>
1306
+ </table>
1307
+ </div>
1308
+
1309
+ </div>
1310
+
1311
+ </div>
1312
+
1313
+ <div id="footer">
1314
+ Generated on Tue May 27 13:24:51 2014 by
1315
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1316
+ 0.8.7.4 (ruby-1.9.3).
1317
+ </div>
1318
+
1319
+ </body>
1320
+ </html>