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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4d79505ec21a254c383e5374b5965fc564be603
4
- data.tar.gz: 0f1377902122fe6f961474542a6290d56947096f
3
+ metadata.gz: cc5756cc43666a26ae580740c8f5c2db94400b1f
4
+ data.tar.gz: d7c9e59b3e25cce4aa89764aa840481cdfe5b4cc
5
5
  SHA512:
6
- metadata.gz: 5f5d7cee56673bae333b6dab07be256e6fca1bbb3c649218719e27988632227d9ce19cf26d22491cb239d7f233423e9a1f1eeb5abb361794ea2c8edae0730efa
7
- data.tar.gz: 8d1421646f86a83ee68742817c1417d8e18896bf9e7783c8f7527b6e35b7b1f06db80e2337129d46cf22d30d40ea5cf08c492e96d0ab67e3844e31a4733ac13e
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
@@ -132,11 +132,11 @@ module Boxspring
132
132
  end
133
133
  end
134
134
 
135
- def videos( parameters = {} )
136
- response = @api_interface.get( "/videos", parameters )
135
+ def stories( parameters = {} )
136
+ response = @api_interface.get( "/stories", parameters )
137
137
  if ( response.success? )
138
- response.content.map do | video |
139
- Video.new( video )
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 shows_videos( parameters = {} )
149
- response = @api_interface.get( "/shows/videos", parameters )
148
+ def shows_stories( parameters = {} )
149
+ response = @api_interface.get( "/shows/stories", parameters )
150
150
  if ( response.success? )
151
- response.content.map do | video |
152
- Video.new( video )
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 video_by_id( id )
162
- response = @api_interface.get( "/videos/#{id}" )
161
+ def story_by_id( id )
162
+ response = @api_interface.get( "/stories/#{id}" )
163
163
  if ( response.success? )
164
- Video.new( response.content )
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 Video < Base
3
+ class Story < Base
4
4
 
5
5
  include Taggable
6
6
 
7
7
  field :created_at
8
8
  field :updated_at
9
- field :uploaded_at
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
@@ -1,3 +1,3 @@
1
1
  module Boxspring
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -0,0 +1,6 @@
1
+ module Boxspring
2
+
3
+ class VideoCard < Card
4
+ end
5
+
6
+ end
data/lib/boxspring.rb CHANGED
@@ -20,5 +20,5 @@ require 'boxspring/tag_collection'
20
20
  require 'boxspring/user_agent'
21
21
  require 'boxspring/theme_environment'
22
22
  require 'boxspring/theme'
23
- require 'boxspring/video'
23
+ require 'boxspring/story'
24
24
  require 'boxspring/property'
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.9
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-10 00:00:00.000000000 Z
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/video.rb
99
+ - lib/boxspring/video_card.rb
98
100
  homepage: http://bedrocket.com
99
101
  licenses:
100
102
  - MS-RL