dopaminekit 4.0.0.beta1 → 4.0.0.beta2

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: c67187a375cee2ad629ac3bbf07fd48c1b90fda4
4
- data.tar.gz: ced8baa4c7d0d9b38bf9e311271162d3c63ccd9b
3
+ metadata.gz: cfa9bb69b04240c0e7d7df6ca455cfedd084e868
4
+ data.tar.gz: 986835950fdb8a08480ae23bb5115c30bfa44398
5
5
  SHA512:
6
- metadata.gz: 0a134792e784a80b0ac2e51e396009ab9732fb24e6592ad87489233afd796c45730588a7171c3b6734b51e3d0b345bc85200a5b74b29689e41329b9e4b10fd1f
7
- data.tar.gz: 1c5b898e836bb1e0e3c72397a5b4417966898efdc0a67c4d43b46a5b05a0aa121ecd79bbf9924e565480fa031948524cd9603c303dbabb68f51c148e89de3074
6
+ metadata.gz: 8308afdcdc4e20db698d2cb86000d889de9c85a1fa6a17b8391540126bb97fa9dc39aa585412050d6bc9befbd0639f908c7cc2fcc2293a06fc0e1a50784c8b75
7
+ data.tar.gz: 3dc54a13ebdef0ae3cff7526fb08f8424eadb4770a4ecedc29db5ebdf068c3d1871ec614ce5a461fa4e5fe4f6b0e4709962461584d5089de90155def3f89db25
@@ -1,3 +1,3 @@
1
1
  class Dopaminekit
2
- VERSION = "4.0.0.beta1"
2
+ VERSION = "4.0.0.beta2"
3
3
  end
data/lib/dopaminekit.rb CHANGED
@@ -51,16 +51,16 @@ class DopamineKit
51
51
  # Return:
52
52
  # +response+:: String - a JSON string containing the key 'status', and if 'status' != 200 also another key 'errors'
53
53
  #
54
- def track(identity, payload)
55
- return send(:track, identity, payload)
54
+ def track(payload)
55
+ return send(:track, payload)
56
56
  end
57
57
 
58
- def report(identity, payload)
59
- return send(:report, identity, payload)
58
+ def report(payload)
59
+ return send(:report, payload)
60
60
  end
61
61
 
62
- def refresh(identity, payload)
63
- return send(:refresh, identity, payload)
62
+ def refresh(payload)
63
+ return send(:refresh, payload)
64
64
  end
65
65
 
66
66
 
@@ -88,18 +88,13 @@ class DopamineKit
88
88
  ##
89
89
  # Privately used function to send an HTTP POST
90
90
  #
91
- def send(type, identity, data)
91
+ def send(type, data)
92
92
  if !data.is_a? Hash
93
- puts "[DopamineKit] - Invalid data for api call:#{data}"
94
- return
95
- end
96
- if !identity.is_a? String
97
- puts "[DopamineKit] - Invalid identity for report call:#{identity}"
93
+ puts "[DopamineKit] - Invalid data for api call:#{data} -- needs to be a Hash"
98
94
  return
99
95
  end
100
96
 
101
97
  postData = getBasePostData().merge(data)
102
- postData[:primaryIdentity] = identity
103
98
 
104
99
  url = "https://staging-api.usedopamine.com/v4/app/"
105
100
  case type
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dopaminekit
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta1
4
+ version: 4.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akash Desai