chatmeter 1.2.0 → 1.3.0
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 +4 -4
- data/lib/chatmeter/api.rb +1 -0
- data/lib/chatmeter/api/listings.rb +17 -0
- data/lib/chatmeter/api/mock.rb +1 -0
- data/lib/chatmeter/api/mock/listings.rb +98 -0
- data/lib/chatmeter/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 370cef80c0d815b4fd947100547be2e3f40caea8
|
4
|
+
data.tar.gz: 6f55c1e37858106db2d74eb901710d88b6dab0f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dec2b8969570b04bdedcb9eb2e9f913a01081517ac37bd8e26658178dc7dcf99860fac920222da50aad92fcadca0dc4d57076a29205cb7ecc2e9f6068b856253
|
7
|
+
data.tar.gz: 69a161332a1dda1e71b037d3b3d703a2727a7a76e1a896b33b69ebec6e0083e8d7f31e315c653e02d673cdc7d0ca3ac201cd266936e852d157348eb5888e1612
|
data/lib/chatmeter/api.rb
CHANGED
data/lib/chatmeter/api/mock.rb
CHANGED
@@ -0,0 +1,98 @@
|
|
1
|
+
module Chatmeter
|
2
|
+
class API
|
3
|
+
module Mock
|
4
|
+
|
5
|
+
# stub GET /reviewBuilder/campaign/get
|
6
|
+
Excon.stub(expects: 200, method: :get, path: '/v5/listings') do |params|
|
7
|
+
request_params, mock_data = parse_stub_params(params)
|
8
|
+
{
|
9
|
+
body: {
|
10
|
+
"listings":[
|
11
|
+
{
|
12
|
+
"id": "24343434",
|
13
|
+
"locationId": "22121",
|
14
|
+
"contentProvider": "GOOGLE",
|
15
|
+
"listingType": "Best",
|
16
|
+
"listingURL": "https://maps.google.com/?cid=6534117673332158777",
|
17
|
+
"expected": {
|
18
|
+
"businessName": "Coffee Shop 2",
|
19
|
+
"website": "http://www.mycoffeeshop.com",
|
20
|
+
"address": {
|
21
|
+
"street": "234 Main Street",
|
22
|
+
"city": "San Diego",
|
23
|
+
"postalCode": "92101",
|
24
|
+
"state": "CA",
|
25
|
+
"country": "USA"
|
26
|
+
},
|
27
|
+
"phoneNumber": "5555551234"
|
28
|
+
},
|
29
|
+
"found": {
|
30
|
+
"businessName": "Coffee Shop",
|
31
|
+
"website": "http://www.mycoffeeshop.com",
|
32
|
+
"address": {
|
33
|
+
"street": "234 Main Street",
|
34
|
+
"city": "San Diego",
|
35
|
+
"postalCode": "92101",
|
36
|
+
"state": "AZ",
|
37
|
+
"country": "USA"
|
38
|
+
},
|
39
|
+
"phoneNumber": "5555550000"
|
40
|
+
},
|
41
|
+
"matchErrors": [
|
42
|
+
"BusinessName",
|
43
|
+
"PhoneNumber",
|
44
|
+
"State"
|
45
|
+
],
|
46
|
+
"listingInfo": {
|
47
|
+
"claimStatus": {
|
48
|
+
"claimed": false
|
49
|
+
},
|
50
|
+
"categories": [
|
51
|
+
"Coffee Shop",
|
52
|
+
"Cafe"
|
53
|
+
],
|
54
|
+
"photoURLs": [
|
55
|
+
"https://plus.google/232323/23.png"
|
56
|
+
],
|
57
|
+
"stats": {
|
58
|
+
"categories": 2,
|
59
|
+
"photos": 1,
|
60
|
+
"videos": 0,
|
61
|
+
"averageRating": 2.5,
|
62
|
+
"reviewCount": 10
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"dateAdded": "2014-02-09T01:20:38Z",
|
66
|
+
"lastUpdated": "2015-03-05T12:44:38Z"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"locationId": "22121",
|
70
|
+
"contentProvider": "BING",
|
71
|
+
"listingType": "Missing",
|
72
|
+
"expected": {
|
73
|
+
"businessName": "Coffee Shop 2",
|
74
|
+
"website": "http://www.mycoffeeshop.com",
|
75
|
+
"address": {
|
76
|
+
"street": "234 Main Street",
|
77
|
+
"city": "San Diego",
|
78
|
+
"postalCode": "92101",
|
79
|
+
"state": "CA",
|
80
|
+
"country": "USA"
|
81
|
+
},
|
82
|
+
"phoneNumber": "5555551234"
|
83
|
+
},
|
84
|
+
"found": {
|
85
|
+
},
|
86
|
+
"dateAdded": "2014-02-09T01:20:38Z",
|
87
|
+
"lastUpdated": "2015-03-05T12:44:38Z"
|
88
|
+
}
|
89
|
+
],
|
90
|
+
"hasMore": false
|
91
|
+
},
|
92
|
+
status: 200
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
data/lib/chatmeter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatmeter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Levi Brown
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-05-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/chatmeter/api/competitors.rb
|
137
137
|
- lib/chatmeter/api/errors.rb
|
138
138
|
- lib/chatmeter/api/group.rb
|
139
|
+
- lib/chatmeter/api/listings.rb
|
139
140
|
- lib/chatmeter/api/location.rb
|
140
141
|
- lib/chatmeter/api/login.rb
|
141
142
|
- lib/chatmeter/api/mock.rb
|
@@ -143,6 +144,7 @@ files:
|
|
143
144
|
- lib/chatmeter/api/mock/campaign.rb
|
144
145
|
- lib/chatmeter/api/mock/competitors.rb
|
145
146
|
- lib/chatmeter/api/mock/group.rb
|
147
|
+
- lib/chatmeter/api/mock/listings.rb
|
146
148
|
- lib/chatmeter/api/mock/location.rb
|
147
149
|
- lib/chatmeter/api/mock/login.rb
|
148
150
|
- lib/chatmeter/api/mock/review.rb
|