strongmind-platform-sdk 3.20.0 → 3.20.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: 17fb77cce71d1c480524e74bf985a06fe8f28bae419a202a211b5abd88cfc893
4
- data.tar.gz: 39c60b0e242eb1bb60014605bec838eb64ccbc5ea37ed90b2221191c4140e226
3
+ metadata.gz: ef2c1f39c7709840909cc6c0f5e964b84af95f4142eedd486e1369d8a76c04f9
4
+ data.tar.gz: 43c052396585ea17ec2e5c699aae6591b1eca551e309742ce6a65ba427165f1a
5
5
  SHA512:
6
- metadata.gz: ddce04c15c09ca6ea2c2503e54d1e57ce8a8f6c4e280b1218c52c9d02cab3b12955a87cd4a4d0923d0cab37e9cc0141028fd7997159e02f2f835f0d58b4e3566
7
- data.tar.gz: e496eb7f6a4cc2e7ae2ce0e663ab71a96dec19f6e77cb16aa2afa9fcb7d6f9fd0d25a00700db39cc68c1be6a245ed2a7a35041134a84035e28aaf227e2198e52
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
- "Content-Type" => "application/json",
32
- "Authorization" => "Bearer #{access_token}"
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
@@ -3,7 +3,7 @@
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
5
  MINOR = 20
6
- PATCH = 0
6
+ PATCH = 1
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.20.0
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-21 00:00:00.000000000 Z
11
+ date: 2024-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday