motion-tube 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7edc3cd2c9706110d3804357d02a1d3fb036316f
4
- data.tar.gz: 704c08e83bb9ad5fd2cd663e4da50d66d3537c46
3
+ metadata.gz: d61199257e623e4c13bf49f2ed1a3a59a435af26
4
+ data.tar.gz: efa6b69acde194fb09ddc8ca0a10617e1a904eee
5
5
  SHA512:
6
- metadata.gz: 638a82c40ff5ea3400ed3c70989972ee8e1d2b08317fec97f18530a3133f96dcd78bc2ff942b73bb9249b5367631567964c7f4814aac8945c952f2fa78a42ee2
7
- data.tar.gz: c5976695f5683fb5a1d1ef647f7d53e277658ede3e950ea6597a4961847462ba98ea09657c6255ffa2c412f437a1e7e07f626ba860e5cdb6601ec4267085c0a5
6
+ metadata.gz: d4e6f57b5c8d3ff23b2c77363fac769185b9220df612e54db6eb3f980c4f68d847eee7a4cc0b13b9d8fa1a155c9bbbff69da993a2404f65d492148488f0f1863
7
+ data.tar.gz: 6c3dc841e56616fe4d181059650ef0bed56ad6430772fd84130253fd00392f73c8f95b30f0121b7fa5158ff3cda9b8404f6037d9f6d82500b3df2df3057d3776
data/README.md CHANGED
@@ -19,7 +19,21 @@ Or install it yourself as:
19
19
 
20
20
  ## Usage
21
21
 
22
- TODO: Write usage instructions here
22
+ To play a youtube video can be as simple as:
23
+
24
+ ```
25
+ (main)> parser = MotionTube::Parser.new
26
+ "https://www.youtube.com/watch?v=_S1S1gGS3lU"
27
+ => #<MotionTube::Parser:0x10ef5e8b0
28
+ @url="https://www.youtube.com/watch?v=_S1S1gGS3lU"
29
+ @rest_client=#<AFHTTPRequestOperationManager:0x10ef5fdd0>>
30
+ (main)> parser.parse do |result|
31
+ (main)> puts result[:title]
32
+ (main)> BW::Media.play_modal result[:media]["mp4"].last
33
+ (main)> end
34
+ => #<AFHTTPRequestOperation:0x10ec3faa0>
35
+ (main)> CoreDataQuery+(CDQ)+In+Action
36
+ ```
23
37
 
24
38
  ## Contributing
25
39
 
@@ -46,7 +46,7 @@ module MotionTube
46
46
  vedio_list = {}
47
47
  media.zip(sig, type).each do |m|
48
48
  m_type = m[2][0].match(/(flv|mp4|webm|3gp)/)[0]
49
- u = (m[0][0])
49
+ u = (m[0][0]).unescape_url
50
50
  if m[1]
51
51
  u += "&signature=" + m[1][0]
52
52
  end
data/lib/motion-tube.rb CHANGED
@@ -3,6 +3,8 @@
3
3
  unless defined?(Motion::Project::Config)
4
4
  raise "This file must be required within a RubyMotion project Rakefile."
5
5
  end
6
+ require "afmotion"
7
+ require 'sugarcube-foundation'
6
8
 
7
9
  lib_dir_path = File.dirname(File.expand_path(__FILE__))
8
10
  Motion::Project::App.setup do |app|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-tube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ruan