mojesouhlasy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/mojesouhlasy/users.rb +4 -0
- data/lib/mojesouhlasy/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: b1c9b8aad1297d80c56209743bff1099bd518394
|
4
|
+
data.tar.gz: 54ecb2dc8cfe24788c16902010b44a29faa6e1bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6014edc27095dd5d55ff66b040824ca37cb99767970818cad7e0f2f893622350c357e9020133424a44427cc9ecf7e015fe98d60b29669f28d481405475257e91
|
7
|
+
data.tar.gz: dcb4d74c78da130bd0cfe5dec1944355051fe329252764e6d1f10bd61e1aceedf3a70441f099dd237ad4ff1761999e8953af83eed4a6dc7eb6898add80865c8b
|
data/README.md
CHANGED
@@ -23,6 +23,7 @@ Or you can generate this config file by running ```rails g mojesouhlasy``` in co
|
|
23
23
|
|
24
24
|
## Using
|
25
25
|
```ruby
|
26
|
+
Mojesouhlasy::Users.create_user('email1@example.com']) #create single user and send registration email. Respond with user id.
|
26
27
|
Mojesouhlasy::Users.import(['email1@example.com', 'email2@example.com']) #imports users and send registration emails.
|
27
28
|
Mojesouhlasy::Users.anonymize('email@example.com') #anonymize user with email and sends email to him.
|
28
29
|
Mojesouhlasy::Users.is_anonymized('email@example.com') #check if user with this email is anonymized.
|
data/lib/mojesouhlasy/users.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module Mojesouhlasy
|
2
2
|
module Users
|
3
3
|
|
4
|
+
def self.create_user(email)
|
5
|
+
parse(RestClient.post "#{Core.endpoint}/api/company/users/create_user", {email: email}, Core.headers)
|
6
|
+
end
|
7
|
+
|
4
8
|
def self.import(emails)
|
5
9
|
parse(RestClient.post "#{Core.endpoint}/api/company/users/import", {emails: emails}, Core.headers)
|
6
10
|
end
|
data/lib/mojesouhlasy/version.rb
CHANGED