capcoauth 0.2.2 → 0.2.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 +4 -4
- data/lib/capcoauth/notifications.rb +4 -4
- data/lib/capcoauth/version.rb +1 -1
- 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: 95d9e9c324526ffa34995e6d9725d10aabefbdfd
|
|
4
|
+
data.tar.gz: bd77a5ce3fff62a79c5d1503b709279992f255ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 461d2c47ca66020cad3818c948939a539988e88b551951434b31399b0eb4aca2d5a7ac091d411d5039cb0b94beef87a6c10e060b0f6adbb5a991b64eb70800e4
|
|
7
|
+
data.tar.gz: e3a038b04a75bd2c556d6bdf67629034bc8e2851f966b218fb0dfcc62962bd02265f2736d6c09bdf328a90866be7735b9660395919d7e87d7082084da5d72fa6
|
|
@@ -12,7 +12,7 @@ module Capcoauth
|
|
|
12
12
|
return @@bearer_token if @@bearer_token.present?
|
|
13
13
|
|
|
14
14
|
res = self.post(
|
|
15
|
-
|
|
15
|
+
"#{Capcoauth.configuration.capcoauth_url}/oauth/token",
|
|
16
16
|
{
|
|
17
17
|
body: {
|
|
18
18
|
grant_type: 'client_credentials',
|
|
@@ -56,7 +56,7 @@ module Capcoauth
|
|
|
56
56
|
}
|
|
57
57
|
body[:data][:attributes][:environment] = environment if device_type == 'ios'
|
|
58
58
|
res = self.post(
|
|
59
|
-
|
|
59
|
+
"#{Capcoauth.configuration.capcoauth_url}/api/v1/user_devices",
|
|
60
60
|
{
|
|
61
61
|
body: body.to_json,
|
|
62
62
|
headers: default_headers
|
|
@@ -69,14 +69,14 @@ module Capcoauth
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def remove_device_token(device_token)
|
|
72
|
-
res = self.delete("/api/v1/user_devices/#{device_token}", headers: default_headers)
|
|
72
|
+
res = self.delete("#{Capcoauth.configuration.capcoauth_url}/api/v1/user_devices/#{device_token}", headers: default_headers)
|
|
73
73
|
@@bearer_token = nil if res.code == 401
|
|
74
74
|
res.code == 204
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def notify(user_id, alert=nil, badge=nil, data=nil)
|
|
78
78
|
res = self.post(
|
|
79
|
-
|
|
79
|
+
"#{Capcoauth.configuration.capcoauth_url}/api/v1/user_notifications",
|
|
80
80
|
{
|
|
81
81
|
body: {
|
|
82
82
|
data: {
|
data/lib/capcoauth/version.rb
CHANGED