pwush 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pwush/client.rb +38 -0
- data/lib/pwush/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64bff134d7da6b063f84423e182951488f3ebaef7fd405fc6371f31cad48673f
|
4
|
+
data.tar.gz: f19a0d73e8b422386ea32f14844a30233b0a7c73d3cd626012624a9a31707c07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c79ed4759b0d6a6e3d0a7609e16590ea5b48af20e0e4b522fb1ef73d72f04228093914a50a9c909d0bd5c3d2d77192a90524117d90d9780dbff8768f0eb0eef
|
7
|
+
data.tar.gz: 5e8e154198262bcd980667c3aeead254a85145539aa5f6ab5d58550f1c6dc05dacb0e9a064eba8e04fac90a76c2650f5c7dccf3451b4d2887fcded36bd4f0384
|
data/lib/pwush/client.rb
CHANGED
@@ -35,6 +35,44 @@ module Pwush
|
|
35
35
|
post(:getPreset, preset_code: preset_code)
|
36
36
|
end
|
37
37
|
|
38
|
+
### DEVICE API
|
39
|
+
|
40
|
+
def register_device(params)
|
41
|
+
post(:registerDevice, params)
|
42
|
+
end
|
43
|
+
|
44
|
+
def unregister_device(hwid)
|
45
|
+
post(:unregisterDevice, hwid: hwid)
|
46
|
+
end
|
47
|
+
|
48
|
+
def create_test_device(params)
|
49
|
+
post(:createTestDevice, params)
|
50
|
+
end
|
51
|
+
|
52
|
+
def list_test_devices
|
53
|
+
post(:listTestDevices)
|
54
|
+
end
|
55
|
+
|
56
|
+
def set_badge(hwid, badge)
|
57
|
+
post(:setBadge, hwid: hwid, badge: badge)
|
58
|
+
end
|
59
|
+
|
60
|
+
def application_open(hwid)
|
61
|
+
post(:applicationOpen, hwid: hwid)
|
62
|
+
end
|
63
|
+
|
64
|
+
def push_stat(hwid, hash_tag = nil)
|
65
|
+
post(:pushStat, hwid: hwid, hash: hash_tag)
|
66
|
+
end
|
67
|
+
|
68
|
+
def message_delivery_event(hwid, hash_tag = nil)
|
69
|
+
post(:messageDeliveryEvent, hwid: hwid, hash: hash_tag)
|
70
|
+
end
|
71
|
+
|
72
|
+
def set_purchase(hwid, params = {})
|
73
|
+
post(:setPurchase, params.merge(hwid: hwid))
|
74
|
+
end
|
75
|
+
|
38
76
|
private
|
39
77
|
|
40
78
|
def get(action, payload = nil)
|
data/lib/pwush/version.rb
CHANGED