espresso_path 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b72575522e8a02c4fc38179f715f0d9d2145402
4
- data.tar.gz: 9e6f15e9259f1ab7c690b9484b12fb9ebd8dee94
3
+ metadata.gz: c196fb46dcd16c49fd44b559427d37646dbbe149
4
+ data.tar.gz: 4a81ee522958f17fb0c77f2a329af9783398b388
5
5
  SHA512:
6
- metadata.gz: 27a78ea78996a1ca1fd52b779531bec2cbdf7a38a79228d875753da43079202d2303cb1273984322892a16ed265a812b39e0c1f600b44103ca3bed891cf7de36
7
- data.tar.gz: 5aed84a43ce86001bc431beeaa70667ec08eaa02e3ad836735065b6c04a39cbb8ba2bf28c80c09ba4b5626b4232d91315ab74446e75bae8c2ce60052358a36f9
6
+ metadata.gz: f32ab8d883a0690a042ae1b3181f3e134d448a779f34dfe45ad62e10132f046a402b50b77bde3cd8cd4fc894b48793c5966b4d1adb54fea6cda353c578c65e1e
7
+ data.tar.gz: b404c5ae1d945f192e9dbf4cc76b4cec6ae8dd97cb0214420a0513407c6c62ba1371cdb74ebfd8c2e038745fbdb8ff4fe6fd7024c5c3ce509549210997e8af9a
@@ -3,6 +3,8 @@ require 'httparty'
3
3
  require 'json'
4
4
 
5
5
  module EspressoPath
6
+ ##
7
+ # This class is the base client for the API
6
8
  class Client
7
9
  include HTTParty
8
10
 
@@ -24,16 +26,23 @@ module EspressoPath
24
26
  @options = {
25
27
  headers: {
26
28
  Authorization: "Bearer #{@access_token}"
27
- }
29
+ },
30
+
28
31
  }
29
32
  end
30
33
 
34
+ def map_services(type, level, ids, options = @options)
35
+ options[:query] = { ids: ids}
36
+ puts options.inspect
37
+ self.class.get("/mapservices/#{type}/#{level}", @options)
38
+ end
39
+
31
40
  def audience
32
41
  self.class.get('/audience', @options)
33
42
  end
34
43
 
35
- def day_parts
36
- self.class.get('/day-parts', @options)
44
+ def census_tracts
45
+ self.class.get('/census-tracts', @options)
37
46
  end
38
47
 
39
48
  def counties
@@ -44,32 +53,74 @@ module EspressoPath
44
53
  self.class.get('/custom-demos', @options)
45
54
  end
46
55
 
47
- def media_types
48
- self.class.get('/media-types', @options)
56
+ def custom_markets
57
+ self.class.get('/custom-markets', @options)
49
58
  end
50
59
 
51
- def operators
52
- self.class.get('/operators', @options)
60
+ def day_parts
61
+ self.class.get('/day-parts', @options)
53
62
  end
54
63
 
55
- def plants
56
- self.class.get('/plants', @options)
64
+ def day_part(id)
65
+ self.class.get("/day-parts/#{id}", @options)
57
66
  end
58
67
 
59
- def markets
60
- self.class.get('/markets', @options)
68
+ def demos
69
+ self.class.get('/demos/categories', @options)
70
+ end
71
+
72
+ def demo_subcategories(id)
73
+ self.class.get("/demos/demo_subcategories/#{id}/demo", @options)
61
74
  end
62
75
 
63
76
  def market(market)
64
77
  self.class.get("/markets/#{market}", @options)
65
78
  end
66
79
 
80
+ def markets
81
+ self.class.get('/markets', @options)
82
+ end
83
+
84
+ # Get all the MediaTypes
85
+ def media_types
86
+ self.class.get('/media-types', @options)
87
+ end
88
+
89
+ # Get the MediaType referenced by the ID
90
+ # # ==== Attributes
91
+ #
92
+ # * +id+ - The id of the object you wish to retrieve.
93
+ def media_type(id)
94
+ self.class.get("/media-types/#{id}", @options)
95
+ end
96
+
97
+ def operators
98
+ self.class.get('/operators', @options)
99
+ end
100
+
101
+ def panel_sets
102
+ self.class.get('/panel-sets', @options)
103
+ end
104
+
105
+ # Get all the panels
67
106
  def panels
68
107
  self.class.get('/panels', @options)
69
108
  end
70
109
 
71
- def demo_categories
72
- self.class.get('/demos/categories', @options)
110
+ def panel(id)
111
+ self.class.get("/panels/#{id}", @options)
112
+ end
113
+
114
+ def panels_nearby
115
+ self.class.get('/panels/nearby', @options)
116
+ end
117
+
118
+ def plants
119
+ self.class.get('/plants', @options)
120
+ end
121
+
122
+ def plant(id)
123
+ self.class.get("/plants/#{id}", @options)
73
124
  end
74
125
 
75
126
  def states
@@ -1,3 +1,3 @@
1
1
  module EspressoPath
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espresso_path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - KickinEspresso
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2018-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty