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
@@ -0,0 +1,216 @@
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::ArchiveList
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/ArchiveList.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">ArchiveList</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::ArchiveList
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">Array</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Array</li>
82
+
83
+ <li class="next">OpenTok::ArchiveList</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/archive_list.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>A class for accessing an array of Archive objects.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
120
+ <ul class="summary">
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#total-instance_method" title="#total (instance method)">- (Object) <strong>total</strong> </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+
132
+
133
+
134
+ <span class="note title readonly">readonly</span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'>
145
+ <p>The total number archives.</p>
146
+ </div></span>
147
+
148
+ </li>
149
+
150
+
151
+ </ul>
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <div id="instance_attr_details" class="attr_details">
159
+ <h2>Instance Attribute Details</h2>
160
+
161
+
162
+ <span id=""></span>
163
+ <div class="method_details first">
164
+ <h3 class="signature first" id="total-instance_method">
165
+
166
+ - (<tt>Object</tt>) <strong>total</strong> <span class="extras">(readonly)</span>
167
+
168
+
169
+
170
+
171
+
172
+ </h3><div class="docstring">
173
+ <div class="discussion">
174
+
175
+ <p>The total number archives.</p>
176
+
177
+
178
+ </div>
179
+ </div>
180
+ <div class="tags">
181
+
182
+
183
+ </div><table class="source_code">
184
+ <tr>
185
+ <td>
186
+ <pre class="lines">
187
+
188
+
189
+ 8
190
+ 9
191
+ 10</pre>
192
+ </td>
193
+ <td>
194
+ <pre class="code"><span class="info file"># File 'lib/opentok/archive_list.rb', line 8</span>
195
+
196
+ <span class='kw'>def</span> <span class='id identifier rubyid_total'>total</span>
197
+ <span class='ivar'>@total</span>
198
+ <span class='kw'>end</span></pre>
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ </div>
203
+
204
+ </div>
205
+
206
+
207
+ </div>
208
+
209
+ <div id="footer">
210
+ Generated on Tue May 27 13:24:51 2014 by
211
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
212
+ 0.8.7.4 (ruby-1.9.3).
213
+ </div>
214
+
215
+ </body>
216
+ </html>
@@ -0,0 +1,1028 @@
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::Archives
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/Archives.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">Archives</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::Archives
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::Archives</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/archives.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>A class for working with OpenTok 2.0 archives.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Instance Method Summary
123
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#all-instance_method" title="#all (instance method)">- (ArchiveList) <strong>all</strong>(options = {}) </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Returns an ArchiveList, which is an array of archives that are completed
147
+ and in-progress, for your API key.</p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#create-instance_method" title="#create (instance method)">- (Archive) <strong>create</strong>(session_id, options = {}) </a>
157
+
158
+
159
+
160
+ </span>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ <span class="summary_desc"><div class='inline'>
171
+ <p>Starts archiving an OpenTok 2.0 session.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ <li class="public ">
178
+ <span class="summary_signature">
179
+
180
+ <a href="#delete_by_id-instance_method" title="#delete_by_id (instance method)">- (Object) <strong>delete_by_id</strong>(archive_id) </a>
181
+
182
+
183
+
184
+ </span>
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+ <span class="summary_desc"><div class='inline'>
195
+ <p>Deletes an OpenTok archive.</p>
196
+ </div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#find-instance_method" title="#find (instance method)">- (Archive) <strong>find</strong>(archive_id) </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'>
219
+ <p>Gets an Archive object for the given archive ID.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#stop_by_id-instance_method" title="#stop_by_id (instance method)">- (Archive) <strong>stop_by_id</strong>(archive_id) </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>Stops an OpenTok archive that is being recorded.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ </ul>
250
+
251
+
252
+
253
+
254
+ <div id="instance_method_details" class="method_details_list">
255
+ <h2>Instance Method Details</h2>
256
+
257
+
258
+ <div class="method_details first">
259
+ <h3 class="signature first" id="all-instance_method">
260
+
261
+ - (<tt><span class='object_link'><a href="ArchiveList.html" title="OpenTok::ArchiveList (class)">ArchiveList</a></span></tt>) <strong>all</strong>(options = {})
262
+
263
+
264
+
265
+
266
+
267
+ </h3><div class="docstring">
268
+ <div class="discussion">
269
+
270
+ <p>Returns an ArchiveList, which is an array of archives that are completed
271
+ and in-progress, for your API key.</p>
272
+
273
+
274
+ </div>
275
+ </div>
276
+ <div class="tags">
277
+ <p class="tag_title">Parameters:</p>
278
+ <ul class="param">
279
+
280
+ <li>
281
+
282
+ <span class='name'>options</span>
283
+
284
+
285
+ <span class='type'>(<tt>Hash</tt>)</span>
286
+
287
+
288
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
289
+
290
+
291
+ &mdash;
292
+ <div class='inline'>
293
+ <p>A hash with keys defining which range of archives to retrieve.</p>
294
+ </div>
295
+
296
+ </li>
297
+
298
+ </ul>
299
+
300
+
301
+
302
+
303
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
304
+ <ul class="option">
305
+
306
+ <li>
307
+ <span class="name">:offset</span>
308
+ <span class="type">(<tt>integer</tt>)</span>
309
+ <span class="default">
310
+
311
+ </span>
312
+
313
+ &mdash; <div class='inline'>
314
+ <p>Optional. The index offset of the first archive. 0 is offset of the most
315
+ recently started archive. 1 is the offset of the archive that started prior
316
+ to the most recent archive. If you do not specify an offset, 0 is used.</p>
317
+ </div>
318
+
319
+ </li>
320
+
321
+ <li>
322
+ <span class="name">:count</span>
323
+ <span class="type">(<tt>integer</tt>)</span>
324
+ <span class="default">
325
+
326
+ </span>
327
+
328
+ &mdash; <div class='inline'>
329
+ <p>Optional. The number of archives to be returned. The maximum number of
330
+ archives returned is 1000.</p>
331
+ </div>
332
+
333
+ </li>
334
+
335
+ </ul>
336
+
337
+
338
+ <p class="tag_title">Returns:</p>
339
+ <ul class="return">
340
+
341
+ <li>
342
+
343
+
344
+ <span class='type'>(<tt><span class='object_link'><a href="ArchiveList.html" title="OpenTok::ArchiveList (class)">ArchiveList</a></span></tt>)</span>
345
+
346
+
347
+
348
+ &mdash;
349
+ <div class='inline'>
350
+ <p>An ArchiveList object, which is an array of Archive objects.</p>
351
+ </div>
352
+
353
+ </li>
354
+
355
+ </ul>
356
+ <p class="tag_title">Raises:</p>
357
+ <ul class="raise">
358
+
359
+ <li>
360
+
361
+
362
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
363
+
364
+
365
+
366
+ </li>
367
+
368
+ </ul>
369
+
370
+ </div><table class="source_code">
371
+ <tr>
372
+ <td>
373
+ <pre class="lines">
374
+
375
+
376
+ 73
377
+ 74
378
+ 75
379
+ 76
380
+ 77</pre>
381
+ </td>
382
+ <td>
383
+ <pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 73</span>
384
+
385
+ <span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
386
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Limit is invalid</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:count</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='int'>0</span><span class='op'>..</span><span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:count</span><span class='rbracket'>]</span>
387
+ <span class='id identifier rubyid_archive_list_json'>archive_list_json</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_list_archives'>list_archives</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:count</span><span class='rbracket'>]</span><span class='rparen'>)</span>
388
+ <span class='const'>ArchiveList</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_archive_list_json'>archive_list_json</span>
389
+ <span class='kw'>end</span></pre>
390
+ </td>
391
+ </tr>
392
+ </table>
393
+ </div>
394
+
395
+ <div class="method_details ">
396
+ <h3 class="signature " id="create-instance_method">
397
+
398
+ - (<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>) <strong>create</strong>(session_id, options = {})
399
+
400
+
401
+
402
+
403
+
404
+ </h3><div class="docstring">
405
+ <div class="discussion">
406
+
407
+ <p>Starts archiving an OpenTok 2.0 session.</p>
408
+
409
+ <p>Clients must be actively connected to the OpenTok session for you to
410
+ successfully start recording an archive.</p>
411
+
412
+ <p>You can only record one archive at a time for a given session. You can only
413
+ record archives of OpenTok server-enabled sessions; you cannot archive
414
+ peer-to-peer sessions.</p>
415
+
416
+
417
+ </div>
418
+ </div>
419
+ <div class="tags">
420
+ <p class="tag_title">Parameters:</p>
421
+ <ul class="param">
422
+
423
+ <li>
424
+
425
+ <span class='name'>session_id</span>
426
+
427
+
428
+ <span class='type'>(<tt>String</tt>)</span>
429
+
430
+
431
+
432
+ &mdash;
433
+ <div class='inline'>
434
+ <p>The session ID of the OpenTok session to archive.</p>
435
+ </div>
436
+
437
+ </li>
438
+
439
+ <li>
440
+
441
+ <span class='name'>options</span>
442
+
443
+
444
+ <span class='type'>(<tt>Hash</tt>)</span>
445
+
446
+
447
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
448
+
449
+
450
+ &mdash;
451
+ <div class='inline'>
452
+ <p>A hash with the key ‘name’ or :name.</p>
453
+ </div>
454
+
455
+ </li>
456
+
457
+ </ul>
458
+
459
+
460
+
461
+
462
+
463
+
464
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
465
+ <ul class="option">
466
+
467
+ <li>
468
+ <span class="name">:name</span>
469
+ <span class="type">(<tt>String</tt>)</span>
470
+ <span class="default">
471
+
472
+ </span>
473
+
474
+ &mdash; <div class='inline'>
475
+ <p>This is the name of the archive. You can use this name to identify the
476
+ archive. It is a property of the Archive object, and it is a property of
477
+ archive-related events in the OpenTok.js library.</p>
478
+ </div>
479
+
480
+ </li>
481
+
482
+ </ul>
483
+
484
+
485
+ <p class="tag_title">Returns:</p>
486
+ <ul class="return">
487
+
488
+ <li>
489
+
490
+
491
+ <span class='type'>(<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>)</span>
492
+
493
+
494
+
495
+ &mdash;
496
+ <div class='inline'>
497
+ <p>The Archive object, which includes properties defining the archive,
498
+ including the archive ID.</p>
499
+ </div>
500
+
501
+ </li>
502
+
503
+ </ul>
504
+ <p class="tag_title">Raises:</p>
505
+ <ul class="raise">
506
+
507
+ <li>
508
+
509
+
510
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
511
+
512
+
513
+
514
+ &mdash;
515
+ <div class='inline'>
516
+ <p>The archive could not be started. The request was invalid or the session
517
+ has no connected clients.</p>
518
+ </div>
519
+
520
+ </li>
521
+
522
+ <li>
523
+
524
+
525
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></tt>)</span>
526
+
527
+
528
+
529
+ &mdash;
530
+ <div class='inline'>
531
+ <p>Authentication failed while starting an archive. Invalid API key.</p>
532
+ </div>
533
+
534
+ </li>
535
+
536
+ <li>
537
+
538
+
539
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
540
+
541
+
542
+
543
+ &mdash;
544
+ <div class='inline'>
545
+ <p>The archive could not be started. The session ID does not exist.</p>
546
+ </div>
547
+
548
+ </li>
549
+
550
+ <li>
551
+
552
+
553
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
554
+
555
+
556
+
557
+ &mdash;
558
+ <div class='inline'>
559
+ <p>The archive could not be started. The session could be peer-to-peer or the
560
+ session is already being recorded.</p>
561
+ </div>
562
+
563
+ </li>
564
+
565
+ <li>
566
+
567
+
568
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
569
+
570
+
571
+
572
+ &mdash;
573
+ <div class='inline'>
574
+ <p>The archive could not be started.</p>
575
+ </div>
576
+
577
+ </li>
578
+
579
+ </ul>
580
+
581
+ </div><table class="source_code">
582
+ <tr>
583
+ <td>
584
+ <pre class="lines">
585
+
586
+
587
+ 39
588
+ 40
589
+ 41
590
+ 42
591
+ 43
592
+ 44
593
+ 45</pre>
594
+ </td>
595
+ <td>
596
+ <pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 39</span>
597
+
598
+ <span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
599
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>session_id not provided</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
600
+ <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
601
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>name</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
602
+ <span class='id identifier rubyid_archive_json'>archive_json</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_start_archive'>start_archive</span><span class='lparen'>(</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='rparen'>)</span>
603
+ <span class='const'>Archive</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_archive_json'>archive_json</span>
604
+ <span class='kw'>end</span></pre>
605
+ </td>
606
+ </tr>
607
+ </table>
608
+ </div>
609
+
610
+ <div class="method_details ">
611
+ <h3 class="signature " id="delete_by_id-instance_method">
612
+
613
+ - (<tt>Object</tt>) <strong>delete_by_id</strong>(archive_id)
614
+
615
+
616
+
617
+
618
+
619
+ </h3><div class="docstring">
620
+ <div class="discussion">
621
+
622
+ <p>Deletes an OpenTok archive.</p>
623
+
624
+ <p>You can only delete an archive which has a status of "available",
625
+ "uploaded", or "deleted". Deleting an archive removes its record from the
626
+ list of archives. For an "available" archive, it also removes the archive
627
+ file, making it unavailable for download. For a "deleted" archive, the
628
+ archive remains deleted.</p>
629
+
630
+
631
+ </div>
632
+ </div>
633
+ <div class="tags">
634
+ <p class="tag_title">Parameters:</p>
635
+ <ul class="param">
636
+
637
+ <li>
638
+
639
+ <span class='name'>archive_id</span>
640
+
641
+
642
+ <span class='type'>(<tt>String</tt>)</span>
643
+
644
+
645
+
646
+ &mdash;
647
+ <div class='inline'>
648
+ <p>The archive ID of the archive you want to delete.</p>
649
+ </div>
650
+
651
+ </li>
652
+
653
+ </ul>
654
+
655
+ <p class="tag_title">Raises:</p>
656
+ <ul class="raise">
657
+
658
+ <li>
659
+
660
+
661
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></tt>)</span>
662
+
663
+
664
+
665
+ &mdash;
666
+ <div class='inline'>
667
+ <p>Authentication failed or an invalid archive ID was given.</p>
668
+ </div>
669
+
670
+ </li>
671
+
672
+ <li>
673
+
674
+
675
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
676
+
677
+
678
+
679
+ &mdash;
680
+ <div class='inline'>
681
+ <p>The archive could not be deleted. The status must be ‘available’,
682
+ ‘deleted’, or ‘uploaded’.</p>
683
+ </div>
684
+
685
+ </li>
686
+
687
+ <li>
688
+
689
+
690
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
691
+
692
+
693
+
694
+ &mdash;
695
+ <div class='inline'>
696
+ <p>The archive could not be deleted.</p>
697
+ </div>
698
+
699
+ </li>
700
+
701
+ </ul>
702
+
703
+ </div><table class="source_code">
704
+ <tr>
705
+ <td>
706
+ <pre class="lines">
707
+
708
+
709
+ 113
710
+ 114
711
+ 115
712
+ 116
713
+ 117</pre>
714
+ </td>
715
+ <td>
716
+ <pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 113</span>
717
+
718
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete_by_id'>delete_by_id</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
719
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
720
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_delete_archive'>delete_archive</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
721
+ <span class='lparen'>(</span><span class='int'>200</span><span class='op'>..</span><span class='int'>300</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span>
722
+ <span class='kw'>end</span></pre>
723
+ </td>
724
+ </tr>
725
+ </table>
726
+ </div>
727
+
728
+ <div class="method_details ">
729
+ <h3 class="signature " id="find-instance_method">
730
+
731
+ - (<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>) <strong>find</strong>(archive_id)
732
+
733
+
734
+
735
+
736
+
737
+ </h3><div class="docstring">
738
+ <div class="discussion">
739
+
740
+ <p>Gets an Archive object for the given archive ID.</p>
741
+
742
+
743
+ </div>
744
+ </div>
745
+ <div class="tags">
746
+ <p class="tag_title">Parameters:</p>
747
+ <ul class="param">
748
+
749
+ <li>
750
+
751
+ <span class='name'>archive_id</span>
752
+
753
+
754
+ <span class='type'>(<tt>String</tt>)</span>
755
+
756
+
757
+
758
+ &mdash;
759
+ <div class='inline'>
760
+ <p>The archive ID.</p>
761
+ </div>
762
+
763
+ </li>
764
+
765
+ </ul>
766
+
767
+ <p class="tag_title">Returns:</p>
768
+ <ul class="return">
769
+
770
+ <li>
771
+
772
+
773
+ <span class='type'>(<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>)</span>
774
+
775
+
776
+
777
+ &mdash;
778
+ <div class='inline'>
779
+ <p>The Archive object.</p>
780
+ </div>
781
+
782
+ </li>
783
+
784
+ </ul>
785
+ <p class="tag_title">Raises:</p>
786
+ <ul class="raise">
787
+
788
+ <li>
789
+
790
+
791
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
792
+
793
+
794
+
795
+ &mdash;
796
+ <div class='inline'>
797
+ <p>The archive could not be retrieved. The archive ID is invalid.</p>
798
+ </div>
799
+
800
+ </li>
801
+
802
+ <li>
803
+
804
+
805
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></tt>)</span>
806
+
807
+
808
+
809
+ &mdash;
810
+ <div class='inline'>
811
+ <p>Authentication failed while retrieving the archive. Invalid API key.</p>
812
+ </div>
813
+
814
+ </li>
815
+
816
+ <li>
817
+
818
+
819
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
820
+
821
+
822
+
823
+ &mdash;
824
+ <div class='inline'>
825
+ <p>The archive could not be retrieved.</p>
826
+ </div>
827
+
828
+ </li>
829
+
830
+ </ul>
831
+
832
+ </div><table class="source_code">
833
+ <tr>
834
+ <td>
835
+ <pre class="lines">
836
+
837
+
838
+ 56
839
+ 57
840
+ 58
841
+ 59
842
+ 60</pre>
843
+ </td>
844
+ <td>
845
+ <pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 56</span>
846
+
847
+ <span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
848
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
849
+ <span class='id identifier rubyid_archive_json'>archive_json</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_get_archive'>get_archive</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
850
+ <span class='const'>Archive</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_archive_json'>archive_json</span>
851
+ <span class='kw'>end</span></pre>
852
+ </td>
853
+ </tr>
854
+ </table>
855
+ </div>
856
+
857
+ <div class="method_details ">
858
+ <h3 class="signature " id="stop_by_id-instance_method">
859
+
860
+ - (<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>) <strong>stop_by_id</strong>(archive_id)
861
+
862
+
863
+
864
+
865
+
866
+ </h3><div class="docstring">
867
+ <div class="discussion">
868
+
869
+ <p>Stops an OpenTok archive that is being recorded.</p>
870
+
871
+ <p>Archives automatically stop recording after 90 minutes or when all clients
872
+ have disconnected from the session being archived.</p>
873
+
874
+
875
+ </div>
876
+ </div>
877
+ <div class="tags">
878
+ <p class="tag_title">Parameters:</p>
879
+ <ul class="param">
880
+
881
+ <li>
882
+
883
+ <span class='name'>archive_id</span>
884
+
885
+
886
+ <span class='type'>(<tt>String</tt>)</span>
887
+
888
+
889
+
890
+ &mdash;
891
+ <div class='inline'>
892
+ <p>The archive ID of the archive you want to stop recording.</p>
893
+ </div>
894
+
895
+ </li>
896
+
897
+ </ul>
898
+
899
+ <p class="tag_title">Returns:</p>
900
+ <ul class="return">
901
+
902
+ <li>
903
+
904
+
905
+ <span class='type'>(<tt><span class='object_link'><a href="Archive.html" title="OpenTok::Archive (class)">Archive</a></span></tt>)</span>
906
+
907
+
908
+
909
+ &mdash;
910
+ <div class='inline'>
911
+ <p>The Archive object corresponding to the archive being stopped.</p>
912
+ </div>
913
+
914
+ </li>
915
+
916
+ </ul>
917
+ <p class="tag_title">Raises:</p>
918
+ <ul class="raise">
919
+
920
+ <li>
921
+
922
+
923
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
924
+
925
+
926
+
927
+ &mdash;
928
+ <div class='inline'>
929
+ <p>The archive could not be stopped. The request was invalid.</p>
930
+ </div>
931
+
932
+ </li>
933
+
934
+ <li>
935
+
936
+
937
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokAuthenticationError.html" title="OpenTok::OpenTokAuthenticationError (class)">OpenTokAuthenticationError</a></span></tt>)</span>
938
+
939
+
940
+
941
+ &mdash;
942
+ <div class='inline'>
943
+ <p>Authentication failed while stopping an archive.</p>
944
+ </div>
945
+
946
+ </li>
947
+
948
+ <li>
949
+
950
+
951
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
952
+
953
+
954
+
955
+ &mdash;
956
+ <div class='inline'>
957
+ <p>The archive could not be stopped. The archive ID does not exist.</p>
958
+ </div>
959
+
960
+ </li>
961
+
962
+ <li>
963
+
964
+
965
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
966
+
967
+
968
+
969
+ &mdash;
970
+ <div class='inline'>
971
+ <p>The archive could not be stopped. The archive is not currently recording.</p>
972
+ </div>
973
+
974
+ </li>
975
+
976
+ <li>
977
+
978
+
979
+ <span class='type'>(<tt><span class='object_link'><a href="OpenTokArchiveError.html" title="OpenTok::OpenTokArchiveError (class)">OpenTokArchiveError</a></span></tt>)</span>
980
+
981
+
982
+
983
+ &mdash;
984
+ <div class='inline'>
985
+ <p>The archive could not be started.</p>
986
+ </div>
987
+
988
+ </li>
989
+
990
+ </ul>
991
+
992
+ </div><table class="source_code">
993
+ <tr>
994
+ <td>
995
+ <pre class="lines">
996
+
997
+
998
+ 94
999
+ 95
1000
+ 96
1001
+ 97
1002
+ 98</pre>
1003
+ </td>
1004
+ <td>
1005
+ <pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 94</span>
1006
+
1007
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop_by_id'>stop_by_id</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
1008
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1009
+ <span class='id identifier rubyid_archive_json'>archive_json</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_stop_archive'>stop_archive</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
1010
+ <span class='const'>Archive</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_archive_json'>archive_json</span>
1011
+ <span class='kw'>end</span></pre>
1012
+ </td>
1013
+ </tr>
1014
+ </table>
1015
+ </div>
1016
+
1017
+ </div>
1018
+
1019
+ </div>
1020
+
1021
+ <div id="footer">
1022
+ Generated on Tue May 27 13:24:51 2014 by
1023
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1024
+ 0.8.7.4 (ruby-1.9.3).
1025
+ </div>
1026
+
1027
+ </body>
1028
+ </html>