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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc096fa0ea3dfb07f2c9449360cb7053702bc3b85858464915b8acd644fb16e1
4
- data.tar.gz: 192238d15c821879e34516748b82fa76dc03cb276b40a91ab98abc49e647cff5
3
+ metadata.gz: ad2a1e8a2ffd31771eaa98ad090a0c5fbc8e05dd25e0b991914f6a04234ca3d5
4
+ data.tar.gz: d0170a1aebada2099df0c45b26eb5cb4fc85c41bc8238bc98c552f3980762337
5
5
  SHA512:
6
- metadata.gz: f607da52aa8f1f5c5bb29993770ec61f3f8abcd7b1518508a58354999d0a8e74f3189624403855a715584a07aec0254dedb28e31bfb0982f24fef6d6d68856ec
7
- data.tar.gz: 6b090dabfab1cd717a7c6f6dfbbc292ef627480f30027b365fc39cbedac9d3df864ebc74e68a4cc4ba149effec228e331cb0156b1cff4a968f674d2cb3668bc9
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 fucntionality
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- learnworlds (0.2.0)
4
+ learnworlds (0.2.1)
5
5
  faraday (~> 2.3)
6
6
 
7
7
  GEM
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LearnWorlds
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
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.0
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-07-11 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday