hooloo 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hooloo.gemspec +0 -1
- data/lib/hooloo/mozart_hash.rb +10 -0
- data/lib/hooloo/version.rb +1 -1
- data/lib/hooloo/video.rb +2 -2
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85573d2b1b378c17ec0143207b0fe001e121e14b
|
4
|
+
data.tar.gz: 49a263beb1aebb40aad6122b973f047112bb91e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 102aab5dee2acd6fe9638a091340adbade108ba5bc2077e9a127a874ba73c42d6a9431ea122c4ef7e09ea26f0eb7129d37d78336c20611702e91fb6d0ab0cf2e
|
7
|
+
data.tar.gz: dbe99bf1541d50a9033402201f6f69dcff16cfbcce0ea350c0f1dc3c80f0ddf94913c01e47ac10c8772acb5406caccdf0ab4558a3ace25709840515d9e355cc4
|
data/hooloo.gemspec
CHANGED
data/lib/hooloo/mozart_hash.rb
CHANGED
@@ -21,6 +21,16 @@ class Hooloo::MozartHash
|
|
21
21
|
define_method(field.to_s + '?') { @obj[mapping] }
|
22
22
|
end
|
23
23
|
end
|
24
|
+
def uri(*mappings)
|
25
|
+
field_mapping(mappings).each do |field, mapping|
|
26
|
+
define_method(field.to_s) { URI @obj[mapping.to_s] }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
def float(*mappings)
|
30
|
+
field_mapping(mappings).each do |field, mapping|
|
31
|
+
define_method(field.to_s) { @obj[mapping.to_s].to_f }
|
32
|
+
end
|
33
|
+
end
|
24
34
|
def cast(klass, mappings, opts={map_array: true, map: false})
|
25
35
|
field_mapping(mappings).each do |field, mapping|
|
26
36
|
define_method(field) do
|
data/lib/hooloo/version.rb
CHANGED
data/lib/hooloo/video.rb
CHANGED
@@ -15,6 +15,6 @@ class Hooloo::Video < Hooloo::MozartHash
|
|
15
15
|
date :available_at, :cache_time, :original_premiere_date, :released_at
|
16
16
|
bool :embed_permitted, :has_captions, :has_hd, :is_auth_valid, :is_expiring, :is_html5_enabled,
|
17
17
|
:is_mature, :is_subscriber_only, :is_web_only
|
18
|
-
|
19
|
-
|
18
|
+
float :duration
|
19
|
+
uri :thumbnail_url
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooloo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Lejeck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: httplog
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '>='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
description: |
|
98
84
|
Based on the magic of APIs, we are now capable of connecting to Hulu and retrieving their data for
|
99
85
|
use in other applications. A warning to ye who dare use this, however: Hulu does not guarantee
|
@@ -150,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
136
|
version: '0'
|
151
137
|
requirements: []
|
152
138
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.1.11
|
154
140
|
signing_key:
|
155
141
|
specification_version: 4
|
156
142
|
summary: Unofficial Client for the Hulu "Hidden" API
|