dialog-api 0.0.2 → 0.0.3

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: 8e372a4430bbd304f323b1bc031d73f16a566ca5
4
- data.tar.gz: b6d19f20daac02a080787b8253587ec2dcca9235
3
+ metadata.gz: 02ed483cd09ee8a1a14f90916f1ca117cc2d4897
4
+ data.tar.gz: fe68258e00062988a78424c8dd0e299036a7566c
5
5
  SHA512:
6
- metadata.gz: ae426620a85e5b85b96156797de093f379a10a264619245a5b5568023fa151ec073e53b1bbe621b7a79a0e146f328d520bfcf196af4baea2f2ea54f19c84ae9f
7
- data.tar.gz: 1c5ea3c74da2304f4d0e7671bf30f10e6695fe0c3438642907812d322ef5e7509911629de132aba3176d9fb2a80a3df92b592e102c13f41d8a4909a25ee7c9a1
6
+ metadata.gz: 80e742906a72a23c9c3a67dfdb63d597f03d5d6e4a63713d6299b64391e3fb486554ea731393484669b10452f165b31c5f024e81752104e35d73638de8a769de
7
+ data.tar.gz: 695decfed992c2119ce107f97feaaab9179247bb2ade2cb80e985eda3e2486efb59011bbde071b38f0d90efd9a01f20f7e9fcc7caa1dd8e29a91c51f7dd27191
@@ -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
 
@@ -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
- 'accept' => "application/json",
34
- 'User-Agent' => Dialog.user_agent,
35
- 'Authorization' => "Api-Key #{api_token}"
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)
@@ -1,3 +1,3 @@
1
1
  module Dialog
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-09-22 00:00:00.000000000 Z
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.6.6
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.