boxspring 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/boxspring/card.rb +31 -0
- data/lib/boxspring/property.rb +11 -11
- data/lib/boxspring/{video.rb → story.rb} +2 -10
- data/lib/boxspring/version.rb +1 -1
- data/lib/boxspring/video_card.rb +6 -0
- data/lib/boxspring.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc5756cc43666a26ae580740c8f5c2db94400b1f
|
4
|
+
data.tar.gz: d7c9e59b3e25cce4aa89764aa840481cdfe5b4cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bb8cd8e1465da28f600ea66de575b4eff39c9d0cac86b4e2ec993fa7afe18cc553ab4aeb2c504ae9a018bf0c9fbc686a687eefe540a3a2853c2635077c63263
|
7
|
+
data.tar.gz: f947b47d645ea009626223ca0f5553062dd9886163719fcd7816059401f776bf9041765e5394b72ae108354a1d1c2106cb0914301ac25058aff04970ef6857d4
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Boxspring
|
2
|
+
|
3
|
+
class Card < Base
|
4
|
+
|
5
|
+
field :created_at
|
6
|
+
field :updated_at
|
7
|
+
|
8
|
+
field :type_name
|
9
|
+
field :id
|
10
|
+
field :name
|
11
|
+
field :body
|
12
|
+
|
13
|
+
field :picture_id
|
14
|
+
|
15
|
+
field :provider
|
16
|
+
field :provider_uid
|
17
|
+
field :provider_url
|
18
|
+
|
19
|
+
field :properties
|
20
|
+
|
21
|
+
def show
|
22
|
+
@_show ||= begin
|
23
|
+
self.attributes.include?( :show ) ?
|
24
|
+
Show.new( self.attributes[ :show ] ) :
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
data/lib/boxspring/property.rb
CHANGED
@@ -132,11 +132,11 @@ module Boxspring
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
-
def
|
136
|
-
response = @api_interface.get( "/
|
135
|
+
def stories( parameters = {} )
|
136
|
+
response = @api_interface.get( "/stories", parameters )
|
137
137
|
if ( response.success? )
|
138
|
-
response.content.map do |
|
139
|
-
|
138
|
+
response.content.map do | story |
|
139
|
+
Story.new( story )
|
140
140
|
end
|
141
141
|
elsif ( response.code == '404' )
|
142
142
|
nil
|
@@ -145,11 +145,11 @@ module Boxspring
|
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
148
|
-
def
|
149
|
-
response = @api_interface.get( "/shows/
|
148
|
+
def shows_stories( parameters = {} )
|
149
|
+
response = @api_interface.get( "/shows/stories", parameters )
|
150
150
|
if ( response.success? )
|
151
|
-
response.content.map do |
|
152
|
-
|
151
|
+
response.content.map do | story |
|
152
|
+
Story.new( story )
|
153
153
|
end
|
154
154
|
elsif ( response.code == '404' )
|
155
155
|
nil
|
@@ -158,10 +158,10 @@ module Boxspring
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
-
def
|
162
|
-
response = @api_interface.get( "/
|
161
|
+
def story_by_id( id )
|
162
|
+
response = @api_interface.get( "/stories/#{id}" )
|
163
163
|
if ( response.success? )
|
164
|
-
|
164
|
+
Story.new( response.content )
|
165
165
|
elsif ( response.code == '404' )
|
166
166
|
nil
|
167
167
|
else
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Boxspring
|
2
2
|
|
3
|
-
class
|
3
|
+
class Story < Base
|
4
4
|
|
5
5
|
include Taggable
|
6
6
|
|
7
7
|
field :created_at
|
8
8
|
field :updated_at
|
9
|
-
field :
|
9
|
+
field :edited_at
|
10
10
|
field :published_at
|
11
11
|
field :featured_at
|
12
12
|
|
@@ -31,16 +31,8 @@ module Boxspring
|
|
31
31
|
field :show_episode
|
32
32
|
field :show_season
|
33
33
|
|
34
|
-
field :provider
|
35
|
-
field :provider_uid
|
36
|
-
field :provider_title
|
37
|
-
field :provider_description
|
38
|
-
field :provider_url
|
39
|
-
|
40
|
-
field :duration
|
41
34
|
field :action_participations_count
|
42
35
|
field :react_actions_counts
|
43
|
-
field :views_count
|
44
36
|
|
45
37
|
def show
|
46
38
|
@_show ||= begin
|
data/lib/boxspring/version.rb
CHANGED
data/lib/boxspring.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxspring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristoph Cichocki-Romanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/boxspring.rb
|
77
77
|
- lib/boxspring/attribution.rb
|
78
78
|
- lib/boxspring/base.rb
|
79
|
+
- lib/boxspring/card.rb
|
79
80
|
- lib/boxspring/configuration.rb
|
80
81
|
- lib/boxspring/error.rb
|
81
82
|
- lib/boxspring/picture.rb
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- lib/boxspring/service.rb
|
88
89
|
- lib/boxspring/show.rb
|
89
90
|
- lib/boxspring/sponsor.rb
|
91
|
+
- lib/boxspring/story.rb
|
90
92
|
- lib/boxspring/tag.rb
|
91
93
|
- lib/boxspring/tag_collection.rb
|
92
94
|
- lib/boxspring/taggable.rb
|
@@ -94,7 +96,7 @@ files:
|
|
94
96
|
- lib/boxspring/theme_environment.rb
|
95
97
|
- lib/boxspring/user_agent.rb
|
96
98
|
- lib/boxspring/version.rb
|
97
|
-
- lib/boxspring/
|
99
|
+
- lib/boxspring/video_card.rb
|
98
100
|
homepage: http://bedrocket.com
|
99
101
|
licenses:
|
100
102
|
- MS-RL
|