strongmind-platform-sdk 3.20.0 → 3.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/platform_sdk/central/client.rb +19 -2
- 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: ef2c1f39c7709840909cc6c0f5e964b84af95f4142eedd486e1369d8a76c04f9
|
4
|
+
data.tar.gz: 43c052396585ea17ec2e5c699aae6591b1eca551e309742ce6a65ba427165f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d976bbb6744a71ffc58a0a176721fd3c6512b03cf99512b04d3b978c4bd77ad660f8ffaded388805709a41c16754909b46198ca80de306572b0f868d5b99b731
|
7
|
+
data.tar.gz: 9b4e005717bea48f34f0f1beb0b2efb9a5dcfea7f8017c22547494d6108c03780178aa86d15639d44df60a6411e5f724308612fcf48a458f487020198c8f76d2
|
@@ -15,6 +15,19 @@ module PlatformSdk
|
|
15
15
|
response.body
|
16
16
|
end
|
17
17
|
|
18
|
+
def teacher_enrollments(external_course_id = nil)
|
19
|
+
resource_path = '/api/teacher_enrollments'
|
20
|
+
resource_path += "?external_course_id=#{external_course_id}" if external_course_id
|
21
|
+
response = get(resource_path)
|
22
|
+
response.body
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_message(message_params: {})
|
26
|
+
resource_path = '/api/messages'
|
27
|
+
response = post(resource_path, message_params)
|
28
|
+
response.body
|
29
|
+
end
|
30
|
+
|
18
31
|
private
|
19
32
|
|
20
33
|
def build_connection
|
@@ -28,8 +41,8 @@ module PlatformSdk
|
|
28
41
|
|
29
42
|
def default_headers
|
30
43
|
{
|
31
|
-
|
32
|
-
|
44
|
+
'Content-Type' => 'application/json',
|
45
|
+
'Authorization' => "Bearer #{access_token}"
|
33
46
|
}
|
34
47
|
end
|
35
48
|
|
@@ -37,6 +50,10 @@ module PlatformSdk
|
|
37
50
|
@conn.get(path, params)
|
38
51
|
end
|
39
52
|
|
53
|
+
def post(path, params = {})
|
54
|
+
@conn.post(path, params.to_json)
|
55
|
+
end
|
56
|
+
|
40
57
|
end
|
41
58
|
end
|
42
59
|
end
|
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.20.
|
4
|
+
version: 3.20.1
|
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-10-
|
11
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|