megam_api 1.10.5 → 1.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/megam/api/accounts.rb +11 -0
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/account.rb +9 -0
- 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: da53d6f54a414cad8de354c5d039df9973f80e23
|
4
|
+
data.tar.gz: 5111162149d9b2d7404e52059eb2a52084928332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1ca83f52cbd03623aeb0fd8ff4c24c8b6b94c2867d99d29526abde36c41648ef5c1c58b0105a847e94712b036080e9bb79e5edbc87d74eea06e114349b8ca4b
|
7
|
+
data.tar.gz: cd12f837cd9f414044ac1ae45ae15d7266c2a70bec5518626d4e48a930a6d780aa101152bdf561268c11820bb49a2c28c76d9581dd2b408458be4845bca5a27f
|
data/lib/megam/api/accounts.rb
CHANGED
@@ -58,6 +58,17 @@ module Megam
|
|
58
58
|
)
|
59
59
|
end
|
60
60
|
|
61
|
+
def delete_accounts(delete_account)
|
62
|
+
@options = {path: "/admin/accounts/#{delete_account["email"]}",
|
63
|
+
:body => ''}.merge(@options)
|
64
|
+
|
65
|
+
request(
|
66
|
+
:expects => 200,
|
67
|
+
:method => :delete,
|
68
|
+
:body => @options[:body]
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
61
72
|
def password_reset(account)
|
62
73
|
@options = {:path => "/accounts/password_reset", passthru: true,
|
63
74
|
body: Megam::JSONCompat.to_json(account)}.merge(@options)
|
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/account.rb
CHANGED
@@ -189,6 +189,15 @@ module Megam
|
|
189
189
|
acct.forgot
|
190
190
|
end
|
191
191
|
|
192
|
+
def self.remove(o)
|
193
|
+
acct = from_hash(o)
|
194
|
+
acct.remove
|
195
|
+
end
|
196
|
+
|
197
|
+
def remove
|
198
|
+
megam_rest.delete_accounts(to_hash)
|
199
|
+
end
|
200
|
+
|
192
201
|
def self.password_reset(o)
|
193
202
|
acct = from_hash(o)
|
194
203
|
acct.password_reset
|