youku 0.0.1 → 0.0.2

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: 17d640c2c2b9d5bceaa84907bc1b90ae3dd916a4
4
- data.tar.gz: 793a6f425302d59f88837461e109b9950c66cafd
3
+ metadata.gz: 69d9b90bd4b2086f5013431bdc2ade6c2d7073ec
4
+ data.tar.gz: 1c755c180a51942382057c85d82a02d6c30d54be
5
5
  SHA512:
6
- metadata.gz: e27dbd9af443d1c39e85b10a8c0503160d6e392a3dcba7993821f20afb724fb018a2bb1c8917e27c7e777ca503d3ffe12d5c5c56b71cf45eaaa8a32424b3fae0
7
- data.tar.gz: adaa88bcd60393b2319a463e8c69c2abf5e9f4dc0458878ac2b69f0da1e4e4d7082833947c8e97ed8e5b20b6f843a9d9aebc0e2e1e3369755011f208e1d33190
6
+ metadata.gz: 2c5fe3e52cd43b6088b8f3f60bd0b77d97d48faa93fe25b098a0677c7c7d321104e941099ecfe04383be46497013290ad8becaed581a1f52278605e2de8ab334
7
+ data.tar.gz: c668c626fcf53dcf627cf58614136a0524fa911181be6581f691f66c02ada4626206913ca445017da7968f115111e255015a42269f28bb1d78ab7e49567c8b4d
@@ -9,4 +9,5 @@ puts result['total']
9
9
  puts result['shows'].first
10
10
  puts YouKu.videos_in_show(result['shows'].first['id'])
11
11
 
12
+ puts YouKu.playlist(21197898)
12
13
  puts YouKu.videos_in_playlist(21197898)
@@ -46,10 +46,22 @@ module YouKu
46
46
  result
47
47
  end
48
48
 
49
- def self.videos_in_playlist playlist_id
50
- videos_in_playlist_url = 'https://openapi.youku.com/v2/playlists/videos.json'
49
+ def self.playlist playlist_id
50
+ videos_in_playlist_url = 'https://openapi.youku.com/v2/playlists/show.json'
51
51
  msg = YouKu::Message.new
52
52
  result = MultiJson.load(msg.send(videos_in_playlist_url, {playlist_id: playlist_id}))
53
+ result
54
+ end
55
+
56
+ def self.videos_in_playlist playlist_id, options = {}
57
+ op = {
58
+ playlist_id: playlist_id,
59
+ page: 1,
60
+ count: 20
61
+ }
62
+ videos_in_playlist_url = 'https://openapi.youku.com/v2/playlists/videos.json'
63
+ msg = YouKu::Message.new
64
+ result = MultiJson.load(msg.send(videos_in_playlist_url, op))
53
65
  result
54
66
  end
55
67
 
@@ -1,3 +1,3 @@
1
1
  module Youku
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jimxl