wes-data-api 10.10.0 → 10.11.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: f026700200ea01f3fa9d290fcb26a4c1ffbbce5d
4
- data.tar.gz: f57721271fb9af17eab51733be1f0b08330dfe08
3
+ metadata.gz: 181f62d2b3d065439e3423176292f75ea4db9e2e
4
+ data.tar.gz: 59b213d80c734f917551515a843381676c6179d1
5
5
  SHA512:
6
- metadata.gz: bd6aca904dacc68cf70d1b9c422e55c607daf6333b948cbaafee141f3df48acd70aa91237d7def6fff3b730a3754cb6b82a20ea8131e9a3a6d9ad377565a6286
7
- data.tar.gz: fb5f91219d00e2b5c084ab97dc773fc4910de130c5620de608320945f72cc76e2e3e54a1c50bf88dd0287ec5f19ead63419aa7eb5c9d214c8bae146239dc941b
6
+ metadata.gz: 5ee58038a0382b1a4008c43789a7c189c26dc3ed4923549d243a22d5bf70cc77cc6fbb03bf29032fcf5c8535f5ede9dc14427f2d52180317efabee2cd506d947
7
+ data.tar.gz: 655e86ac460e78c4e120517a1c88a02033f7c3349eaebce53f9d5eb32518e76ee51aa690edb06ad10fd11fd53526487d3f4d787dfc084058b70c94e9dd83018f
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.10.0'.freeze
8
+ VERSION = '10.11.0'.freeze
9
9
  end
10
10
  end
11
11
  end
@@ -12,9 +12,22 @@ module Wes
12
12
  def all(state = nil, not_hidden = false)
13
13
  route = add_state(routes.briefs, state)
14
14
  route = format('%s?not_hidden', route) if not_hidden
15
- map_objects(
16
- client.get(route), model_klass
17
- )
15
+ map_objects(client.get(route), model_klass)
16
+ end
17
+
18
+ def brand_category(not_hidden: false)
19
+ route = format('%s/brand', routes.brief)
20
+ retrieve_brefs_for_category(route, not_hidden)
21
+ end
22
+
23
+ def vidsy_category(user_id:, not_hidden: false)
24
+ route = format('%s/vidsy?user_id=%s', routes.brief, user_id)
25
+ retrieve_brefs_for_category(route, not_hidden)
26
+ end
27
+
28
+ def squad_category(user_id:, not_hidden: false)
29
+ route = format('%s/squad?user_id=%s', routes.brief, user_id)
30
+ retrieve_brefs_for_category(route, not_hidden)
18
31
  end
19
32
 
20
33
  def create(data)
@@ -48,6 +61,11 @@ module Wes
48
61
  def model_klass
49
62
  Wes::Data::API::Model::Brief
50
63
  end
64
+
65
+ def retrieve_brefs_for_category(route, not_hidden)
66
+ route = format('%s?not_hidden', route) if not_hidden
67
+ map_objects(client.get(route), model_klass)
68
+ end
51
69
  end
52
70
  end
53
71
  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.10.0
4
+ version: 10.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2016-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler