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 +4 -4
- data/lib/dopaminekit/version.rb +1 -1
- data/lib/dopaminekit.rb +8 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa9bb69b04240c0e7d7df6ca455cfedd084e868
|
4
|
+
data.tar.gz: 986835950fdb8a08480ae23bb5115c30bfa44398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8308afdcdc4e20db698d2cb86000d889de9c85a1fa6a17b8391540126bb97fa9dc39aa585412050d6bc9befbd0639f908c7cc2fcc2293a06fc0e1a50784c8b75
|
7
|
+
data.tar.gz: 3dc54a13ebdef0ae3cff7526fb08f8424eadb4770a4ecedc29db5ebdf068c3d1871ec614ce5a461fa4e5fe4f6b0e4709962461584d5089de90155def3f89db25
|
data/lib/dopaminekit/version.rb
CHANGED
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(
|
55
|
-
return send(:track,
|
54
|
+
def track(payload)
|
55
|
+
return send(:track, payload)
|
56
56
|
end
|
57
57
|
|
58
|
-
def report(
|
59
|
-
return send(:report,
|
58
|
+
def report(payload)
|
59
|
+
return send(:report, payload)
|
60
60
|
end
|
61
61
|
|
62
|
-
def refresh(
|
63
|
-
return send(:refresh,
|
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,
|
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
|