moovatom 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/MoovAtom/MoovEngine.html +30 -13
- data/doc/created.rid +3 -3
- data/doc/lib/moovatom/version_rb.html +1 -1
- data/doc/lib/moovatom_rb.html +1 -1
- data/lib/moovatom/version.rb +1 -1
- data/lib/moovatom.rb +15 -6
- metadata +3 -3
@@ -391,7 +391,7 @@ href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
|
|
391
391
|
|
392
392
|
<div class="method-heading">
|
393
393
|
<span class="method-name">cancel</span><span
|
394
|
-
class="method-args">(guid)</span>
|
394
|
+
class="method-args">(guid = "")</span>
|
395
395
|
<span class="method-click-advice">click to toggle source</span>
|
396
396
|
</div>
|
397
397
|
|
@@ -401,8 +401,12 @@ href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
|
|
401
401
|
<p>Use this method to cancel the encoding of a video. This method requires
|
402
402
|
@username, @userkey and @guid to be set.</p>
|
403
403
|
|
404
|
+
<p>If @guid has not yet been set then you can pass it in the hash argument.</p>
|
405
|
+
|
404
406
|
<p>Usage:</p>
|
405
407
|
<ul><li>
|
408
|
+
<p>moov_engine.cancel</p>
|
409
|
+
</li><li>
|
406
410
|
<p>moov_engine.cancel ‘GUID_OF_VIDEO’</p>
|
407
411
|
</li></ul>
|
408
412
|
|
@@ -410,9 +414,9 @@ href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
|
|
410
414
|
|
411
415
|
<div class="method-source-code" id="cancel-source">
|
412
416
|
<pre>
|
413
|
-
<span class="ruby-comment"># File lib/moovatom.rb, line
|
414
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cancel</span>(<span class="ruby-identifier">guid</span>)
|
415
|
-
<span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span>
|
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">""</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>
|
416
420
|
<span class="ruby-ivar">@action</span> = <span class="ruby-string">'cancel'</span>
|
417
421
|
<span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
|
418
422
|
<span class="ruby-keyword">end</span></pre>
|
@@ -432,7 +436,7 @@ href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
|
|
432
436
|
|
433
437
|
<div class="method-heading">
|
434
438
|
<span class="method-name">details</span><span
|
435
|
-
class="method-args">(guid)</span>
|
439
|
+
class="method-args">(guid = "")</span>
|
436
440
|
<span class="method-click-advice">click to toggle source</span>
|
437
441
|
</div>
|
438
442
|
|
@@ -442,10 +446,14 @@ href="MoovEngine.html#method-c-new">MoovAtom::MoovEngine.new(args)</a></p>
|
|
442
446
|
<p>Use this method to get the details about a video that’s finished encoding.
|
443
447
|
This method requires @username, @userkey and @guid to be set.</p>
|
444
448
|
|
449
|
+
<p>If @guid has not yet been set then you can pass it in the hash argument.</p>
|
450
|
+
|
445
451
|
<p>@TODO add the ability to yield to a block</p>
|
446
452
|
|
447
453
|
<p>Usage:</p>
|
448
454
|
<ul><li>
|
455
|
+
<p>moov_engine.details</p>
|
456
|
+
</li><li>
|
449
457
|
<p>moov_engine.details ‘GUID_OF_VIDEO’</p>
|
450
458
|
</li></ul>
|
451
459
|
|
@@ -453,9 +461,9 @@ This method requires @username, @userkey and @guid to be set.</p>
|
|
453
461
|
|
454
462
|
<div class="method-source-code" id="details-source">
|
455
463
|
<pre>
|
456
|
-
<span class="ruby-comment"># File lib/moovatom.rb, line
|
457
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">details</span>(<span class="ruby-identifier">guid</span>)
|
458
|
-
<span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span>
|
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">""</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>
|
459
467
|
<span class="ruby-ivar">@action</span> = <span class="ruby-string">'details'</span>
|
460
468
|
<span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
|
461
469
|
<span class="ruby-keyword">end</span></pre>
|
@@ -511,10 +519,15 @@ following variables be set:</p>
|
|
511
519
|
|
512
520
|
<div class="method-source-code" id="encode-source">
|
513
521
|
<pre>
|
514
|
-
<span class="ruby-comment"># File lib/moovatom.rb, line
|
522
|
+
<span class="ruby-comment"># File lib/moovatom.rb, line 100</span>
|
515
523
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">encode</span>
|
516
524
|
<span class="ruby-ivar">@action</span> = <span class="ruby-string">'encode'</span>
|
517
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">"200"</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">"uuid"</span>].<span class="ruby-identifier">text</span>
|
530
|
+
<span class="ruby-keyword">end</span>
|
518
531
|
<span class="ruby-keyword">end</span></pre>
|
519
532
|
</div><!-- encode-source -->
|
520
533
|
|
@@ -532,7 +545,7 @@ following variables be set:</p>
|
|
532
545
|
|
533
546
|
<div class="method-heading">
|
534
547
|
<span class="method-name">status</span><span
|
535
|
-
class="method-args">(guid)</span>
|
548
|
+
class="method-args">(guid = "")</span>
|
536
549
|
<span class="method-click-advice">click to toggle source</span>
|
537
550
|
</div>
|
538
551
|
|
@@ -542,10 +555,14 @@ following variables be set:</p>
|
|
542
555
|
<p>Use this method to get the status of a video that is currently being
|
543
556
|
encoded. This method requires @username, @userkey and @guid to be set.</p>
|
544
557
|
|
558
|
+
<p>If @guid has not yet been set then you can pass it in the hash argument.</p>
|
559
|
+
|
545
560
|
<p>@TODO add the ability to yield to a block</p>
|
546
561
|
|
547
562
|
<p>Usage:</p>
|
548
563
|
<ul><li>
|
564
|
+
<p>moov_engine.status</p>
|
565
|
+
</li><li>
|
549
566
|
<p>moov_engine.status ‘GUID_OF_VIDEO’</p>
|
550
567
|
</li></ul>
|
551
568
|
|
@@ -553,9 +570,9 @@ encoded. This method requires @username, @userkey and @guid to be set.</p>
|
|
553
570
|
|
554
571
|
<div class="method-source-code" id="status-source">
|
555
572
|
<pre>
|
556
|
-
<span class="ruby-comment"># File lib/moovatom.rb, line
|
557
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">status</span>(<span class="ruby-identifier">guid</span>)
|
558
|
-
<span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span>
|
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">""</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>
|
559
576
|
<span class="ruby-ivar">@action</span> = <span class="ruby-string">'status'</span>
|
560
577
|
<span class="ruby-ivar">@xml_response</span> = <span class="ruby-identifier">send_xml_request</span>(<span class="ruby-identifier">build_xml_request</span>)
|
561
578
|
<span class="ruby-keyword">end</span></pre>
|
data/doc/created.rid
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
Sat, 10 Sep 2011 18:14:31 -0400
|
2
2
|
./Gemfile Wed, 10 Aug 2011 21:42:10 -0400
|
3
3
|
./init.rb Fri, 12 Aug 2011 19:25:47 -0400
|
4
|
-
./lib/moovatom/version.rb
|
5
|
-
./lib/moovatom.rb
|
4
|
+
./lib/moovatom/version.rb Fri, 09 Sep 2011 23:50:59 -0400
|
5
|
+
./lib/moovatom.rb Sat, 10 Sep 2011 18:13:10 -0400
|
6
6
|
./LICENSE.txt Wed, 10 Aug 2011 21:53:06 -0400
|
7
7
|
./Rakefile Wed, 10 Aug 2011 21:42:10 -0400
|
data/doc/lib/moovatom_rb.html
CHANGED
data/lib/moovatom/version.rb
CHANGED
data/lib/moovatom.rb
CHANGED
@@ -54,12 +54,15 @@ module MoovAtom
|
|
54
54
|
# Use this method to get the details about a video that's finished encoding.
|
55
55
|
# This method requires @username, @userkey and @guid to be set.
|
56
56
|
#
|
57
|
+
# If @guid has not yet been set then you can pass it in the hash argument.
|
58
|
+
#
|
57
59
|
# @TODO add the ability to yield to a block
|
58
60
|
#
|
59
61
|
# Usage:
|
62
|
+
# * moov_engine.details
|
60
63
|
# * moov_engine.details 'GUID_OF_VIDEO'
|
61
|
-
def details(guid)
|
62
|
-
@guid = guid
|
64
|
+
def details(guid = "")
|
65
|
+
@guid = guid if @guid.nil?
|
63
66
|
@action = 'details'
|
64
67
|
@xml_response = send_xml_request(build_xml_request)
|
65
68
|
end #-- end details method
|
@@ -67,12 +70,15 @@ module MoovAtom
|
|
67
70
|
# Use this method to get the status of a video that is currently being encoded.
|
68
71
|
# This method requires @username, @userkey and @guid to be set.
|
69
72
|
#
|
73
|
+
# If @guid has not yet been set then you can pass it in the hash argument.
|
74
|
+
#
|
70
75
|
# @TODO add the ability to yield to a block
|
71
76
|
#
|
72
77
|
# Usage:
|
78
|
+
# * moov_engine.status
|
73
79
|
# * moov_engine.status 'GUID_OF_VIDEO'
|
74
|
-
def status(guid)
|
75
|
-
@guid = guid
|
80
|
+
def status(guid = "")
|
81
|
+
@guid = guid if @guid.nil?
|
76
82
|
@action = 'status'
|
77
83
|
@xml_response = send_xml_request(build_xml_request)
|
78
84
|
end #-- end status method
|
@@ -104,10 +110,13 @@ module MoovAtom
|
|
104
110
|
# Use this method to cancel the encoding of a video.
|
105
111
|
# This method requires @username, @userkey and @guid to be set.
|
106
112
|
#
|
113
|
+
# If @guid has not yet been set then you can pass it in the hash argument.
|
114
|
+
#
|
107
115
|
# Usage:
|
116
|
+
# * moov_engine.cancel
|
108
117
|
# * moov_engine.cancel 'GUID_OF_VIDEO'
|
109
|
-
def cancel(guid)
|
110
|
-
@guid = guid
|
118
|
+
def cancel(guid = "")
|
119
|
+
@guid = guid if @guid.nil?
|
111
120
|
@action = 'cancel'
|
112
121
|
@xml_response = send_xml_request(build_xml_request)
|
113
122
|
end #-- end cancel method
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moovatom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-09-10 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
16
|
-
requirement: &
|
16
|
+
requirement: &70309525469680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70309525469680
|
25
25
|
description: This gem defines methods for controlling your videos on MoovAtom using
|
26
26
|
the MoovEngine API.
|
27
27
|
email:
|