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 +4 -4
- data/lib/platform_sdk/canvas_api/client.rb +18 -0
- data/lib/platform_sdk/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: ee2be3c848418419cea2a1d187bf078b190bd75e1d360b6b4aa43e4fc89bb108
|
4
|
+
data.tar.gz: 849f7708af58cdb82750110475af64de26669b8751c234e097f10612e6e11538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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]
|
data/lib/platform_sdk/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|