wes-data-api 10.5.0 → 10.6.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: b5b12f80f4beef0e352d3dee0700d66d74d987f3
4
- data.tar.gz: d1eb6db43955497cc3364fb19a46fbad7a75dc98
3
+ metadata.gz: dc44698fd029c6dfd0fe9c9325c7fd5c364275dd
4
+ data.tar.gz: e328f5a3c35ff7749c27e70e47c1986818f647c3
5
5
  SHA512:
6
- metadata.gz: bb77238434b1b9abf227ac2b5748f05318e02100caf14997f63d0e6acb5bc67a57923c332d712a90c872dbd847324a600b9bacd0dbeab0506180bcdf46d86db6
7
- data.tar.gz: 8454c62ce3ace6bd3ed74ef9aae28d0a8b2da6be4dde494291e6086c0e08f751a1567e7ed6ad5fcb0e963222569421ce3933d82c540d280227c4f0b3aa1fbc0b
6
+ metadata.gz: 8dd2ec85c7a4dad61aedb11354a577d37592b017152c1047773b50847f9b46091016ad12f2b4a949f34ebbb38d6f21f0e84c74f9593bac9c52e690804dd4127e
7
+ data.tar.gz: b507f0d0599a79d67978329d579c149b59f843bc7f0d479edd3cb56e08476a1364b5a47c06461debd11ea814483a1ea83f355823ec1b2217a7f6b66e9f2141d9
data/lib/wes/data/api.rb CHANGED
@@ -5,7 +5,7 @@ require 'wes/data/api/configuration'
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = '10.5.0'.freeze
8
+ VERSION = '10.6.0'.freeze
9
9
  end
10
10
  end
11
11
  end
@@ -23,7 +23,7 @@ module Wes
23
23
 
24
24
  def add_state(route, state)
25
25
  return route unless state
26
- "#{route}/#{state}"
26
+ format('%s/%s', route, state)
27
27
  end
28
28
 
29
29
  def client
@@ -52,8 +52,8 @@ module Wes
52
52
  update(status: s)
53
53
  end
54
54
 
55
- def videos(state: nil, fetch: false)
56
- records = fetch || !state.nil? ? fetch_videos(state)
55
+ def videos(fetch: false, state: nil, not_under_nda: false)
56
+ records = fetch || !state.nil? ? fetch_videos(state, not_under_nda)
57
57
  : @attributes.videos
58
58
  map_objects(
59
59
  records, Wes::Data::API::Model::Video
@@ -90,10 +90,12 @@ module Wes
90
90
  client.get(route)
91
91
  end
92
92
 
93
- def fetch_videos(state)
93
+ def fetch_videos(state, not_under_nda)
94
94
  route = add_state(
95
95
  [routes.brief, id, routes.videos].join('/'), state
96
96
  )
97
+
98
+ route = format('%s?not_under_nda', route) if not_under_nda
97
99
  client.get(route)
98
100
  end
99
101
  end
@@ -31,10 +31,13 @@ module Wes
31
31
  self
32
32
  end
33
33
 
34
- def videos(fetch: false, state: nil)
34
+ def videos(fetch: false, state: nil, not_under_nda: false)
35
35
  route = [
36
36
  routes.creator_user, id, routes.videos, state
37
37
  ].compact.join('/')
38
+
39
+ route = format('%s?not_under_nda', route) if not_under_nda
40
+
38
41
  records = fetch ? client.get(route) : @attributes.videos
39
42
  map_objects(records, Wes::Data::API::Model::Video)
40
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.5.0
4
+ version: 10.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-07 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler