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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8eebf450429dcddfcd67621d8297e09d2847575
4
- data.tar.gz: 47372164b63070b46192df93cb410bad67131fbb
3
+ metadata.gz: 370cef80c0d815b4fd947100547be2e3f40caea8
4
+ data.tar.gz: 6f55c1e37858106db2d74eb901710d88b6dab0f7
5
5
  SHA512:
6
- metadata.gz: 4d09562917cb680ed9572d51d35f3e0fac35347df9beeec0cbe75c666e3cc76911048bc7471457a5b289058606a70271108f8921a3d350f344329d3ec8e83487
7
- data.tar.gz: da466335e96ce657471bd2b8daef09c926012d326b15b5166efacdc13646b7b6fe5bc42041b70ead80178d1987c2ee74b5779e1bbba59f606fbc81ac7de96b13
6
+ metadata.gz: dec2b8969570b04bdedcb9eb2e9f913a01081517ac37bd8e26658178dc7dcf99860fac920222da50aad92fcadca0dc4d57076a29205cb7ecc2e9f6068b856253
7
+ data.tar.gz: 69a161332a1dda1e71b037d3b3d703a2727a7a76e1a896b33b69ebec6e0083e8d7f31e315c653e02d673cdc7d0ca3ac201cd266936e852d157348eb5888e1612
data/lib/chatmeter/api.rb CHANGED
@@ -19,6 +19,7 @@ require "chatmeter/api/user_location_access"
19
19
  require "chatmeter/api/login"
20
20
  require "chatmeter/api/campaign"
21
21
  require "chatmeter/api/competitors"
22
+ require "chatmeter/api/listings"
22
23
  require "chatmeter/api/mock"
23
24
  require "chatmeter/api/errors"
24
25
 
@@ -0,0 +1,17 @@
1
+ require 'uri'
2
+
3
+ module Chatmeter
4
+ class API
5
+
6
+ # GET /listings
7
+ def get_listings(params={})
8
+ request(
9
+ expects: 200,
10
+ method: :get,
11
+ path: "/listings",
12
+ query: params
13
+ )
14
+ end
15
+
16
+ end
17
+ end
@@ -9,6 +9,7 @@ require 'chatmeter/api/mock/review'
9
9
  require 'chatmeter/api/mock/account'
10
10
  require 'chatmeter/api/mock/campaign'
11
11
  require 'chatmeter/api/mock/competitors'
12
+ require 'chatmeter/api/mock/listings'
12
13
 
13
14
  module Chatmeter
14
15
  class API
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Chatmeter
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.0
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-04-30 00:00:00.000000000 Z
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