strongmind-platform-sdk 3.19.39 → 3.19.40

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: 8c66fa25807f8ef3dc617523c236691009327152fb4b76245c38a22b921bd3a6
4
- data.tar.gz: f70482e271a58d856217d767d591ff876fdb37d0e445402ac3be72766e0ba665
3
+ metadata.gz: ee2be3c848418419cea2a1d187bf078b190bd75e1d360b6b4aa43e4fc89bb108
4
+ data.tar.gz: 849f7708af58cdb82750110475af64de26669b8751c234e097f10612e6e11538
5
5
  SHA512:
6
- metadata.gz: f5b3d8024a2712b1f109d11342a81c260304f85e0a8261c6708b31d74b39c77d4ed03a604809c87ec5dce7381c7ff38440d970b43126f5a7748f815542368a04
7
- data.tar.gz: 20ec372d4ae073f31fb177bd405f13b3f34baa6167774658738654eb8866503c047e5f32e012fe9efd0cba7dbdbf11da3e3267e8d7f55f2cafcab48026a74153
6
+ metadata.gz: e1e74f391bc54c3b3c81349a26d1f87e55f785f8415c5abf0345446ab8305f36152732ab9e9f308c9a28ec7cf37adec1592bd15d49c79ac24c53265e2052d78d
7
+ data.tar.gz: f73619d9d0145bb4e6565a874109134ed478e1644171df76bc2077eeab65f9e3ebab0c179133087a69caa009d3b0c20aa4cf59cd264f61f88601f8b72c711f7e
@@ -471,6 +471,24 @@ module PlatformSdk
471
471
  end
472
472
  end
473
473
 
474
+ def delete_module_item(course_id:, module_id:, module_item_id:)
475
+ uri = "/api/v1/courses/#{course_id}/modules/#{module_id}/items/#{module_item_id}"
476
+ response = @connection.delete(uri) do |req|
477
+ req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
478
+ end
479
+ handle_rate_limiting response
480
+ result = MultiJson.load response.body, symbolize_keys: true
481
+ if success?(response.status)
482
+ result
483
+ else
484
+ error_messages = String.new
485
+ result[:errors]&.each do |error|
486
+ error_messages << "#{error[:message]} "
487
+ end
488
+ raise "Error destroying module item: #{error_messages}"
489
+ end
490
+ end
491
+
474
492
  private
475
493
 
476
494
  # @param headers [Faraday::Utils::Headers]
@@ -3,7 +3,7 @@
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
5
  MINOR = 19
6
- PATCH = 39
6
+ PATCH = 40
7
7
 
8
8
  VERSION = "#{PlatformSdk::MAJOR}.#{PlatformSdk::MINOR}.#{PlatformSdk::PATCH}"
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-platform-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.19.39
4
+ version: 3.19.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday