moovatom 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.gitignore +3 -1
  2. data/README.md +183 -35
  3. data/Rakefile +17 -0
  4. data/lib/moovatom/version.rb +1 -1
  5. data/lib/moovatom.rb +5 -11
  6. data/moovatom.gemspec +6 -1
  7. data/spec/fixtures/cancel.xml +4 -0
  8. data/spec/fixtures/detail.xml +57 -0
  9. data/spec/fixtures/encode.xml +4 -0
  10. data/spec/fixtures/status_error.xml +6 -0
  11. data/spec/fixtures/status_success.xml +6 -0
  12. data/spec/request_spec.rb +73 -0
  13. data/spec/spec_helper.rb +9 -0
  14. metadata +52 -40
  15. data/doc/Gemfile.html +0 -94
  16. data/doc/LICENSE_txt.html +0 -110
  17. data/doc/MoovAtom/MoovEngine.html +0 -604
  18. data/doc/MoovAtom.html +0 -168
  19. data/doc/Rakefile.html +0 -92
  20. data/doc/created.rid +0 -7
  21. data/doc/images/brick.png +0 -0
  22. data/doc/images/brick_link.png +0 -0
  23. data/doc/images/bug.png +0 -0
  24. data/doc/images/bullet_black.png +0 -0
  25. data/doc/images/bullet_toggle_minus.png +0 -0
  26. data/doc/images/bullet_toggle_plus.png +0 -0
  27. data/doc/images/date.png +0 -0
  28. data/doc/images/find.png +0 -0
  29. data/doc/images/loadingAnimation.gif +0 -0
  30. data/doc/images/macFFBgHack.png +0 -0
  31. data/doc/images/package.png +0 -0
  32. data/doc/images/page_green.png +0 -0
  33. data/doc/images/page_white_text.png +0 -0
  34. data/doc/images/page_white_width.png +0 -0
  35. data/doc/images/plugin.png +0 -0
  36. data/doc/images/ruby.png +0 -0
  37. data/doc/images/tag_green.png +0 -0
  38. data/doc/images/wrench.png +0 -0
  39. data/doc/images/wrench_orange.png +0 -0
  40. data/doc/images/zoom.png +0 -0
  41. data/doc/index.html +0 -72
  42. data/doc/init_rb.html +0 -54
  43. data/doc/js/darkfish.js +0 -116
  44. data/doc/js/jquery.js +0 -32
  45. data/doc/js/quicksearch.js +0 -114
  46. data/doc/js/thickbox-compressed.js +0 -10
  47. data/doc/lib/moovatom/version_rb.html +0 -52
  48. data/doc/lib/moovatom_rb.html +0 -70
  49. data/doc/rdoc.css +0 -763
@@ -1,604 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: MoovAtom::MoovEngine</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
- <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
-
17
- </head>
18
- <body id="top" class="class">
19
-
20
- <div id="metadata">
21
- <div id="home-metadata">
22
- <div id="home-section" class="section">
23
- <h3 class="section-header">
24
- <a href="../index.html">Home</a>
25
- <a href="../index.html#classes">Classes</a>
26
- <a href="../index.html#methods">Methods</a>
27
- </h3>
28
- </div>
29
- </div>
30
-
31
- <div id="file-metadata">
32
- <div id="file-list-section" class="section">
33
- <h3 class="section-header">In Files</h3>
34
- <div class="section-body">
35
- <ul>
36
-
37
- <li><a href="../lib/moovatom_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
- class="thickbox" title="lib/moovatom.rb">lib/moovatom.rb</a></li>
39
-
40
- </ul>
41
- </div>
42
- </div>
43
-
44
-
45
- </div>
46
-
47
- <div id="class-metadata">
48
-
49
- <!-- Parent Class -->
50
- <div id="parent-class-section" class="section">
51
- <h3 class="section-header">Parent</h3>
52
-
53
- <p class="link">Object</p>
54
-
55
- </div>
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
- <!-- Method Quickref -->
64
- <div id="method-list-section" class="section">
65
- <h3 class="section-header">Methods</h3>
66
- <ul class="link-list">
67
-
68
- <li><a href="#method-c-new">::new</a></li>
69
-
70
- <li><a href="#method-i-cancel">#cancel</a></li>
71
-
72
- <li><a href="#method-i-details">#details</a></li>
73
-
74
- <li><a href="#method-i-encode">#encode</a></li>
75
-
76
- <li><a href="#method-i-status">#status</a></li>
77
-
78
- </ul>
79
- </div>
80
-
81
-
82
-
83
- </div>
84
-
85
- <div id="project-metadata">
86
-
87
-
88
- <div id="fileindex-section" class="section project-section">
89
- <h3 class="section-header">Files</h3>
90
- <ul>
91
-
92
- <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
93
-
94
- <li class="file"><a href="../LICENSE_txt.html">LICENSE.txt</a></li>
95
-
96
- <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
97
-
98
- </ul>
99
- </div>
100
-
101
-
102
- <div id="classindex-section" class="section project-section">
103
- <h3 class="section-header">Class/Module Index
104
- <span class="search-toggle"><img src="../images/find.png"
105
- height="16" width="16" alt="[+]"
106
- title="show/hide quicksearch" /></span></h3>
107
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
108
- <fieldset>
109
- <legend>Quicksearch</legend>
110
- <input type="text" name="quicksearch" value=""
111
- class="quicksearch-field" />
112
- </fieldset>
113
- </form>
114
-
115
- <ul class="link-list">
116
-
117
- <li><a href="../MoovAtom.html">MoovAtom</a></li>
118
-
119
- <li><a href="../MoovAtom/MoovEngine.html">MoovAtom::MoovEngine</a></li>
120
-
121
- </ul>
122
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
123
- </div>
124
-
125
-
126
- </div>
127
- </div>
128
-
129
- <div id="documentation">
130
- <h1 class="class">MoovAtom::MoovEngine</h1>
131
-
132
- <div id="description" class="description">
133
-
134
- </div><!-- description -->
135
-
136
-
137
-
138
-
139
- <div id="5Buntitled-5D" class="documentation-section">
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
- <!-- Attributes -->
148
- <div id="attribute-method-details" class="method-section section">
149
- <h3 class="section-header">Attributes</h3>
150
-
151
-
152
- <div id="blurb-attribute-method" class="method-detail">
153
- <a name="blurb"></a>
154
-
155
- <a name="blurb="></a>
156
-
157
- <div class="method-heading attribute-method-heading">
158
- <span class="method-name">blurb</span><span
159
- class="attribute-access-type">[RW]</span>
160
- </div>
161
-
162
- <div class="method-description">
163
-
164
-
165
-
166
- </div>
167
- </div>
168
-
169
- <div id="callbackurl-attribute-method" class="method-detail">
170
- <a name="callbackurl"></a>
171
-
172
- <a name="callbackurl="></a>
173
-
174
- <div class="method-heading attribute-method-heading">
175
- <span class="method-name">callbackurl</span><span
176
- class="attribute-access-type">[RW]</span>
177
- </div>
178
-
179
- <div class="method-description">
180
-
181
-
182
-
183
- </div>
184
- </div>
185
-
186
- <div id="content_type-attribute-method" class="method-detail">
187
- <a name="content_type"></a>
188
-
189
- <a name="content_type="></a>
190
-
191
- <div class="method-heading attribute-method-heading">
192
- <span class="method-name">content_type</span><span
193
- class="attribute-access-type">[RW]</span>
194
- </div>
195
-
196
- <div class="method-description">
197
-
198
-
199
-
200
- </div>
201
- </div>
202
-
203
- <div id="guid-attribute-method" class="method-detail">
204
- <a name="guid"></a>
205
-
206
- <a name="guid="></a>
207
-
208
- <div class="method-heading attribute-method-heading">
209
- <span class="method-name">guid</span><span
210
- class="attribute-access-type">[RW]</span>
211
- </div>
212
-
213
- <div class="method-description">
214
-
215
-
216
-
217
- </div>
218
- </div>
219
-
220
- <div id="sourcefile-attribute-method" class="method-detail">
221
- <a name="sourcefile"></a>
222
-
223
- <a name="sourcefile="></a>
224
-
225
- <div class="method-heading attribute-method-heading">
226
- <span class="method-name">sourcefile</span><span
227
- class="attribute-access-type">[RW]</span>
228
- </div>
229
-
230
- <div class="method-description">
231
-
232
-
233
-
234
- </div>
235
- </div>
236
-
237
- <div id="title-attribute-method" class="method-detail">
238
- <a name="title"></a>
239
-
240
- <a name="title="></a>
241
-
242
- <div class="method-heading attribute-method-heading">
243
- <span class="method-name">title</span><span
244
- class="attribute-access-type">[RW]</span>
245
- </div>
246
-
247
- <div class="method-description">
248
-
249
-
250
-
251
- </div>
252
- </div>
253
-
254
- <div id="userkey-attribute-method" class="method-detail">
255
- <a name="userkey"></a>
256
-
257
- <a name="userkey="></a>
258
-
259
- <div class="method-heading attribute-method-heading">
260
- <span class="method-name">userkey</span><span
261
- class="attribute-access-type">[RW]</span>
262
- </div>
263
-
264
- <div class="method-description">
265
-
266
-
267
-
268
- </div>
269
- </div>
270
-
271
- <div id="username-attribute-method" class="method-detail">
272
- <a name="username"></a>
273
-
274
- <a name="username="></a>
275
-
276
- <div class="method-heading attribute-method-heading">
277
- <span class="method-name">username</span><span
278
- class="attribute-access-type">[RW]</span>
279
- </div>
280
-
281
- <div class="method-description">
282
-
283
-
284
-
285
- </div>
286
- </div>
287
-
288
- <div id="xml_response-attribute-method" class="method-detail">
289
- <a name="xml_response"></a>
290
-
291
- <div class="method-heading attribute-method-heading">
292
- <span class="method-name">xml_response</span><span
293
- class="attribute-access-type">[R]</span>
294
- </div>
295
-
296
- <div class="method-description">
297
-
298
-
299
-
300
- </div>
301
- </div>
302
-
303
- </div><!-- attribute-method-details -->
304
-
305
-
306
- <!-- Methods -->
307
-
308
- <div id="public-class-method-details" class="method-section section">
309
- <h3 class="section-header">Public Class Methods</h3>
310
-
311
-
312
- <div id="new-method" class="method-detail ">
313
- <a name="method-c-new"></a>
314
-
315
-
316
- <div class="method-heading">
317
- <span class="method-name">new</span><span
318
- class="method-args">(args={})</span>
319
- <span class="method-click-advice">click to toggle source</span>
320
- </div>
321
-
322
-
323
- <div class="method-description">
324
-
325
- <p>The initializer creates a set of instance variables to hold all the
326
- specifics about the video you’re accessing. You can define these variables
327
- when instantiating a new <a href="MoovEngine.html">MoovEngine</a> object or
328
- after a blank object has been created. All variables with the exception of
329
- @<a href="MoovEngine.html#attribute-i-xml_response">xml_response</a> and
330
- @action are writable. @<a
331
- href="MoovEngine.html#attribute-i-xml_response">xml_response</a> is only
332
- readable because it contains the respnse from MoovAtom’s servers. @action
333
- gets set in each of the methods below to correctly correspond with the
334
- associated request.</p>
335
-
336
- <p>Usage:</p>
337
- <ul><li>
338
- <p>moov_engine = <a
339
- href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new</a></p>
340
- </li><li>
341
- <p>moov_engine.username = ‘YOUR_USERNAME’</p>
342
- </li><li>
343
- <p>moov_engine.userkey = ‘YOUR_USERKEY’</p>
344
- </li><li>
345
- <p>etc…</p>
346
- </li></ul>
347
-
348
- <p>Or:</p>
349
- <ul><li>
350
- <p>args = { :username =&gt; ‘YOUR_USERNAME’, :userkey =&gt; ‘YOUR_USERKEY’,
351
- etc… }</p>
352
- </li><li>
353
- <p>moov_engine = <a
354
- href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
355
- </li></ul>
356
-
357
-
358
-
359
- <div class="method-source-code" id="new-source">
360
- <pre>
361
- <span class="ruby-comment"># File lib/moovatom.rb, line 43</span>
362
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>={})
363
- <span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:guid</span>]
364
- <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:username</span>]
365
- <span class="ruby-ivar">@userkey</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:userkey</span>]
366
- <span class="ruby-ivar">@content_type</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:content_type</span>] <span class="ruby-operator">||</span> <span class="ruby-string">&quot;video&quot;</span>
367
- <span class="ruby-ivar">@title</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:title</span>]
368
- <span class="ruby-ivar">@blurb</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:blurb</span>]
369
- <span class="ruby-ivar">@sourcefile</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:sourcefile</span>]
370
- <span class="ruby-ivar">@callbackurl</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:callbackurl</span>]
371
- <span class="ruby-keyword">end</span></pre>
372
- </div><!-- new-source -->
373
-
374
- </div>
375
-
376
-
377
-
378
-
379
- </div><!-- new-method -->
380
-
381
-
382
- </div><!-- public-class-method-details -->
383
-
384
- <div id="public-instance-method-details" class="method-section section">
385
- <h3 class="section-header">Public Instance Methods</h3>
386
-
387
-
388
- <div id="cancel-method" class="method-detail ">
389
- <a name="method-i-cancel"></a>
390
-
391
-
392
- <div class="method-heading">
393
- <span class="method-name">cancel</span><span
394
- class="method-args">(guid = "")</span>
395
- <span class="method-click-advice">click to toggle source</span>
396
- </div>
397
-
398
-
399
- <div class="method-description">
400
-
401
- <p>Use this method to cancel the encoding of a video. This method requires
402
- @username, @userkey and @guid to be set.</p>
403
-
404
- <p>If @guid has not yet been set then you can pass it in the hash argument.</p>
405
-
406
- <p>Usage:</p>
407
- <ul><li>
408
- <p>moov_engine.cancel</p>
409
- </li><li>
410
- <p>moov_engine.cancel ‘GUID_OF_VIDEO’</p>
411
- </li></ul>
412
-
413
-
414
-
415
- <div class="method-source-code" id="cancel-source">
416
- <pre>
417
- <span class="ruby-comment"># File lib/moovatom.rb, line 118</span>
418
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">cancel</span>(<span class="ruby-identifier">guid</span> = <span class="ruby-string">&quot;&quot;</span>)
419
- <span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@guid</span>.<span class="ruby-identifier">nil?</span>
420
- <span class="ruby-ivar">@action</span> = <span class="ruby-string">'cancel'</span>
421
- <span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
422
- <span class="ruby-keyword">end</span></pre>
423
- </div><!-- cancel-source -->
424
-
425
- </div>
426
-
427
-
428
-
429
-
430
- </div><!-- cancel-method -->
431
-
432
-
433
- <div id="details-method" class="method-detail ">
434
- <a name="method-i-details"></a>
435
-
436
-
437
- <div class="method-heading">
438
- <span class="method-name">details</span><span
439
- class="method-args">(guid = "")</span>
440
- <span class="method-click-advice">click to toggle source</span>
441
- </div>
442
-
443
-
444
- <div class="method-description">
445
-
446
- <p>Use this method to get the details about a video that’s finished encoding.
447
- This method requires @username, @userkey and @guid to be set.</p>
448
-
449
- <p>If @guid has not yet been set then you can pass it in the hash argument.</p>
450
-
451
- <p>@TODO add the ability to yield to a block</p>
452
-
453
- <p>Usage:</p>
454
- <ul><li>
455
- <p>moov_engine.details</p>
456
- </li><li>
457
- <p>moov_engine.details ‘GUID_OF_VIDEO’</p>
458
- </li></ul>
459
-
460
-
461
-
462
- <div class="method-source-code" id="details-source">
463
- <pre>
464
- <span class="ruby-comment"># File lib/moovatom.rb, line 64</span>
465
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">details</span>(<span class="ruby-identifier">guid</span> = <span class="ruby-string">&quot;&quot;</span>)
466
- <span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@guid</span>.<span class="ruby-identifier">nil?</span>
467
- <span class="ruby-ivar">@action</span> = <span class="ruby-string">'details'</span>
468
- <span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
469
- <span class="ruby-keyword">end</span></pre>
470
- </div><!-- details-source -->
471
-
472
- </div>
473
-
474
-
475
-
476
-
477
- </div><!-- details-method -->
478
-
479
-
480
- <div id="encode-method" class="method-detail ">
481
- <a name="method-i-encode"></a>
482
-
483
-
484
- <div class="method-heading">
485
- <span class="method-name">encode</span><span
486
- class="method-args">()</span>
487
- <span class="method-click-advice">click to toggle source</span>
488
- </div>
489
-
490
-
491
- <div class="method-description">
492
-
493
- <p>Use this method to start encoding a new video. This method requires the
494
- following variables be set:</p>
495
- <ul><li>
496
- <p>@username</p>
497
- </li><li>
498
- <p>@userkey</p>
499
- </li><li>
500
- <p>@<a href="MoovEngine.html#attribute-i-content_type">content_type</a></p>
501
- </li><li>
502
- <p>@title</p>
503
- </li><li>
504
- <p>@blurb</p>
505
- </li><li>
506
- <p>@sourcefile</p>
507
- </li><li>
508
- <p>@callbackurl</p>
509
- </li></ul>
510
-
511
- <p>@TODO this method <b>REALLY</b> needs to be able to yield to a block!</p>
512
-
513
- <p>Usage:</p>
514
- <ul><li>
515
- <p>moov_engine.status ‘GUID_OF_VIDEO’</p>
516
- </li></ul>
517
-
518
-
519
-
520
- <div class="method-source-code" id="encode-source">
521
- <pre>
522
- <span class="ruby-comment"># File lib/moovatom.rb, line 100</span>
523
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">encode</span>
524
- <span class="ruby-ivar">@action</span> = <span class="ruby-string">'encode'</span>
525
- <span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
526
-
527
- <span class="ruby-keyword">if</span> <span class="ruby-ivar">@xml_response</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;200&quot;</span>
528
- <span class="ruby-identifier">xml_doc</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@xml_response</span>.<span class="ruby-identifier">body</span>
529
- <span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">xml_doc</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-string">&quot;uuid&quot;</span>].<span class="ruby-identifier">text</span>
530
- <span class="ruby-keyword">end</span>
531
- <span class="ruby-keyword">end</span></pre>
532
- </div><!-- encode-source -->
533
-
534
- </div>
535
-
536
-
537
-
538
-
539
- </div><!-- encode-method -->
540
-
541
-
542
- <div id="status-method" class="method-detail ">
543
- <a name="method-i-status"></a>
544
-
545
-
546
- <div class="method-heading">
547
- <span class="method-name">status</span><span
548
- class="method-args">(guid = "")</span>
549
- <span class="method-click-advice">click to toggle source</span>
550
- </div>
551
-
552
-
553
- <div class="method-description">
554
-
555
- <p>Use this method to get the status of a video that is currently being
556
- encoded. This method requires @username, @userkey and @guid to be set.</p>
557
-
558
- <p>If @guid has not yet been set then you can pass it in the hash argument.</p>
559
-
560
- <p>@TODO add the ability to yield to a block</p>
561
-
562
- <p>Usage:</p>
563
- <ul><li>
564
- <p>moov_engine.status</p>
565
- </li><li>
566
- <p>moov_engine.status ‘GUID_OF_VIDEO’</p>
567
- </li></ul>
568
-
569
-
570
-
571
- <div class="method-source-code" id="status-source">
572
- <pre>
573
- <span class="ruby-comment"># File lib/moovatom.rb, line 80</span>
574
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">status</span>(<span class="ruby-identifier">guid</span> = <span class="ruby-string">&quot;&quot;</span>)
575
- <span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@guid</span>.<span class="ruby-identifier">nil?</span>
576
- <span class="ruby-ivar">@action</span> = <span class="ruby-string">'status'</span>
577
- <span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
578
- <span class="ruby-keyword">end</span></pre>
579
- </div><!-- status-source -->
580
-
581
- </div>
582
-
583
-
584
-
585
-
586
- </div><!-- status-method -->
587
-
588
-
589
- </div><!-- public-instance-method-details -->
590
-
591
- </div><!-- 5Buntitled-5D -->
592
-
593
-
594
- </div><!-- documentation -->
595
-
596
- <div id="validator-badges">
597
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
598
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
599
- Rdoc Generator</a> 2</small>.</p>
600
- </div>
601
-
602
- </body>
603
- </html>
604
-