hooloo 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hooloo/genre.rb +1 -1
- data/lib/hooloo/show.rb +2 -2
- data/lib/hooloo/version.rb +1 -1
- data/spec/hooloo/genre_spec.rb +2 -2
- data/spec/hooloo/show_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f4aaebd7ca3981363c320e3cb19769b9519d2a8
|
4
|
+
data.tar.gz: 4c603818c898840178d08c031d5a6cfa716504e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3dfe8aa170e0c04453ff8a173be0031136cc9a7f0104db56444d297ab4f69eace237f64b63f325636a062e416d809b4ac6a12fad777de21a7dd7120668ef654
|
7
|
+
data.tar.gz: bb7b0f9d36d899714e79a1f74b9f67a85c70272872cbe500ad3bc35540bc7043336e7a60cada428f5cb6fde2340b56f6d00f1323fc5932ab412b93789efc34ac
|
data/lib/hooloo/genre.rb
CHANGED
@@ -15,7 +15,7 @@ class Hooloo::Genre < Hooloo::MozartHash
|
|
15
15
|
Hooloo.paginated_request('shows', {
|
16
16
|
genre: canonical_name,
|
17
17
|
sort: 'release_with_popularity'
|
18
|
-
}.merge(args)) { |g, x| g << Hooloo::Show.new(x['show']) }
|
18
|
+
}.merge(args), 100) { |g, x| g << Hooloo::Show.new(x['show']) }
|
19
19
|
end
|
20
20
|
# List all genres known to Hulu
|
21
21
|
#
|
data/lib/hooloo/show.rb
CHANGED
@@ -2,7 +2,7 @@ class Hooloo::Show < Hooloo::MozartHash
|
|
2
2
|
def self.popular_today(args={})
|
3
3
|
Hooloo.paginated_request('shows', {
|
4
4
|
sort: 'popular_today'
|
5
|
-
}.merge(args)) { |g, x| g << Hooloo::Show.new(x['show']) }
|
5
|
+
}.merge(args), 30) { |g, x| g << Hooloo::Show.new(x['show']) }
|
6
6
|
end
|
7
7
|
def initialize(id)
|
8
8
|
super
|
@@ -15,7 +15,7 @@ class Hooloo::Show < Hooloo::MozartHash
|
|
15
15
|
def videos(season=1, args={})
|
16
16
|
Hooloo.paginated_request("shows/#{id}/episodes", {
|
17
17
|
season_number: season
|
18
|
-
}.merge(args)) { |g, x| g << Hooloo::Video.new(x['video']) }
|
18
|
+
}.merge(args), 30) { |g, x| g << Hooloo::Video.new(x['video']) }
|
19
19
|
end
|
20
20
|
bool :embed_permitted, :has_captions
|
21
21
|
date :cache_time
|
data/lib/hooloo/version.rb
CHANGED
data/spec/hooloo/genre_spec.rb
CHANGED
@@ -11,10 +11,10 @@ describe Hooloo::Genre do
|
|
11
11
|
describe 'Shows List' do
|
12
12
|
let(:genre) { Hooloo::Genre.new 'anime' }
|
13
13
|
it 'should return multiple shows' do
|
14
|
-
genre.shows.count.must_be :>, 0
|
14
|
+
genre.shows.first(50).count.must_be :>, 0
|
15
15
|
end
|
16
16
|
it 'should convert shows to Show objects' do
|
17
|
-
genre.shows.each { |x| x.must_be_instance_of Hooloo::Show }
|
17
|
+
genre.shows.first(5).each { |x| x.must_be_instance_of Hooloo::Show }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/spec/hooloo/show_spec.rb
CHANGED