chatmeter 1.1.8 → 1.2.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
- SHA256:
3
- metadata.gz: 9d64e8edc503a5cdd9b9256468e41457be841a6e61db78dde68c7b781c5e9432
4
- data.tar.gz: 6db45a0fea8f7f2cc138a3556c2e0bcc74e495b6cabdaf7343c8d625d9252940
2
+ SHA1:
3
+ metadata.gz: b8eebf450429dcddfcd67621d8297e09d2847575
4
+ data.tar.gz: 47372164b63070b46192df93cb410bad67131fbb
5
5
  SHA512:
6
- metadata.gz: 357cfee8a87a64507990677d240339351d40ae3b0079d8020171034e3e68e2e77e598285cf7fdb94b97a7488bc04be93bd7243498bb4a7d47600814483654232
7
- data.tar.gz: f2fbb3b6e4dc06e490410f935eb16bed8cfc5978537e976a992c7f190608caf44e56c40b4a6b49b8ee7e10fe263d4c395b751363d434d7fe965de6507508a8e8
6
+ metadata.gz: 4d09562917cb680ed9572d51d35f3e0fac35347df9beeec0cbe75c666e3cc76911048bc7471457a5b289058606a70271108f8921a3d350f344329d3ec8e83487
7
+ data.tar.gz: da466335e96ce657471bd2b8daef09c926012d326b15b5166efacdc13646b7b6fe5bc42041b70ead80178d1987c2ee74b5779e1bbba59f606fbc81ac7de96b13
data/chatmeter.gemspec CHANGED
@@ -6,7 +6,7 @@ require "chatmeter/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "chatmeter"
8
8
  spec.version = Chatmeter::VERSION
9
- spec.authors = ["Levi Brown", "Kyle Rose", "Pablo Rodriguez"]
9
+ spec.authors = ["Levi Brown", "Kyle Rose", "Pablo Rodriguez", "Kirk Stennett"]
10
10
  spec.email = ["levi.brown@getg5.com"]
11
11
 
12
12
  spec.summary = %q{A ruby wrapper for the chatmeter API.}
data/lib/chatmeter/api.rb CHANGED
@@ -18,6 +18,7 @@ require "chatmeter/api/user_group_access"
18
18
  require "chatmeter/api/user_location_access"
19
19
  require "chatmeter/api/login"
20
20
  require "chatmeter/api/campaign"
21
+ require "chatmeter/api/competitors"
21
22
  require "chatmeter/api/mock"
22
23
  require "chatmeter/api/errors"
23
24
 
@@ -73,7 +74,7 @@ module Chatmeter
73
74
  reerror.set_backtrace(error.backtrace)
74
75
  raise(reerror)
75
76
  end
76
-
77
+
77
78
  if response.body && !response.body.empty?
78
79
  begin
79
80
  response.body = MultiJson.load(response.body, symbolize_keys: true)
@@ -0,0 +1,15 @@
1
+ module Chatmeter
2
+ class API
3
+
4
+ # GET /competitors
5
+ def competitors(params)
6
+ request(
7
+ expects: 200,
8
+ method: :post,
9
+ path: "/competitors",
10
+ body: params.to_json
11
+ )
12
+ end
13
+
14
+ end
15
+ end
@@ -8,6 +8,7 @@ require 'chatmeter/api/mock/location'
8
8
  require 'chatmeter/api/mock/review'
9
9
  require 'chatmeter/api/mock/account'
10
10
  require 'chatmeter/api/mock/campaign'
11
+ require 'chatmeter/api/mock/competitors'
11
12
 
12
13
  module Chatmeter
13
14
  class API
@@ -0,0 +1,48 @@
1
+ module Chatmeter
2
+ class API
3
+ module Mock
4
+
5
+ # stub POST /competitors
6
+ Excon.stub(expects: 200, method: :post, path: '/v5/competitors') do |params|
7
+ {
8
+ body: [
9
+ {
10
+ "locationId": "26794",
11
+ "competitorName": "Auto Detailing By Ron Thompson",
12
+ "competitorId": "1128900",
13
+ "providerListingUrls": {
14
+ "GOOGLE": "https://maps.google.com/?cid=11793612764198950331",
15
+ "YELP": "http://www.yelp.com/biz/auto-detailing-by-ron-thompson-portland"
16
+ },
17
+ "competitorAddress":"Auto Detailing By Ron Thompson, 34 Grosvenor Square, London, Engla, W1K 2HD, GB",
18
+ "competitorPhone":"02033503434"
19
+ },
20
+ {
21
+ "locationId": "26794",
22
+ "competitorName": "Auto Detailing By Ron Thompson Llc.",
23
+ "competitorId": "1060520",
24
+ "providerListingUrls": {
25
+ "GOOGLE": "https://maps.google.com/?cid=11793612764198950331",
26
+ "YELP": "http://www.yelp.com/biz/auto-detailing-by-ron-thompson-portland"
27
+ },
28
+ "competitorAddress":"Auto Detailing By Ron Thompson Llc., 12 Upper St Martin's Lane, London, Engla, WC2H 9FB, GB",
29
+ "competitorPhone":"02074209320"
30
+ },
31
+ {
32
+ "locationId": "26794",
33
+ "competitorName": "Alpha's Auto Detail",
34
+ "competitorId": "523196",
35
+ "providerListingUrls": {
36
+ "GOOGLE": "https://maps.google.com/?cid=17654320774046061809",
37
+ "YELP": "http://www.yelp.com/biz/alphas-auto-detail-portland"
38
+ },
39
+ "competitorAddress":"Alpha's Auto Detail, 2028 Hancock Street, San Diego, CA, 92110, US",
40
+ "competitorPhone":"6192949590"
41
+ }
42
+ ],
43
+ status: 200
44
+ }
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,3 +1,3 @@
1
1
  module Chatmeter
2
- VERSION = "1.1.8"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chatmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levi Brown
8
8
  - Kyle Rose
9
9
  - Pablo Rodriguez
10
+ - Kirk Stennett
10
11
  autorequire:
11
12
  bindir: exe
12
13
  cert_chain: []
13
- date: 2018-12-18 00:00:00.000000000 Z
14
+ date: 2019-04-30 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: bundler
@@ -132,6 +133,7 @@ files:
132
133
  - lib/chatmeter/api.rb
133
134
  - lib/chatmeter/api/account.rb
134
135
  - lib/chatmeter/api/campaign.rb
136
+ - lib/chatmeter/api/competitors.rb
135
137
  - lib/chatmeter/api/errors.rb
136
138
  - lib/chatmeter/api/group.rb
137
139
  - lib/chatmeter/api/location.rb
@@ -139,6 +141,7 @@ files:
139
141
  - lib/chatmeter/api/mock.rb
140
142
  - lib/chatmeter/api/mock/account.rb
141
143
  - lib/chatmeter/api/mock/campaign.rb
144
+ - lib/chatmeter/api/mock/competitors.rb
142
145
  - lib/chatmeter/api/mock/group.rb
143
146
  - lib/chatmeter/api/mock/location.rb
144
147
  - lib/chatmeter/api/mock/login.rb
@@ -173,8 +176,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
176
  version: '0'
174
177
  requirements: []
175
178
  rubyforge_project:
176
- rubygems_version: 2.7.7
179
+ rubygems_version: 2.6.14
177
180
  signing_key:
178
181
  specification_version: 4
179
182
  summary: A ruby wrapper for the chatmeter API.
180
183
  test_files: []
184
+ has_rdoc: