learnworlds 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +7 -0
- data/lib/learn_worlds/resources/user_resource.rb +10 -0
- data/lib/learn_worlds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad2a1e8a2ffd31771eaa98ad090a0c5fbc8e05dd25e0b991914f6a04234ca3d5
|
4
|
+
data.tar.gz: d0170a1aebada2099df0c45b26eb5cb4fc85c41bc8238bc98c552f3980762337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c13c5a27d196dfea26d5fcd7755ebae1a3bee336da05661315a6e757c02e62130aaed7cdc44cb84b4e5dc8e42e7156468d8f9fb858e58a98cbe861eb30f56da
|
7
|
+
data.tar.gz: ca6b5c91854da6342ec693430251a575ea5e806b4af851a23f55f5d7e96d0287dc0acf8c84a7f424c3aef7565f1c3fab8cd4902eb6125bde4b7e38e139635aad
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.1] - 2022-08-09
|
4
|
+
|
5
|
+
- Add attach and detach methods to the user resource
|
6
|
+
|
3
7
|
## [0.2.0] - 2022-07-11
|
4
8
|
|
5
|
-
- Adds single sign on
|
9
|
+
- Adds single sign on functionality
|
6
10
|
- Default client secret to nil if not passed and not on env vars
|
7
11
|
|
8
12
|
## [0.1.3] - 2022-07-08
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -82,6 +82,13 @@ client.user.find(user_id: 'user_id')
|
|
82
82
|
|
83
83
|
# enrolls a user on a course
|
84
84
|
client.user.enroll(user_id: 'user_id', product_id: 'course_id', product_type: 'course', price: 0)
|
85
|
+
|
86
|
+
# attaches tags to an user
|
87
|
+
client.user.attach_tags(user_id: 'user_id', tags: ['tag1', 'tag2'])
|
88
|
+
|
89
|
+
# detaches tags from an user
|
90
|
+
client.user.detach_tags(user_id: 'user_id', tags: ['tag1', 'tag2'])
|
91
|
+
|
85
92
|
```
|
86
93
|
|
87
94
|
### SSO Resource
|
@@ -24,5 +24,15 @@ module LearnWorlds
|
|
24
24
|
post_request("#{ENDPOINT}/#{user_id}/enrollment", attributes)
|
25
25
|
true
|
26
26
|
end
|
27
|
+
|
28
|
+
def attach_tags(user_id:, tags:)
|
29
|
+
put_request("#{ENDPOINT}/#{user_id}/tags", tags: tags, action: 'attach')
|
30
|
+
true
|
31
|
+
end
|
32
|
+
|
33
|
+
def detach_tags(user_id:, tags:)
|
34
|
+
put_request("#{ENDPOINT}/#{user_id}/tags", tags: tags, action: 'detach')
|
35
|
+
true
|
36
|
+
end
|
27
37
|
end
|
28
38
|
end
|
data/lib/learn_worlds/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learnworlds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nuno Correia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|