strongmind-platform-sdk 3.6.1 → 3.7.0
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/Gemfile.lock +33 -27
- data/README.md +1 -1
- data/lib/platform_sdk/edfi/client.rb +37 -0
- data/lib/platform_sdk/edfi.rb +13 -0
- data/lib/platform_sdk/pencil_spaces/client.rb +18 -1
- data/lib/platform_sdk/version.rb +1 -1
- data/lib/platform_sdk.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc46ddfccbb20bdc43565c3a8f01ba6ed556ba61d46e9b755e009337e23e8757
|
4
|
+
data.tar.gz: 31bd81a67bee5b00b5f03e8291247af9701ae81e77eef1413e99f848a4b33f01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37c9aa69cf40748ba2fae0c270a1cbab5c4b14a37d63f7874b58f807b31ae8253d39991b9ff872bf0c10016a5d364437eb39d3a11895a772988e0f4817db1c7d
|
7
|
+
data.tar.gz: 340e835dba38cde94dba51aff3441cad9390f71487559c4848f5cc8a7a9db97b623ad928b1cd2cffd849556c872e5c21a869fa9f23f9dc80eb01f3674ff7e991
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
strongmind-platform-sdk (3.
|
4
|
+
strongmind-platform-sdk (3.7.0)
|
5
5
|
aws-sdk-secretsmanager (~> 1.66)
|
6
6
|
devise
|
7
7
|
faraday (~> 2.5, >= 2.5.2)
|
@@ -38,20 +38,21 @@ GEM
|
|
38
38
|
tzinfo (~> 2.0)
|
39
39
|
aes_key_wrap (1.1.0)
|
40
40
|
ast (2.4.2)
|
41
|
-
attr_required (1.0.
|
42
|
-
aws-eventstream (1.
|
43
|
-
aws-partitions (1.
|
44
|
-
aws-sdk-core (3.
|
45
|
-
aws-eventstream (~> 1, >= 1.0
|
41
|
+
attr_required (1.0.2)
|
42
|
+
aws-eventstream (1.3.0)
|
43
|
+
aws-partitions (1.876.0)
|
44
|
+
aws-sdk-core (3.190.1)
|
45
|
+
aws-eventstream (~> 1, >= 1.3.0)
|
46
46
|
aws-partitions (~> 1, >= 1.651.0)
|
47
|
-
aws-sigv4 (~> 1.
|
47
|
+
aws-sigv4 (~> 1.8)
|
48
48
|
jmespath (~> 1, >= 1.6.1)
|
49
|
-
aws-sdk-secretsmanager (1.
|
50
|
-
aws-sdk-core (~> 3, >= 3.
|
49
|
+
aws-sdk-secretsmanager (1.88.0)
|
50
|
+
aws-sdk-core (~> 3, >= 3.188.0)
|
51
51
|
aws-sigv4 (~> 1.1)
|
52
|
-
aws-sigv4 (1.
|
52
|
+
aws-sigv4 (1.8.0)
|
53
53
|
aws-eventstream (~> 1, >= 1.0.2)
|
54
|
-
|
54
|
+
base64 (0.2.0)
|
55
|
+
bcrypt (3.1.20)
|
55
56
|
bindata (2.4.15)
|
56
57
|
builder (3.2.4)
|
57
58
|
concurrent-ruby (1.2.2)
|
@@ -64,6 +65,8 @@ GEM
|
|
64
65
|
responders
|
65
66
|
warden (~> 1.2.3)
|
66
67
|
diff-lcs (1.5.0)
|
68
|
+
email_validator (2.2.4)
|
69
|
+
activemodel
|
67
70
|
erubi (1.12.0)
|
68
71
|
ethon (0.16.0)
|
69
72
|
ffi (>= 1.15.0)
|
@@ -85,14 +88,15 @@ GEM
|
|
85
88
|
concurrent-ruby (~> 1.0)
|
86
89
|
jmespath (1.6.2)
|
87
90
|
json (2.6.3)
|
88
|
-
json-jwt (1.16.
|
91
|
+
json-jwt (1.16.5)
|
89
92
|
activesupport (>= 4.2)
|
90
93
|
aes_key_wrap
|
94
|
+
base64
|
91
95
|
bindata
|
92
96
|
faraday (~> 2.0)
|
93
97
|
faraday-follow_redirects
|
94
98
|
jwt (1.5.6)
|
95
|
-
loofah (2.
|
99
|
+
loofah (2.22.0)
|
96
100
|
crass (~> 1.0.2)
|
97
101
|
nokogiri (>= 1.12.0)
|
98
102
|
mail (2.8.1)
|
@@ -104,7 +108,7 @@ GEM
|
|
104
108
|
mini_mime (1.1.5)
|
105
109
|
mini_portile2 (2.8.5)
|
106
110
|
minitest (5.18.0)
|
107
|
-
net-imap (0.4.
|
111
|
+
net-imap (0.4.9)
|
108
112
|
date
|
109
113
|
net-protocol
|
110
114
|
net-pop (0.1.2)
|
@@ -113,10 +117,14 @@ GEM
|
|
113
117
|
timeout
|
114
118
|
net-smtp (0.4.0)
|
115
119
|
net-protocol
|
116
|
-
nokogiri (1.
|
120
|
+
nokogiri (1.16.0)
|
117
121
|
mini_portile2 (~> 2.8.2)
|
118
122
|
racc (~> 1.4)
|
119
|
-
|
123
|
+
nokogiri (1.16.0-x86_64-darwin)
|
124
|
+
racc (~> 1.4)
|
125
|
+
nokogiri (1.16.0-x86_64-linux)
|
126
|
+
racc (~> 1.4)
|
127
|
+
omniauth (2.1.2)
|
120
128
|
hashie (>= 3.4.6)
|
121
129
|
rack (>= 2.2.3)
|
122
130
|
rack-protection
|
@@ -126,34 +134,35 @@ GEM
|
|
126
134
|
omniauth_openid_connect (0.7.1)
|
127
135
|
omniauth (>= 1.9, < 3)
|
128
136
|
openid_connect (~> 2.2)
|
129
|
-
openid_connect (2.
|
137
|
+
openid_connect (2.3.0)
|
130
138
|
activemodel
|
131
139
|
attr_required (>= 1.0.0)
|
140
|
+
email_validator
|
132
141
|
faraday (~> 2.0)
|
133
142
|
faraday-follow_redirects
|
134
143
|
json-jwt (>= 1.16)
|
135
|
-
|
144
|
+
mail
|
136
145
|
rack-oauth2 (~> 2.2)
|
137
146
|
swd (~> 2.0)
|
138
147
|
tzinfo
|
139
|
-
validate_email
|
140
148
|
validate_url
|
141
149
|
webfinger (~> 2.0)
|
142
150
|
orm_adapter (0.5.0)
|
143
151
|
parallel (1.23.0)
|
144
152
|
parser (3.2.2.1)
|
145
153
|
ast (~> 2.4.1)
|
146
|
-
public_suffix (5.0.
|
154
|
+
public_suffix (5.0.4)
|
147
155
|
racc (1.7.3)
|
148
156
|
rack (2.2.8)
|
149
|
-
rack-oauth2 (2.2.
|
157
|
+
rack-oauth2 (2.2.1)
|
150
158
|
activesupport
|
151
159
|
attr_required
|
152
160
|
faraday (~> 2.0)
|
153
161
|
faraday-follow_redirects
|
154
162
|
json-jwt (>= 1.11.0)
|
155
163
|
rack (>= 2.1.0)
|
156
|
-
rack-protection (3.
|
164
|
+
rack-protection (3.2.0)
|
165
|
+
base64 (>= 0.1.0)
|
157
166
|
rack (~> 2.2, >= 2.2.4)
|
158
167
|
rack-test (2.1.0)
|
159
168
|
rack (>= 1.3)
|
@@ -208,7 +217,7 @@ GEM
|
|
208
217
|
strongmind-oneroster-client (2.0.3)
|
209
218
|
json (~> 2.1, >= 2.1.0)
|
210
219
|
typhoeus (~> 1.0, >= 1.0.1)
|
211
|
-
swd (2.0.
|
220
|
+
swd (2.0.3)
|
212
221
|
activesupport (>= 3)
|
213
222
|
attr_required (>= 0.0.5)
|
214
223
|
faraday (~> 2.0)
|
@@ -221,15 +230,12 @@ GEM
|
|
221
230
|
concurrent-ruby (~> 1.0)
|
222
231
|
unicode-display_width (2.4.2)
|
223
232
|
uri (0.13.0)
|
224
|
-
validate_email (0.1.6)
|
225
|
-
activemodel (>= 3.0)
|
226
|
-
mail (>= 2.2.5)
|
227
233
|
validate_url (1.0.15)
|
228
234
|
activemodel (>= 3.0.0)
|
229
235
|
public_suffix
|
230
236
|
warden (1.2.9)
|
231
237
|
rack (>= 2.0.9)
|
232
|
-
webfinger (2.1.
|
238
|
+
webfinger (2.1.3)
|
233
239
|
activesupport
|
234
240
|
faraday (~> 2.0)
|
235
241
|
faraday-follow_redirects
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ First [configure your GitHub credentials](#configure-github-credentials)
|
|
11
11
|
Install the gem and add to the application's Gemfile by executing:
|
12
12
|
|
13
13
|
```
|
14
|
-
gem "strongmind-platform-sdk", "~> 3.
|
14
|
+
gem "strongmind-platform-sdk", "~> 3.7.0"
|
15
15
|
```
|
16
16
|
|
17
17
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PlatformSdk
|
4
|
+
module Edfi
|
5
|
+
# IdMapper::Client
|
6
|
+
class Client
|
7
|
+
attr_reader :token, :domain, :conn
|
8
|
+
|
9
|
+
def initialize(base_url, auth_client)
|
10
|
+
@base_url ||= base_url
|
11
|
+
@auth_client = auth_client
|
12
|
+
|
13
|
+
@conn = Faraday.new(@base_url) do |faraday|
|
14
|
+
faraday.headers = headers
|
15
|
+
faraday.adapter Faraday.default_adapter
|
16
|
+
faraday.response :json, content_type: /\bjson$/
|
17
|
+
faraday.response :raise_error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_student_programs(uid)
|
22
|
+
response = @conn.get("/ed-fi/v5.1.0/api/data/v3/ed-fi/studentProgramAssociations?studentUniqueId=#{uid}")
|
23
|
+
response.body
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def headers
|
29
|
+
{
|
30
|
+
"Authorization" => "Bearer #{@auth_client.auth_token}",
|
31
|
+
"Content-Type" => "application/json",
|
32
|
+
"Accept" => "application/json"
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -141,13 +141,30 @@ module PlatformSdk
|
|
141
141
|
response.body
|
142
142
|
end
|
143
143
|
|
144
|
-
def
|
144
|
+
def analytics_session(session_id)
|
145
145
|
raise ArgumentError, "session_id must have a value" if session_id.nil?
|
146
146
|
|
147
147
|
response = get("/analytics/sessions/#{session_id}")
|
148
148
|
response.body
|
149
149
|
end
|
150
150
|
|
151
|
+
# Get a list of Session Analytics accessible by the account associated with your API key
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @option opts [Integer] :page_number **(Optional)** - The page number of the items to return. The number of items in a page is controlled by the `pageSize` parameter.
|
154
|
+
# @option opts [Integer] :page_size **(Optional)** - The max number of items to return. Setting a larger `pageSize` may result in a longer querying times
|
155
|
+
# @option opts [String] :filters **(Optional)** - A base64 encoded string of the filters you wish to apply to the query. See `sessionsFilterSchema` for details on all the filters applicable to your query
|
156
|
+
# @return [JSON] A list of Pencil Spaces users
|
157
|
+
def analytics_sessions(opts = {})
|
158
|
+
# query parameters
|
159
|
+
query_params = opts[:query_params] || {}
|
160
|
+
query_params[:pageNumber] = opts[:page_number] unless opts[:page_number].nil?
|
161
|
+
query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil?
|
162
|
+
query_params[:filters] = Base64.strict_encode64(opts[:filters].to_json) unless opts[:filters].nil?
|
163
|
+
|
164
|
+
response = get("/analytics/sessions", query_params)
|
165
|
+
response.body
|
166
|
+
end
|
167
|
+
|
151
168
|
private
|
152
169
|
|
153
170
|
def build_connection
|
data/lib/platform_sdk/version.rb
CHANGED
data/lib/platform_sdk.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.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -188,6 +188,8 @@ files:
|
|
188
188
|
- lib/platform_sdk/aws/secrets_manager_client.rb
|
189
189
|
- lib/platform_sdk/data_pipeline.rb
|
190
190
|
- lib/platform_sdk/data_pipeline/data_pipeline_client.rb
|
191
|
+
- lib/platform_sdk/edfi.rb
|
192
|
+
- lib/platform_sdk/edfi/client.rb
|
191
193
|
- lib/platform_sdk/edkey.rb
|
192
194
|
- lib/platform_sdk/edkey/client.rb
|
193
195
|
- lib/platform_sdk/id_mapper.rb
|