dialog-api 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dialog-api/api/track.rb +7 -3
- data/lib/dialog-api/request.rb +3 -3
- data/lib/dialog-api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02ed483cd09ee8a1a14f90916f1ca117cc2d4897
|
4
|
+
data.tar.gz: fe68258e00062988a78424c8dd0e299036a7566c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80e742906a72a23c9c3a67dfdb63d597f03d5d6e4a63713d6299b64391e3fb486554ea731393484669b10452f165b31c5f024e81752104e35d73638de8a769de
|
7
|
+
data.tar.gz: 695decfed992c2119ce107f97feaaab9179247bb2ade2cb80e985eda3e2486efb59011bbde071b38f0d90efd9a01f20f7e9fcc7caa1dd8e29a91c51f7dd27191
|
data/lib/dialog-api/api/track.rb
CHANGED
@@ -8,9 +8,6 @@ module Dialog
|
|
8
8
|
def track(payload)
|
9
9
|
body = {
|
10
10
|
message: {
|
11
|
-
conversation_distinct_id: payload[:conversation_distinct_id],
|
12
|
-
creator_distinct_id: payload[:creator_distinct_id],
|
13
|
-
creator_type: payload[:creator_type],
|
14
11
|
distinct_id: payload[:distinct_id],
|
15
12
|
platform: payload[:platform],
|
16
13
|
provider: payload[:provider],
|
@@ -19,6 +16,13 @@ module Dialog
|
|
19
16
|
properties: {
|
20
17
|
text: payload[:text]
|
21
18
|
}
|
19
|
+
},
|
20
|
+
conversation: {
|
21
|
+
distinct_id: payload[:conversation_distinct_id]
|
22
|
+
},
|
23
|
+
creator: {
|
24
|
+
distinct_id: payload[:creator_distinct_id],
|
25
|
+
type: payload[:creator_type]
|
22
26
|
}
|
23
27
|
}
|
24
28
|
|
data/lib/dialog-api/request.rb
CHANGED
@@ -30,9 +30,9 @@ module Dialog
|
|
30
30
|
raise ArgumentError, ("Please configure Dialog.bot_id first") unless bot_id
|
31
31
|
|
32
32
|
headers = {
|
33
|
-
'
|
34
|
-
'
|
35
|
-
'
|
33
|
+
'Accept' => "application/json",
|
34
|
+
'Authorization' => "Api-Key #{api_token}",
|
35
|
+
'User-Agent' => Dialog.user_agent
|
36
36
|
}
|
37
37
|
|
38
38
|
response = Http.headers(headers).send(method, path, params: params, json: body)
|
data/lib/dialog-api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dialog-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Dionne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.
|
64
|
+
rubygems_version: 2.5.1
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: A ruby client for the Dialog API.
|