lms-api 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: aebcbd65afb9ede972a95ff783f55f0ef6211e8a
4
- data.tar.gz: 957db1545fa69928b5b3de97d637dd2fe803efed
3
+ metadata.gz: 9da62cf6a858e4ca870de34481c3743cc47b6e68
4
+ data.tar.gz: 4aa52417f3496dc13b7f5f75b52f04f1536cf44e
5
5
  SHA512:
6
- metadata.gz: 36739daa3e11f917f04e6e4bb96c698529862b4bc062d32c70a19a126fe78dcd2881e1c1be9b6addd1a9b66a90eb4653c00eb452826e0635b52d0714e12b32fe
7
- data.tar.gz: 2354723931d0e0b7ff17a99a57a422076d7b201d72966b27319d951691cffeeeae3320917003ae8c19a9a3e30fae526ef5e2b9250f9038114a6a9395640fb8fe
6
+ metadata.gz: 37f9908c731adebc7e4812befaf057508bf488c075c2ddbed3807b4042e11fbedc644e9a3c83209237bbbfec0c37dca8669f5585782a368cd4f6c7ac5db3add6
7
+ data.tar.gz: 79f715ca72653c89bb99e43818e07a0deb4a9c927083631ae2d44505f4b20072ed0e2a7b8c9c6b0925cfb9270d2c39185cd4192eaafe1a24f0248bd5790a85fb
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
- load './lib/tasks/lms_api.rake'
17
+ load './lib/tasks/canvas_api.rake'
18
18
 
19
19
  Bundler::GemHelper.install_tasks
20
20
 
data/lib/lms.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module LMS
2
2
  end
3
3
 
4
- require 'lms/api'
4
+ require "lms/api"
@@ -1,9 +1,9 @@
1
- require 'active_support'
2
- require 'active_support/core_ext/object/blank'
3
- require 'active_support/core_ext/object/to_query'
4
- require 'active_support/core_ext/hash/keys'
1
+ require "active_support"
2
+ require "active_support/core_ext/object/blank"
3
+ require "active_support/core_ext/object/to_query"
4
+ require "active_support/core_ext/hash/keys"
5
5
 
6
- require 'lms/urls'
6
+ require "lms/canvas_urls"
7
7
 
8
8
  module LMS
9
9
  class API
@@ -25,7 +25,7 @@ module LMS
25
25
 
26
26
  # callback must accept a single parameter (the API object itself)
27
27
  # and return the new authentication object.
28
- def self.on_auth(callback=nil, &block)
28
+ def self.on_auth(callback = nil, &block)
29
29
  @@on_auth = callback || block
30
30
  end
31
31
 
@@ -40,7 +40,6 @@ module LMS
40
40
  end
41
41
  end
42
42
 
43
-
44
43
  attr_reader :authentication
45
44
 
46
45
  # The authentication parameter must be either a string (indicating
@@ -48,7 +47,7 @@ module LMS
48
47
  # - #id
49
48
  # - #token
50
49
  # - #update(hash) -- which should update #token with hash[:token]:noh
51
- def initialize(lms_uri, authentication, refresh_token_options=nil)
50
+ def initialize(lms_uri, authentication, refresh_token_options = nil)
52
51
  @per_page = 100
53
52
  @lms_uri = lms_uri
54
53
  @refresh_token_options = refresh_token_options
@@ -74,8 +73,8 @@ module LMS
74
73
  def lock
75
74
  auth_state_model.transaction do
76
75
  record = auth_state_model.
77
- lock(true).
78
- find(authentication.id)
76
+ lock(true).
77
+ find(authentication.id)
79
78
 
80
79
  yield record
81
80
 
@@ -90,8 +89,8 @@ module LMS
90
89
  }.merge(additional_headers)
91
90
  end
92
91
 
93
- def full_url(api_url, use_api_prefix=true)
94
- if api_url[0...4] == 'http'
92
+ def full_url(api_url, use_api_prefix = true)
93
+ if api_url[0...4] == "http"
95
94
  api_url
96
95
  else
97
96
  if use_api_prefix
@@ -139,12 +138,12 @@ module LMS
139
138
  end
140
139
 
141
140
  def api_get_blocks_request(api_url, additional_headers = {})
142
- connector = api_url.include?('?') ? '&' : '?'
141
+ connector = api_url.include?("?") ? "&" : "?"
143
142
  next_url = "#{api_url}#{connector}per_page=#{@per_page}"
144
143
  while next_url do
145
144
  result = api_get_request(next_url, additional_headers)
146
145
  yield result
147
- next_url = get_next_url(result.headers['link'])
146
+ next_url = get_next_url(result.headers["link"])
148
147
  end
149
148
  end
150
149
 
@@ -159,21 +158,20 @@ module LMS
159
158
 
160
159
  def refresh_token
161
160
  payload = {
162
- grant_type: 'refresh_token'
161
+ grant_type: "refresh_token"
163
162
  }.merge(@refresh_token_options)
164
163
  url = full_url("login/oauth2/token", false)
165
164
  result = HTTParty.post(url, headers: headers, body: payload)
166
165
  raise LMS::API::RefreshTokenFailedException, api_error(result) unless [200, 201].include?(result.response.code.to_i)
167
- result['access_token']
166
+ result["access_token"]
168
167
  end
169
168
 
170
169
  def check_result(result)
171
-
172
170
  code = result.response.code.to_i
173
171
 
174
172
  return result if [200, 201].include?(code)
175
173
 
176
- if code == 401 && result.headers['www-authenticate'] == 'Bearer realm="canvas-lms"'
174
+ if code == 401 && result.headers["www-authenticate"] == 'Bearer realm="canvas-lms"'
177
175
  raise LMS::API::RefreshTokenRequired
178
176
  end
179
177
 
@@ -188,22 +186,21 @@ module LMS
188
186
 
189
187
  def get_next_url(link)
190
188
  return nil if link.blank?
191
- if url = link.split(',').find{|l| l.split(";")[1].strip == 'rel="next"' }
192
- url.split(';')[0].gsub(/[\<\>\s]/, "")
189
+ if url = link.split(",").find{ |l| l.split(";")[1].strip == 'rel="next"' }
190
+ url.split(";")[0].gsub(/[\<\>\s]/, "")
193
191
  end
194
192
  end
195
193
 
196
194
  def proxy(type, params, payload = nil, get_all = false)
197
-
198
195
  additional_headers = {
199
196
  "Content-Type" => "application/json"
200
197
  }
201
198
 
202
- method = LMS::URLs[type][:method]
199
+ method = LMS::CANVAS_URLs[type][:method]
203
200
  url = LMS::API.lms_url(type, params, payload)
204
201
 
205
202
  case method
206
- when 'GET'
203
+ when "GET"
207
204
  if block_given?
208
205
  api_get_blocks_request(url, additional_headers) do |result|
209
206
  yield result
@@ -213,25 +210,24 @@ module LMS
213
210
  else
214
211
  api_get_request(url, additional_headers)
215
212
  end
216
- when 'POST'
213
+ when "POST"
217
214
  api_post_request(url, payload, additional_headers)
218
- when 'PUT'
215
+ when "PUT"
219
216
  api_put_request(url, payload, additional_headers)
220
- when 'DELETE'
217
+ when "DELETE"
221
218
  api_delete_request(url, additional_headers)
222
219
  else
223
220
  raise LMS::API::InvalidAPIMethodRequestException "Invalid method type: #{method}"
224
221
  end
225
222
 
226
- rescue LMS::API::InvalidAPIRequestException => ex
227
- error = ex.to_s
228
- error << "API Request Url: #{url} \n"
229
- error << "API Request Params: #{params} \n"
230
- error << "API Request Payload: #{payload} \n"
231
- new_ex = LMS::API::InvalidAPIRequestFailedException.new(error)
232
- new_ex.set_backtrace(ex.backtrace)
233
- raise new_ex
234
-
223
+ rescue LMS::API::InvalidAPIRequestException => ex
224
+ error = ex.to_s
225
+ error << "API Request Url: #{url} \n"
226
+ error << "API Request Params: #{params} \n"
227
+ error << "API Request Payload: #{payload} \n"
228
+ new_ex = LMS::API::InvalidAPIRequestFailedException.new(error)
229
+ new_ex.set_backtrace(ex.backtrace)
230
+ raise new_ex
235
231
  end
236
232
 
237
233
  # Ignore required params for specific calls. For example, the external tool calls
@@ -245,7 +241,7 @@ module LMS
245
241
  end
246
242
 
247
243
  def self.lms_url(type, params, payload = nil)
248
- endpoint = LMS::URLs[type]
244
+ endpoint = LMS::CANVAS_URLs[type]
249
245
  parameters = endpoint[:parameters]
250
246
 
251
247
  # Make sure all required parameters are present
@@ -275,7 +271,7 @@ module LMS
275
271
  uri = args.blank? ? uri_proc.call : uri_proc.call(**args)
276
272
 
277
273
  # Generate the query string
278
- query_parameters = parameters.find_all{|p| p["paramType"] == "query"}.map{|p| p["name"].to_sym}
274
+ query_parameters = parameters.find_all{ |p| p["paramType"] == "query" }.map{ |p| p["name"].to_sym }
279
275
 
280
276
  # always allow paging parameters
281
277
  query_parameters << :per_page
@@ -288,10 +284,8 @@ module LMS
288
284
  else
289
285
  uri
290
286
  end
291
-
292
287
  end
293
288
 
294
-
295
289
  #
296
290
  # Helper methods
297
291
  #
@@ -307,7 +301,6 @@ module LMS
307
301
  all
308
302
  end
309
303
 
310
-
311
304
  #
312
305
  # Exceptions
313
306
  #
@@ -1,5 +1,5 @@
1
1
  module LMS
2
- URLs = {
2
+ CANVAS_URLs = {
3
3
  "SEARCH_ACCOUNT_DOMAINS" => { uri: ->() { "accounts/search" }, method: "GET", parameters: [{"paramType"=>"query", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"domain", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"latitude", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"longitude", "type"=>"Float", "format"=>nil, "required"=>false}] },
4
4
  "INDEX_OF_ACTIVE_GLOBAL_NOTIFICATION_FOR_USER" => { uri: ->(account_id:, user_id:) { "accounts/#{account_id}/users/#{user_id}/account_notifications" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
5
5
  "SHOW_GLOBAL_NOTIFICATION" => { uri: ->(account_id:, user_id:, id:) { "accounts/#{account_id}/users/#{user_id}/account_notifications/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -18,10 +18,6 @@ module LMS
18
18
  "LIST_ACTIVE_COURSES_IN_ACCOUNT" => { uri: ->(account_id:) { "accounts/#{account_id}/courses" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"with_enrollments", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"enrollment_type", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["teacher", "student", "ta", "observer", "designer"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"published", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"completed", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"by_teachers", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"query", "name"=>"by_subaccounts", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"query", "name"=>"hide_enrollmentless_courses", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"state", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["created", "claimed", "available", "completed", "deleted", "all"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"enrollment_term_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["syllabus_body", "term", "course_progress", "storage_quota_used_mb", "total_students", "teachers"], "items"=>{"type"=>"string"}}] },
19
19
  "UPDATE_ACCOUNT" => { uri: ->(id:) { "accounts/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"account[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[default_time_zone]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[default_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"account[default_user_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"account[default_group_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_past_view][value]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_past_view][locked]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_future_view][value]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_future_view][locked]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_future_listing][value]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings][restrict_student_future_listing][locked]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
20
20
  "DELETE_USER_FROM_ROOT_ACCOUNT" => { uri: ->(account_id:, user_id:) { "accounts/#{account_id}/users/#{user_id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
21
- "CREATE_NEW_ROOT_ACCOUNT" => { uri: ->() { "accounts" }, method: "POST", parameters: [{"paramType"=>"form", "name"=>"account[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[domain]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[services]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[external_integration_keys][salesforce_account_id]", "type"=>"string", "format"=>nil, "required"=>false}] },
22
- "CREATE_NEW_ROOT_ACCOUNT_ACCOUNT_ID" => { uri: ->(account_id:) { "accounts/#{account_id}/root_accounts" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"account[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[domain]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[services]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[external_integration_keys][salesforce_account_id]", "type"=>"string", "format"=>nil, "required"=>false}] },
23
- "SEARCH_ALL_USERS_IN_CONSORTIUM_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/consortium_users" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["email", "avatar_url", "accounts"], "items"=>{"type"=>"string"}}] },
24
- "SEARCH_ALL_USERS_IN_CONSORTIUM_SITE_ADMIN" => { uri: ->() { "site_admin/users" }, method: "GET", parameters: [{"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["email", "avatar_url", "accounts"], "items"=>{"type"=>"string"}}] },
25
21
  "CREATE_NEW_SUB_ACCOUNT" => { uri: ->(account_id:) { "accounts/#{account_id}/sub_accounts" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"account[name]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"account[sis_account_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account[default_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"account[default_user_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"account[default_group_storage_quota_mb]", "type"=>"integer", "format"=>"int64", "required"=>false}] },
26
22
  "MAKE_ACCOUNT_ADMIN" => { uri: ->(account_id:) { "accounts/#{account_id}/admins" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user_id", "type"=>"integer", "format"=>"int64", "required"=>true}, {"paramType"=>"form", "name"=>"role", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"role_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"send_confirmation", "type"=>"boolean", "format"=>nil, "required"=>false}] },
27
23
  "REMOVE_ACCOUNT_ADMIN" => { uri: ->(account_id:, user_id:) { "accounts/#{account_id}/admins/#{user_id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"role", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"role_id", "type"=>"integer", "format"=>"int64", "required"=>false}] },
@@ -37,7 +33,7 @@ module LMS
37
33
  "GET_DEPARTMENT_LEVEL_STATISTICS_COMPLETED" => { uri: ->(account_id:) { "accounts/#{account_id}/analytics/completed/statistics" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
38
34
  "GET_COURSE_LEVEL_PARTICIPATION_DATA" => { uri: ->(course_id:) { "courses/#{course_id}/analytics/activity" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}] },
39
35
  "GET_COURSE_LEVEL_ASSIGNMENT_DATA" => { uri: ->(course_id:) { "courses/#{course_id}/analytics/assignments" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"async", "type"=>"boolean", "format"=>nil, "required"=>false}] },
40
- "GET_COURSE_LEVEL_STUDENT_SUMMARY_DATA" => { uri: ->(course_id:) { "courses/#{course_id}/analytics/student_summaries" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}] },
36
+ "GET_COURSE_LEVEL_STUDENT_SUMMARY_DATA" => { uri: ->(course_id:) { "courses/#{course_id}/analytics/student_summaries" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"sort_column", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["name", "name_descending", "score", "score_descending", "participations", "participations_descending", "page_views", "page_views_descending"]}, {"paramType"=>"query", "name"=>"student_id", "type"=>"string", "format"=>nil, "required"=>false}] },
41
37
  "GET_USER_IN_A_COURSE_LEVEL_PARTICIPATION_DATA" => { uri: ->(course_id:, student_id:) { "courses/#{course_id}/analytics/users/#{student_id}/activity" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"student_id", "type"=>"string", "format"=>nil, "required"=>true}] },
42
38
  "GET_USER_IN_A_COURSE_LEVEL_ASSIGNMENT_DATA" => { uri: ->(course_id:, student_id:) { "courses/#{course_id}/analytics/users/#{student_id}/assignments" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"student_id", "type"=>"string", "format"=>nil, "required"=>true}] },
43
39
  "GET_USER_IN_A_COURSE_LEVEL_MESSAGING_DATA" => { uri: ->(course_id:, student_id:) { "courses/#{course_id}/analytics/users/#{student_id}/communication" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"student_id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -55,6 +51,7 @@ module LMS
55
51
  "DELETE_APPOINTMENT_GROUP" => { uri: ->(id:) { "appointment_groups/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"cancel_reason", "type"=>"string", "format"=>nil, "required"=>false}] },
56
52
  "LIST_USER_PARTICIPANTS" => { uri: ->(id:) { "appointment_groups/#{id}/users" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"registration_status", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["all", "registered", "registered"]}] },
57
53
  "LIST_STUDENT_GROUP_PARTICIPANTS" => { uri: ->(id:) { "appointment_groups/#{id}/groups" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"registration_status", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["all", "registered", "registered"]}] },
54
+ "GET_NEXT_APPOINTMENT" => { uri: ->() { "appointment_groups/next_appointment" }, method: "GET", parameters: [{"paramType"=>"query", "name"=>"appointment_group_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}] },
58
55
  "LIST_ASSIGNMENT_GROUPS" => { uri: ->(course_id:) { "courses/#{course_id}/assignment_groups" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["assignments", "discussion_topic", "all_dates", "assignment_visibility", "overrides", "submission"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"exclude_assignment_submission_types", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["online_quiz", "discussion_topic", "wiki_page", "external_tool"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"override_assignment_dates", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"scope_assignments_to_student", "type"=>"boolean", "format"=>nil, "required"=>false}] },
59
56
  "GET_ASSIGNMENT_GROUP" => { uri: ->(course_id:, assignment_group_id:) { "courses/#{course_id}/assignment_groups/#{assignment_group_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["assignments", "discussion_topic", "assignment_visibility", "submission"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"override_assignment_dates", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}] },
60
57
  "CREATE_ASSIGNMENT_GROUP" => { uri: ->(course_id:) { "courses/#{course_id}/assignment_groups" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"position", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"group_weight", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"rules", "type"=>"string", "format"=>nil, "required"=>false}] },
@@ -64,8 +61,8 @@ module LMS
64
61
  "LIST_ASSIGNMENTS" => { uri: ->(course_id:) { "courses/#{course_id}/assignments" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission", "assignment_visibility", "all_dates", "overrides", "observed_users"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"override_assignment_dates", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"needs_grading_count_by_section", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"bucket", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["past", "overdue", "undated", "ungraded", "unsubmitted", "upcoming", "future"]}, {"paramType"=>"query", "name"=>"assignment_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}] },
65
62
  "LIST_ASSIGNMENTS_FOR_USER" => { uri: ->(user_id:, course_id:) { "users/#{user_id}/courses/#{course_id}/assignments" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}] },
66
63
  "GET_SINGLE_ASSIGNMENT" => { uri: ->(course_id:, id:) { "courses/#{course_id}/assignments/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission", "assignment_visibility", "overrides", "observed_users"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"override_assignment_dates", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"needs_grading_count_by_section", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"all_dates", "type"=>"boolean", "format"=>nil, "required"=>false}] },
67
- "CREATE_ASSIGNMENT" => { uri: ->(course_id:) { "courses/#{course_id}/assignments" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[name]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[position]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[submission_types]", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["online_quiz", "none", "on_paper", "online_quiz", "discussion_topic", "external_tool", "online_upload", "online_text_entry", "online_url", "media_recording"], "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[allowed_extensions]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[turnitin_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[turnitin_settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_data]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[automatic_peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[notify_of_update]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[group_category_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grade_group_students_individually]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[external_tool_tag_attributes]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[points_possible]", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["pass_fail", "percent", "letter_grade", "gpa_scale", "points"]}, {"paramType"=>"form", "name"=>"assignment[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[description]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_group_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[muted]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_overrides]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"$ref"=>"AssignmentOverride"}}, {"paramType"=>"form", "name"=>"assignment[only_visible_to_overrides]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[published]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_standard_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[omit_from_final_grade]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
68
- "EDIT_ASSIGNMENT" => { uri: ->(course_id:, id:) { "courses/#{course_id}/assignments/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[position]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[submission_types]", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["online_quiz", "none", "on_paper", "online_quiz", "discussion_topic", "external_tool", "online_upload", "online_text_entry", "online_url", "media_recording"], "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[allowed_extensions]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[turnitin_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[turnitin_settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_data]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[automatic_peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[notify_of_update]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[group_category_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grade_group_students_individually]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[external_tool_tag_attributes]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[points_possible]", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["pass_fail", "percent", "letter_grade", "gpa_scale", "points"]}, {"paramType"=>"form", "name"=>"assignment[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[description]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_group_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[muted]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_overrides]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"$ref"=>"AssignmentOverride"}}, {"paramType"=>"form", "name"=>"assignment[only_visible_to_overrides]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[published]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_standard_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[omit_from_final_grade]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
64
+ "CREATE_ASSIGNMENT" => { uri: ->(course_id:) { "courses/#{course_id}/assignments" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[name]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[position]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[submission_types]", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["online_quiz", "none", "on_paper", "online_quiz", "discussion_topic", "external_tool", "online_upload", "online_text_entry", "online_url", "media_recording"], "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[allowed_extensions]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[turnitin_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[vericite_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[turnitin_settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_data]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[automatic_peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[notify_of_update]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[group_category_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grade_group_students_individually]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[external_tool_tag_attributes]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[points_possible]", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["pass_fail", "percent", "letter_grade", "gpa_scale", "points"]}, {"paramType"=>"form", "name"=>"assignment[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[description]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_group_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[muted]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_overrides]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"$ref"=>"AssignmentOverride"}}, {"paramType"=>"form", "name"=>"assignment[only_visible_to_overrides]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[published]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_standard_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[omit_from_final_grade]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
65
+ "EDIT_ASSIGNMENT" => { uri: ->(course_id:, id:) { "courses/#{course_id}/assignments/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[position]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[submission_types]", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["online_quiz", "none", "on_paper", "online_quiz", "discussion_topic", "external_tool", "online_upload", "online_text_entry", "online_url", "media_recording"], "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[allowed_extensions]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"form", "name"=>"assignment[turnitin_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[vericite_enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[turnitin_settings]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_data]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[integration_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[automatic_peer_reviews]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[notify_of_update]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[group_category_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grade_group_students_individually]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[external_tool_tag_attributes]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[points_possible]", "type"=>"Float", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["pass_fail", "percent", "letter_grade", "gpa_scale", "points"]}, {"paramType"=>"form", "name"=>"assignment[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[description]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_group_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[muted]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[assignment_overrides]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"$ref"=>"AssignmentOverride"}}, {"paramType"=>"form", "name"=>"assignment[only_visible_to_overrides]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[published]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment[grading_standard_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment[omit_from_final_grade]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
69
66
  "LIST_ASSIGNMENT_OVERRIDES" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/overrides" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}] },
70
67
  "GET_SINGLE_ASSIGNMENT_OVERRIDE" => { uri: ->(course_id:, assignment_id:, id:) { "courses/#{course_id}/assignments/#{assignment_id}/overrides/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
71
68
  "REDIRECT_TO_ASSIGNMENT_OVERRIDE_FOR_GROUP" => { uri: ->(group_id:, assignment_id:) { "groups/#{group_id}/assignments/#{assignment_id}/override" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -73,19 +70,14 @@ module LMS
73
70
  "CREATE_ASSIGNMENT_OVERRIDE" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/overrides" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment_override[student_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"assignment_override[title]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[group_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[course_section_id]", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}] },
74
71
  "UPDATE_ASSIGNMENT_OVERRIDE" => { uri: ->(course_id:, assignment_id:, id:) { "courses/#{course_id}/assignments/#{assignment_id}/overrides/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment_override[student_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"assignment_override[title]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[due_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[unlock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment_override[lock_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}] },
75
72
  "DELETE_ASSIGNMENT_OVERRIDE" => { uri: ->(course_id:, assignment_id:, id:) { "courses/#{course_id}/assignments/#{assignment_id}/overrides/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
76
- "LIST_AUTHENTICATION_PROVIDERS_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:) { "accounts/#{account_id}/authentication_providers" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
77
- "LIST_AUTHENTICATION_PROVIDERS_ACCOUNT_AUTHORIZATION_CONFIGS" => { uri: ->(account_id:) { "accounts/#{account_id}/account_authorization_configs" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
78
- "ADD_AUTHENTICATION_PROVIDER_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:) { "accounts/#{account_id}/authentication_providers" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
79
- "ADD_AUTHENTICATION_PROVIDER_ACCOUNT_AUTHORIZATION_CONFIGS" => { uri: ->(account_id:) { "accounts/#{account_id}/account_authorization_configs" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
80
- "UPDATE_AUTHENTICATION_PROVIDER_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
81
- "UPDATE_AUTHENTICATION_PROVIDER_ACCOUNT_AUTHORIZATION_CONFIGS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/account_authorization_configs/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
82
- "GET_AUTHENTICATION_PROVIDER_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
83
- "GET_AUTHENTICATION_PROVIDER_ACCOUNT_AUTHORIZATION_CONFIGS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/account_authorization_configs/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
84
- "DELETE_AUTHENTICATION_PROVIDER_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
85
- "DELETE_AUTHENTICATION_PROVIDER_ACCOUNT_AUTHORIZATION_CONFIGS" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/account_authorization_configs/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
86
- "GET_DISCOVERY_URL_DEPRECATED" => { uri: ->(account_id:) { "accounts/#{account_id}/account_authorization_configs/discovery_url" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
87
- "SET_DISCOVERY_URL_DEPRECATED" => { uri: ->(account_id:) { "accounts/#{account_id}/account_authorization_configs/discovery_url" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
88
- "DELETE_DISCOVERY_URL_DEPRECATED" => { uri: ->(account_id:) { "accounts/#{account_id}/account_authorization_configs/discovery_url" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
73
+ "BATCH_RETRIEVE_OVERRIDES_IN_COURSE" => { uri: ->(course_id:) { "courses/#{course_id}/assignments/overrides" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"assignment_overrides[id]", "type"=>"array", "format"=>nil, "required"=>true, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"assignment_overrides[assignment_id]", "type"=>"array", "format"=>nil, "required"=>true, "items"=>{"type"=>"string"}}] },
74
+ "BATCH_CREATE_OVERRIDES_IN_COURSE" => { uri: ->(course_id:) { "courses/#{course_id}/assignments/overrides" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment_overrides", "type"=>"array", "format"=>nil, "required"=>true, "items"=>{"$ref"=>"AssignmentOverride"}}] },
75
+ "BATCH_UPDATE_OVERRIDES_IN_COURSE" => { uri: ->(course_id:) { "courses/#{course_id}/assignments/overrides" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"assignment_overrides", "type"=>"array", "format"=>nil, "required"=>true, "items"=>{"$ref"=>"AssignmentOverride"}}] },
76
+ "LIST_AUTHENTICATION_PROVIDERS" => { uri: ->(account_id:) { "accounts/#{account_id}/authentication_providers" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
77
+ "ADD_AUTHENTICATION_PROVIDER" => { uri: ->(account_id:) { "accounts/#{account_id}/authentication_providers" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
78
+ "UPDATE_AUTHENTICATION_PROVIDER" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
79
+ "GET_AUTHENTICATION_PROVIDER" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
80
+ "DELETE_AUTHENTICATION_PROVIDER" => { uri: ->(account_id:, id:) { "accounts/#{account_id}/authentication_providers/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
89
81
  "SHOW_ACCOUNT_AUTH_SETTINGS" => { uri: ->(account_id:) { "accounts/#{account_id}/sso_settings" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
90
82
  "UPDATE_ACCOUNT_AUTH_SETTINGS" => { uri: ->(account_id:) { "accounts/#{account_id}/sso_settings" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}] },
91
83
  "QUERY_BY_LOGIN" => { uri: ->(login_id:) { "audit/authentication/logins/#{login_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"login_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"start_time", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"end_time", "type"=>"DateTime", "format"=>nil, "required"=>false}] },
@@ -204,8 +196,8 @@ module LMS
204
196
  "REORDER_CUSTOM_COLUMNS" => { uri: ->(course_id:) { "courses/#{course_id}/custom_gradebook_columns/reorder" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"order", "type"=>"array", "format"=>"int64", "required"=>true, "items"=>{"type"=>"integer"}}] },
205
197
  "LIST_ENTRIES_FOR_COLUMN" => { uri: ->(course_id:, id:) { "courses/#{course_id}/custom_gradebook_columns/#{id}/data" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include_hidden", "type"=>"boolean", "format"=>nil, "required"=>false}] },
206
198
  "UPDATE_COLUMN_DATA" => { uri: ->(course_id:, id:, user_id:) { "courses/#{course_id}/custom_gradebook_columns/#{id}/data/#{user_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"column_data[content]", "type"=>"string", "format"=>nil, "required"=>true}] },
207
- "LIST_DISCUSSION_TOPICS_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/discussion_topics" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"order_by", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["position", "recent_activity"]}, {"paramType"=>"query", "name"=>"scope", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["locked", "unlocked", "pinned", "unpinned"]}, {"paramType"=>"query", "name"=>"only_announcements", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}] },
208
- "LIST_DISCUSSION_TOPICS_GROUPS" => { uri: ->(group_id:) { "groups/#{group_id}/discussion_topics" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"order_by", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["position", "recent_activity"]}, {"paramType"=>"query", "name"=>"scope", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["locked", "unlocked", "pinned", "unpinned"]}, {"paramType"=>"query", "name"=>"only_announcements", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}] },
199
+ "LIST_DISCUSSION_TOPICS_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/discussion_topics" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["all_dates"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"order_by", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["position", "recent_activity"]}, {"paramType"=>"query", "name"=>"scope", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["locked", "unlocked", "pinned", "unpinned"]}, {"paramType"=>"query", "name"=>"only_announcements", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"exclude_context_module_locked_topics", "type"=>"boolean", "format"=>nil, "required"=>false}] },
200
+ "LIST_DISCUSSION_TOPICS_GROUPS" => { uri: ->(group_id:) { "groups/#{group_id}/discussion_topics" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["all_dates"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"order_by", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["position", "recent_activity"]}, {"paramType"=>"query", "name"=>"scope", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["locked", "unlocked", "pinned", "unpinned"]}, {"paramType"=>"query", "name"=>"only_announcements", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"exclude_context_module_locked_topics", "type"=>"boolean", "format"=>nil, "required"=>false}] },
209
201
  "CREATE_NEW_DISCUSSION_TOPIC_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/discussion_topics" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"title", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"message", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"discussion_type", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["side_comment", "threaded"]}, {"paramType"=>"form", "name"=>"published", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"delayed_post_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"lock_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_enabled", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_has_student_posts", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"require_initial_post", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment", "type"=>"Assignment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"is_announcement", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pinned", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"position_after", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"group_category_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"allow_rating", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"only_graders_can_rate", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"sort_by_rating", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"attachment", "type"=>"File", "format"=>nil, "required"=>false}] },
210
202
  "CREATE_NEW_DISCUSSION_TOPIC_GROUPS" => { uri: ->(group_id:) { "groups/#{group_id}/discussion_topics" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"title", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"message", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"discussion_type", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["side_comment", "threaded"]}, {"paramType"=>"form", "name"=>"published", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"delayed_post_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"lock_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_enabled", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_has_student_posts", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"require_initial_post", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment", "type"=>"Assignment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"is_announcement", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pinned", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"position_after", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"group_category_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"allow_rating", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"only_graders_can_rate", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"sort_by_rating", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"attachment", "type"=>"File", "format"=>nil, "required"=>false}] },
211
203
  "UPDATE_TOPIC_COURSES" => { uri: ->(course_id:, topic_id:) { "courses/#{course_id}/discussion_topics/#{topic_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"topic_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"title", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"message", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"discussion_type", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["side_comment", "threaded"]}, {"paramType"=>"form", "name"=>"published", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"delayed_post_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"lock_at", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_enabled", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"podcast_has_student_posts", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"require_initial_post", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"assignment", "type"=>"Assignment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"is_announcement", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pinned", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"position_after", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"group_category_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"form", "name"=>"allow_rating", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"only_graders_can_rate", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"sort_by_rating", "type"=>"boolean", "format"=>nil, "required"=>false}] },
@@ -266,12 +258,12 @@ module LMS
266
258
  "LIST_EXTERNAL_TOOLS_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/external_tools" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"selectable", "type"=>"boolean", "format"=>nil, "required"=>false}] },
267
259
  "LIST_EXTERNAL_TOOLS_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/external_tools" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"selectable", "type"=>"boolean", "format"=>nil, "required"=>false}] },
268
260
  "LIST_EXTERNAL_TOOLS_GROUPS" => { uri: ->(group_id:) { "groups/#{group_id}/external_tools" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"group_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"search_term", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"selectable", "type"=>"boolean", "format"=>nil, "required"=>false}] },
269
- "GET_SESSIONLESS_LAUNCH_URL_FOR_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/external_tools/sessionless_launch" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"launch_type", "type"=>"string", "format"=>nil, "required"=>false}] },
270
- "GET_SESSIONLESS_LAUNCH_URL_FOR_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/external_tools/sessionless_launch" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"launch_type", "type"=>"string", "format"=>nil, "required"=>false}] },
261
+ "GET_SESSIONLESS_LAUNCH_URL_FOR_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/external_tools/sessionless_launch" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"module_item_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"launch_type", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["assessment", "module_item"]}] },
262
+ "GET_SESSIONLESS_LAUNCH_URL_FOR_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/external_tools/sessionless_launch" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"module_item_id", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"launch_type", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["assessment", "module_item"]}] },
271
263
  "GET_SINGLE_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:, external_tool_id:) { "courses/#{course_id}/external_tools/#{external_tool_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"external_tool_id", "type"=>"string", "format"=>nil, "required"=>true}] },
272
264
  "GET_SINGLE_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:, external_tool_id:) { "accounts/#{account_id}/external_tools/#{external_tool_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"external_tool_id", "type"=>"string", "format"=>nil, "required"=>true}] },
273
- "CREATE_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/external_tools" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"privacy_level", "type"=>"string", "format"=>nil, "required"=>true, "enum"=>["anonymous", "name_only", "public"]}, {"paramType"=>"form", "name"=>"consumer_key", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"shared_secret", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"description", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"domain", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"icon_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"text", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"not_selectable", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"custom_fields", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[visibility]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["admins", "members"]}, {"paramType"=>"form", "name"=>"course_navigation[default]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_type", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_xml", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_url", "type"=>"string", "format"=>nil, "required"=>false}] },
274
- "CREATE_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/external_tools" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"privacy_level", "type"=>"string", "format"=>nil, "required"=>true, "enum"=>["anonymous", "name_only", "public"]}, {"paramType"=>"form", "name"=>"consumer_key", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"shared_secret", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"description", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"domain", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"icon_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"text", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"not_selectable", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"custom_fields", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[visibility]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["admins", "members"]}, {"paramType"=>"form", "name"=>"course_navigation[default]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_type", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_xml", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_url", "type"=>"string", "format"=>nil, "required"=>false}] },
265
+ "CREATE_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/external_tools" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"privacy_level", "type"=>"string", "format"=>nil, "required"=>true, "enum"=>["anonymous", "name_only", "public"]}, {"paramType"=>"form", "name"=>"consumer_key", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"shared_secret", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"description", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"domain", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"icon_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"text", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"custom_fields[field_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[visibility]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["admins", "members"]}, {"paramType"=>"form", "name"=>"course_navigation[windowTarget]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["_blank", "_self"]}, {"paramType"=>"form", "name"=>"course_navigation[default]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_type", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_xml", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"not_selectable", "type"=>"boolean", "format"=>nil, "required"=>false}] },
266
+ "CREATE_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:) { "accounts/#{account_id}/external_tools" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"name", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"privacy_level", "type"=>"string", "format"=>nil, "required"=>true, "enum"=>["anonymous", "name_only", "public"]}, {"paramType"=>"form", "name"=>"consumer_key", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"shared_secret", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"description", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"domain", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"icon_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"text", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"custom_fields[field_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"account_navigation[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_home_sub_navigation[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_navigation[visibility]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["admins", "members"]}, {"paramType"=>"form", "name"=>"course_navigation[windowTarget]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["_blank", "_self"]}, {"paramType"=>"form", "name"=>"course_navigation[default]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"editor_button[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"homework_submission[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[text]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"link_selection[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"migration_selection[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"tool_configuration[message_type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[enabled]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[icon_url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_width]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"resource_selection[selection_height]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_type", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_xml", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"config_url", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"not_selectable", "type"=>"boolean", "format"=>nil, "required"=>false}] },
275
267
  "EDIT_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:, external_tool_id:) { "courses/#{course_id}/external_tools/#{external_tool_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"external_tool_id", "type"=>"string", "format"=>nil, "required"=>true}] },
276
268
  "EDIT_EXTERNAL_TOOL_ACCOUNTS" => { uri: ->(account_id:, external_tool_id:) { "accounts/#{account_id}/external_tools/#{external_tool_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"external_tool_id", "type"=>"string", "format"=>nil, "required"=>true}] },
277
269
  "DELETE_EXTERNAL_TOOL_COURSES" => { uri: ->(course_id:, external_tool_id:) { "courses/#{course_id}/external_tools/#{external_tool_id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"external_tool_id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -505,6 +497,8 @@ module LMS
505
497
  "GET_ALL_PEER_REVIEWS_SECTIONS_SUBMISSIONS" => { uri: ->(section_id:, assignment_id:, submission_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{submission_id}/peer_reviews" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"submission_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_comments", "user"], "items"=>{"type"=>"string"}}] },
506
498
  "PEER_REVIEWS_CREATE_PEER_REVIEW_COURSES" => { uri: ->(course_id:, assignment_id:, submission_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{submission_id}/peer_reviews" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"submission_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user_id", "type"=>"integer", "format"=>"int64", "required"=>true}] },
507
499
  "PEER_REVIEWS_CREATE_PEER_REVIEW_SECTIONS" => { uri: ->(section_id:, assignment_id:, submission_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{submission_id}/peer_reviews" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"submission_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user_id", "type"=>"integer", "format"=>"int64", "required"=>true}] },
500
+ "PEER_REVIEWS_CREATE_PEER_REVIEW_COURSES" => { uri: ->(course_id:, assignment_id:, submission_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{submission_id}/peer_reviews" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"submission_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"user_id", "type"=>"integer", "format"=>"int64", "required"=>true}] },
501
+ "PEER_REVIEWS_CREATE_PEER_REVIEW_SECTIONS" => { uri: ->(section_id:, assignment_id:, submission_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{submission_id}/peer_reviews" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"submission_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"user_id", "type"=>"integer", "format"=>"int64", "required"=>true}] },
508
502
  "LIST_POLL_SESSIONS_FOR_POLL" => { uri: ->(poll_id:) { "polls/#{poll_id}/poll_sessions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"poll_id", "type"=>"string", "format"=>nil, "required"=>true}] },
509
503
  "GET_RESULTS_FOR_SINGLE_POLL_SESSION" => { uri: ->(poll_id:, id:) { "polls/#{poll_id}/poll_sessions/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"poll_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
510
504
  "CREATE_SINGLE_POLL_SESSION" => { uri: ->(poll_id:) { "polls/#{poll_id}/poll_sessions" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"poll_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"poll_sessions[course_id]", "type"=>"array", "format"=>"int64", "required"=>true, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"poll_sessions[course_section_id]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"poll_sessions[has_public_results]", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"boolean"}}] },
@@ -590,8 +584,8 @@ module LMS
590
584
  "CROSS_LIST_SECTION" => { uri: ->(id:, new_course_id:) { "sections/#{id}/crosslist/#{new_course_id}" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"new_course_id", "type"=>"string", "format"=>nil, "required"=>true}] },
591
585
  "DE_CROSS_LIST_SECTION" => { uri: ->(id:) { "sections/#{id}/crosslist" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
592
586
  "EDIT_SECTION" => { uri: ->(id:) { "sections/#{id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"course_section[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_section[sis_section_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_section[start_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_section[end_at]", "type"=>"DateTime", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"course_section[restrict_enrollments_to_section_dates]", "type"=>"boolean", "format"=>nil, "required"=>false}] },
593
- "GET_SECTION_INFORMATION_COURSES" => { uri: ->(course_id:, id:) { "courses/#{course_id}/sections/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
594
- "GET_SECTION_INFORMATION_SECTIONS" => { uri: ->(id:) { "sections/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
587
+ "GET_SECTION_INFORMATION_COURSES" => { uri: ->(course_id:, id:) { "courses/#{course_id}/sections/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["students", "avatar_url", "enrollments", "total_students", "passback_status"], "items"=>{"type"=>"string"}}] },
588
+ "GET_SECTION_INFORMATION_SECTIONS" => { uri: ->(id:) { "sections/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["students", "avatar_url", "enrollments", "total_students", "passback_status"], "items"=>{"type"=>"string"}}] },
595
589
  "DELETE_SECTION" => { uri: ->(id:) { "sections/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
596
590
  "GET_KALTURA_CONFIG" => { uri: ->() { "services/kaltura" }, method: "GET", parameters: [] },
597
591
  "START_KALTURA_SESSION" => { uri: ->() { "services/kaltura_session" }, method: "POST", parameters: [] },
@@ -603,8 +597,8 @@ module LMS
603
597
  "SUBMIT_ASSIGNMENT_SECTIONS" => { uri: ->(section_id:, assignment_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"comment[text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[submission_type]", "type"=>"string", "format"=>nil, "required"=>true, "enum"=>["online_text_entry", "online_url", "online_upload", "media_recording", "basic_lti_launch"]}, {"paramType"=>"form", "name"=>"submission[body]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[url]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"submission[media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}] },
604
598
  "LIST_ASSIGNMENT_SUBMISSIONS_COURSES" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "visibility", "course", "user", "group"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}] },
605
599
  "LIST_ASSIGNMENT_SUBMISSIONS_SECTIONS" => { uri: ->(section_id:, assignment_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "visibility", "course", "user", "group"], "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}] },
606
- "LIST_SUBMISSIONS_FOR_MULTIPLE_ASSIGNMENTS_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/students/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"student_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"assignment_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "total_scores", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
607
- "LIST_SUBMISSIONS_FOR_MULTIPLE_ASSIGNMENTS_SECTIONS" => { uri: ->(section_id:) { "sections/#{section_id}/students/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"student_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"assignment_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "total_scores", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
600
+ "LIST_SUBMISSIONS_FOR_MULTIPLE_ASSIGNMENTS_COURSES" => { uri: ->(course_id:) { "courses/#{course_id}/students/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"student_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"assignment_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"order", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["id", "graded_at"]}, {"paramType"=>"query", "name"=>"order_direction", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["ascending", "descending"]}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "total_scores", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
601
+ "LIST_SUBMISSIONS_FOR_MULTIPLE_ASSIGNMENTS_SECTIONS" => { uri: ->(section_id:) { "sections/#{section_id}/students/submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"student_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"assignment_ids", "type"=>"array", "format"=>nil, "required"=>false, "items"=>{"type"=>"string"}}, {"paramType"=>"query", "name"=>"grouped", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"grading_period_id", "type"=>"integer", "format"=>"int64", "required"=>false}, {"paramType"=>"query", "name"=>"order", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["id", "graded_at"]}, {"paramType"=>"query", "name"=>"order_direction", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["ascending", "descending"]}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "assignment", "total_scores", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
608
602
  "GET_SINGLE_SUBMISSION_COURSES" => { uri: ->(course_id:, assignment_id:, user_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
609
603
  "GET_SINGLE_SUBMISSION_SECTIONS" => { uri: ->(section_id:, assignment_id:, user_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{user_id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["submission_history", "submission_comments", "rubric_assessment", "visibility", "course", "user"], "items"=>{"type"=>"string"}}] },
610
604
  "UPLOAD_FILE_COURSES" => { uri: ->(course_id:, assignment_id:, user_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}/files" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -612,10 +606,10 @@ module LMS
612
606
  "GRADE_OR_COMMENT_ON_SUBMISSION_COURSES" => { uri: ->(course_id:, assignment_id:, user_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"comment[text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"comment[file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"include[visibility]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"rubric_assessment", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}] },
613
607
  "GRADE_OR_COMMENT_ON_SUBMISSION_SECTIONS" => { uri: ->(section_id:, assignment_id:, user_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{user_id}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"comment[text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"comment[media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"comment[file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}, {"paramType"=>"form", "name"=>"include[visibility]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"submission[excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"rubric_assessment", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}] },
614
608
  "LIST_GRADEABLE_STUDENTS" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/gradeable_students" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}] },
615
- "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_SUBMISSIONS" => { uri: ->(course_id:) { "courses/#{course_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
616
- "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_ASSIGNMENTS" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
617
- "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_SUBMISSIONS" => { uri: ->(section_id:) { "sections/#{section_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
618
- "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS" => { uri: ->(section_id:, assignment_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
609
+ "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_SUBMISSIONS" => { uri: ->(course_id:) { "courses/#{course_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
610
+ "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_ASSIGNMENTS" => { uri: ->(course_id:, assignment_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
611
+ "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_SUBMISSIONS" => { uri: ->(section_id:) { "sections/#{section_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
612
+ "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS" => { uri: ->(section_id:, assignment_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/update_grades" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][posted_grade]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][excuse]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][rubric_assessment]", "type"=>"RubricAssessment", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][text_comment]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][group_comment]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][media_comment_type]", "type"=>"string", "format"=>nil, "required"=>false, "enum"=>["audio", "video"]}, {"paramType"=>"form", "name"=>"grade_data[<student_id>][file_ids]", "type"=>"array", "format"=>"int64", "required"=>false, "items"=>{"type"=>"integer"}}] },
619
613
  "MARK_SUBMISSION_AS_READ_COURSES" => { uri: ->(course_id:, assignment_id:, user_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}/read" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
620
614
  "MARK_SUBMISSION_AS_READ_SECTIONS" => { uri: ->(section_id:, assignment_id:, user_id:) { "sections/#{section_id}/assignments/#{assignment_id}/submissions/#{user_id}/read" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"section_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
621
615
  "MARK_SUBMISSION_AS_UNREAD_COURSES" => { uri: ->(course_id:, assignment_id:, user_id:) { "courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}/read" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"assignment_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -632,7 +626,7 @@ module LMS
632
626
  "LIST_ACTIVITY_STREAM_SELF" => { uri: ->() { "users/self/activity_stream" }, method: "GET", parameters: [] },
633
627
  "LIST_ACTIVITY_STREAM_ACTIVITY_STREAM" => { uri: ->() { "users/activity_stream" }, method: "GET", parameters: [] },
634
628
  "ACTIVITY_STREAM_SUMMARY" => { uri: ->() { "users/self/activity_stream/summary" }, method: "GET", parameters: [] },
635
- "LIST_TODO_ITEMS" => { uri: ->() { "users/self/todo" }, method: "GET", parameters: [] },
629
+ "LIST_TODO_ITEMS" => { uri: ->() { "users/self/todo" }, method: "GET", parameters: [{"paramType"=>"query", "name"=>"include", "type"=>"array", "format"=>nil, "required"=>false, "enum"=>["ungraded_quizzes"], "items"=>{"type"=>"string"}}] },
636
630
  "LIST_UPCOMING_ASSIGNMENTS_CALENDAR_EVENTS" => { uri: ->() { "users/self/upcoming_events" }, method: "GET", parameters: [] },
637
631
  "LIST_MISSING_SUBMISSIONS" => { uri: ->(user_id:) { "users/#{user_id}/missing_submissions" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"user_id", "type"=>"string", "format"=>nil, "required"=>true}] },
638
632
  "HIDE_STREAM_ITEM" => { uri: ->(id:) { "users/self/activity_stream/#{id}" }, method: "DELETE", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
@@ -641,7 +635,7 @@ module LMS
641
635
  "SHOW_USER_DETAILS" => { uri: ->(id:) { "users/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
642
636
  "CREATE_USER" => { uri: ->(account_id:) { "accounts/#{account_id}/users" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user[name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[short_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[sortable_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[time_zone]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[locale]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[birthdate]", "type"=>"Date", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[terms_of_use]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[skip_registration]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[unique_id]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"pseudonym[password]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[sis_user_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[integration_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[send_confirmation]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[force_self_registration]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"pseudonym[authentication_provider_id]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"communication_channel[type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"communication_channel[address]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"communication_channel[confirmation_url]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"communication_channel[skip_confirmation]", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"force_validations", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"enable_sis_reactivation", "type"=>"boolean", "format"=>nil, "required"=>false}] },
643
637
  "SELF_REGISTER_USER" => { uri: ->(account_id:) { "accounts/#{account_id}/self_registration" }, method: "POST", parameters: [{"paramType"=>"path", "name"=>"account_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user[name]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"user[short_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[sortable_name]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[time_zone]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[locale]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[birthdate]", "type"=>"Date", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"user[terms_of_use]", "type"=>"boolean", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"pseudonym[unique_id]", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"communication_channel[type]", "type"=>"string", "format"=>nil, "required"=>false}, {"paramType"=>"form", "name"=>"communication_channel[address]", "type"=>"string", "format"=>nil, "required"=>false}] },
644
- "UPDATE_USER_SETTINGS" => { uri: ->(id:) { "users/#{id}/settings" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"manual_mark_as_read", "type"=>"boolean", "format"=>nil, "required"=>false}] },
638
+ "UPDATE_USER_SETTINGS" => { uri: ->(id:) { "users/#{id}/settings" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"query", "name"=>"manual_mark_as_read", "type"=>"boolean", "format"=>nil, "required"=>false}, {"paramType"=>"query", "name"=>"collapse_global_nav", "type"=>"boolean", "format"=>nil, "required"=>false}] },
645
639
  "GET_CUSTOM_COLORS" => { uri: ->(id:) { "users/#{id}/colors" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] },
646
640
  "GET_CUSTOM_COLOR" => { uri: ->(id:, asset_string:) { "users/#{id}/colors/#{asset_string}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"asset_string", "type"=>"string", "format"=>nil, "required"=>true}] },
647
641
  "UPDATE_CUSTOM_COLOR" => { uri: ->(id:, asset_string:) { "users/#{id}/colors/#{asset_string}" }, method: "PUT", parameters: [{"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"asset_string", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"form", "name"=>"hexcode", "type"=>"string", "format"=>nil, "required"=>false}] },
@@ -662,4 +656,4 @@ module LMS
662
656
  "CLEAR_COURSE_NICKNAMES" => { uri: ->() { "users/self/course_nicknames" }, method: "DELETE", parameters: [] },
663
657
  "SHOW_EPUB_EXPORT" => { uri: ->(course_id:, id:) { "courses/#{course_id}/epub_exports/#{id}" }, method: "GET", parameters: [{"paramType"=>"path", "name"=>"course_id", "type"=>"string", "format"=>nil, "required"=>true}, {"paramType"=>"path", "name"=>"id", "type"=>"string", "format"=>nil, "required"=>true}] }
664
658
  }
665
- end
659
+ end
@@ -1,3 +1,3 @@
1
1
  module LMS
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1,23 +1,27 @@
1
- namespace :lms do
1
+ require "httparty"
2
+ require "active_support"
3
+ require "active_support/core_ext/object/blank"
4
+ require "active_support/core_ext/string/inflections"
2
5
 
6
+ namespace :canvas do
3
7
  module GraphQLHelpers
4
8
 
5
- def graphQLType(name, property, resource_name)
9
+ def graphql_type(name, property)
6
10
  if property["$ref"]
7
- "#{property["$ref"]}, resolve: function(model){ return model.#{name}; }"
11
+ "#{property['$ref']}, resolve: function(model){ return model.#{name}; }"
8
12
  else
9
- type = property['type']
13
+ type = property["type"]
10
14
  case type
11
15
  when "integer", "string", "boolean", "datetime", "number"
12
- graphQLPrimitive(type, property['format'])
16
+ graphql_primitive(type, property["format"])
13
17
  when "array"
14
18
  begin
15
19
  if property["items"]["$ref"]
16
20
  type = property["items"]["$ref"]
17
21
  else
18
- type = graphQLPrimitive(property["items"]["type"], property["items"]["format"])
22
+ type = graphql_primitive(property["items"]["type"], property["items"]["format"])
19
23
  end
20
- rescue => ex
24
+ rescue
21
25
  type = "GraphQLString"
22
26
  end
23
27
  "new GraphQLList(#{type})"
@@ -30,15 +34,15 @@ namespace :lms do
30
34
  end
31
35
  end
32
36
 
33
- def graphQLResolve(name, property, resource_name)
37
+ def graphql_resolve(name, property)
34
38
  if property["$ref"]
35
39
  "function(model){ return model.#{name}; }"
36
- elsif property['type'] == "array" && property["items"] && property["items"]["$ref"]
40
+ elsif property["type"] == "array" && property["items"] && property["items"]["$ref"]
37
41
  "function(model){ return model.#{name}; }"
38
42
  end
39
43
  end
40
44
 
41
- def graphQLPrimitive(type, format)
45
+ def graphql_primitive(type, format)
42
46
  case type
43
47
  when "integer"
44
48
  "GraphQLInt"
@@ -60,32 +64,31 @@ namespace :lms do
60
64
  end
61
65
 
62
66
  def fields(model, resource_name)
63
- model['properties'].map do |name, property|
64
-
65
- # HACK. This property doesn't have any metadata. Throw in a couple lines of code specific to this field.
67
+ model["properties"].map do |name, property|
68
+ # HACK. This property doesn't have any metadata. Throw in a couple lines of code
69
+ # specific to this field.
66
70
  if name == "created_source" && property == "manual|sis|api"
67
71
  "#{name}: new GraphQLEnumType({ name: '#{name}', values: { manual: { value: 'manual' }, sis: { value: 'sis' }, api: { value: 'api' } } })"
68
72
  else
69
73
 
70
74
  description = ""
71
75
  if property["description"].present? && property["example"].present?
72
- description << "#{safeJs(property["description"])}. Example: #{safeJs(property["example"])}".gsub("..", "").gsub("\n", " ")
76
+ description << "#{safe_js(property['description'])}. Example: #{safe_js(property['example'])}".gsub("..", "").gsub("\n", " ")
73
77
  end
74
78
 
75
- if type = graphQLType(name, property, resource_name)
76
- resolve = graphQLResolve(name, property, resource_name)
79
+ if type = graphql_type(name, property)
80
+ resolve = graphql_resolve(name, property)
77
81
  resolve = "resolve: #{resolve}, " if resolve.present?
78
82
  "#{name}: { type: #{type}, #{resolve}description: \"#{description}\" }"
79
83
  end
80
84
 
81
85
  end
82
-
83
86
  end.compact
84
87
  end
85
88
 
86
- def safeJs(str)
87
- str = str.join(', ') if str.is_a?(Array)
88
- str = str.map{|k, v| v}.join(', ') if str.is_a?(Hash)
89
+ def safe_js(str)
90
+ str = str.join(", ") if str.is_a?(Array)
91
+ str = str.map { |_k, v| v }.join(", ") if str.is_a?(Hash)
89
92
  return str unless str.is_a?(String)
90
93
  str.gsub('"', "'")
91
94
  end
@@ -98,7 +101,7 @@ namespace :lms do
98
101
  arg = part.gsub(/[\{\}]/, "")
99
102
  "args['#{arg}']"
100
103
  else
101
- %Q{"#{part}"}
104
+ %{"#{part}"}
102
105
  end
103
106
  end
104
107
  end
@@ -113,17 +116,17 @@ namespace :lms do
113
116
 
114
117
  def parameters_doc(operation)
115
118
  if operation["parameters"].present?
116
- parameters = operation["parameters"]
117
- .reject{|p| p["paramType"] == "path"}
118
- .map{|p| "#{p['name']}#{p['required'] ? ' (required)' : ''}" }
119
- .compact
120
- if parameters.length > 0
119
+ parameters = operation["parameters"].
120
+ reject { |p| p["paramType"] == "path" }.
121
+ map { |p| "#{p['name']}#{p['required'] ? ' (required)' : ''}" }.
122
+ compact
123
+ if parameters.present?
121
124
  "\n// const query = {\n// #{parameters.join("\n// ")}\n// }"
122
125
  else
123
- ''
126
+ ""
124
127
  end
125
128
  else
126
- ''
129
+ ""
127
130
  end
128
131
  end
129
132
 
@@ -172,36 +175,43 @@ namespace :lms do
172
175
  end
173
176
  if resource_api
174
177
  @resource_api = resource_api
175
- @api_url = resource_api['path'].gsub("/v1/", "")
178
+ @api_url = resource_api["path"].gsub("/v1/", "")
176
179
  @args = args(@api_url)
177
180
  end
178
181
  if operation
179
182
  nickname = operation["nickname"]
180
- nickname = "#{@name}_#{nickname}" if ["upload_file", "query_by_course", "preview_processed_html", "create_peer_review_courses", "create_peer_review_sections", "set_extensions_for_student_quiz_submissions"].include?(nickname)
183
+ nickname = "#{@name}_#{nickname}" if [
184
+ "upload_file",
185
+ "query_by_course",
186
+ "preview_processed_html",
187
+ "create_peer_review_courses",
188
+ "create_peer_review_sections",
189
+ "set_extensions_for_student_quiz_submissions"
190
+ ].include?(nickname)
181
191
 
182
192
  @method = operation["method"]
183
193
  @operation = operation
184
194
  @nickname = nickname
185
- @notes = operation['notes'].gsub("\n", "\n// ")
195
+ @notes = operation["notes"].gsub("\n", "\n// ")
186
196
  @summary = operation["summary"]
187
197
  end
188
198
  if parameters
189
- @parameters = parameters.map{|p| p.delete("description"); p}
199
+ @parameters = parameters.map { |p| p.delete("description"); p }
190
200
  end
191
201
  @content = content
192
202
  @model = model
193
203
  end
194
204
 
195
205
  def args(api_url)
196
- api_url.split('/').map do |part|
206
+ api_url.split("/").map do |part|
197
207
  if part[0] == "{"
198
208
  part.gsub(/[\{\}]/, "")
199
209
  end
200
210
  end.compact
201
211
  end
202
212
 
203
- def render()
204
- ERB.new(@template, nil, '-').result(binding).strip
213
+ def render
214
+ ERB.new(@template, nil, "-").result(binding).strip
205
215
  end
206
216
 
207
217
  def save(file)
@@ -213,6 +223,11 @@ namespace :lms do
213
223
  class LMSApiBuilder
214
224
 
215
225
  def self.build
226
+ current_path = File.expand_path(File.dirname(__FILE__))
227
+ atomic_client = File.expand_path(File.join(current_path, "../../../atomic-client"))
228
+ atomic_lti = File.expand_path(File.join(current_path, "../../../atomic-lti"))
229
+ project_root = File.expand_path(File.join(current_path, "../../"))
230
+
216
231
  endpoint = "https://canvas.instructure.com/doc/api"
217
232
  directory = HTTParty.get("#{endpoint}/api-docs.json")
218
233
  lms_urls_rb = []
@@ -222,44 +237,44 @@ namespace :lms do
222
237
  mutations = []
223
238
  directory["apis"].each do |api|
224
239
  puts "Generating #{api['description']}"
225
- resource = HTTParty.get("#{endpoint}#{api["path"]}")
240
+ resource = HTTParty.get("#{endpoint}#{api['path']}")
226
241
  constants = []
227
- resource['apis'].each do |resource_api|
242
+ resource["apis"].each do |resource_api|
228
243
  resource_api["operations"].each do |operation|
229
244
  parameters = operation["parameters"]
230
- constants << Render.new("./lms_api/constant.erb", api, resource, resource_api, operation, parameters, nil, nil).render
231
- lms_urls_rb << Render.new("./lms_api/rb_url.erb", api, resource, resource_api, operation, parameters, nil, nil).render
232
- lms_urls_js << Render.new("./lms_api/js_url.erb", api, resource, resource_api, operation, parameters, nil, nil).render
245
+ constants << Render.new("./canvas_api/constant.erb", api, resource, resource_api, operation, parameters, nil, nil).render
246
+ lms_urls_rb << Render.new("./canvas_api/rb_url.erb", api, resource, resource_api, operation, parameters, nil, nil).render
247
+ lms_urls_js << Render.new("./canvas_api/js_url.erb", api, resource, resource_api, operation, parameters, nil, nil).render
233
248
  if "GET" == operation["method"].upcase
234
- queries << Render.new("./lms_api/graphql_query.erb", api, resource, resource_api, operation, parameters, nil, nil).render
249
+ queries << Render.new("./canvas_api/graphql_query.erb", api, resource, resource_api, operation, parameters, nil, nil).render
235
250
  else
236
- mutations << Render.new("./lms_api/graphql_mutation.erb", api, resource, resource_api, operation, parameters, nil, nil).render
251
+ mutations << Render.new("./canvas_api/graphql_mutation.erb", api, resource, resource_api, operation, parameters, nil, nil).render
237
252
  end
238
253
  end
239
254
  end
240
- resource['models'].map do |name, model|
241
- if model['properties'] # Don't generate models without properties
242
- models << Render.new("./lms_api/graphql_model.erb", api, resource, nil, nil, nil, nil, model).render
255
+ resource["models"].map do |_name, model|
256
+ if model["properties"] # Don't generate models without properties
257
+ models << Render.new("./canvas_api/graphql_model.erb", api, resource, nil, nil, nil, nil, model).render
243
258
  end
244
259
  end
245
260
  # Generate one file of constants for every LMS API
246
- constants_renderer = Render.new("./lms_api/constants.erb", api, resource, nil, nil, nil, constants, nil)
247
- constants_renderer.save("#{Rails.root}/../atomic-client/client/js/libs/lms/constants/#{constants_renderer.name}.js")
261
+ constants_renderer = Render.new("./canvas_api/constants.erb", api, resource, nil, nil, nil, constants, nil)
262
+ constants_renderer.save("#{atomic_client}/client/js/libs/canvas/constants/#{constants_renderer.name}.js")
248
263
  end
249
264
 
250
- Render.new("./lms_api/rb_urls.erb", nil, nil, nil, nil, nil, lms_urls_rb, nil).save("#{Rails.root}/lib/lms/urls.rb")
251
- Render.new("./lms_api/js_urls.erb", nil, nil, nil, nil, nil, lms_urls_js, nil).save("#{Rails.root}/../atomic-lti/apps/lib/lms/urls.js")
265
+ Render.new("./canvas_api/rb_urls.erb", nil, nil, nil, nil, nil, lms_urls_rb, nil).save("#{project_root}/lib/lms/canvas_urls.rb")
266
+ Render.new("./canvas_api/js_urls.erb", nil, nil, nil, nil, nil, lms_urls_js, nil).save("#{atomic_lti}/lib/canvas/urls.js")
252
267
 
253
- Render.new("./lms_api/graphql_types.erb", nil, nil, nil, nil, nil, models.compact, nil).save("#{Rails.root}/../atomic-lti/apps/lib/lms/graphql_types.js")
254
- Render.new("./lms_api/graphql_queries.erb", nil, nil, nil, nil, nil, queries, nil).save("#{Rails.root}/../atomic-lti/apps/lib/lms/graphql_queries.js")
255
- Render.new("./lms_api/graphql_mutations.erb", nil, nil, nil, nil, nil, mutations, nil).save("#{Rails.root}/../atomic-lti/apps/lib/lms/graphql_mutations.js")
268
+ # GraphQL - still not complete
269
+ Render.new("./canvas_api/graphql_types.erb", nil, nil, nil, nil, nil, models.compact, nil).save("#{atomic_lti}/lib/canvas/graphql_types.js")
270
+ Render.new("./canvas_api/graphql_queries.erb", nil, nil, nil, nil, nil, queries, nil).save("#{atomic_lti}/lib/canvas/graphql_queries.js")
271
+ Render.new("./canvas_api/graphql_mutations.erb", nil, nil, nil, nil, nil, mutations, nil).save("#{atomic_lti}/lib/canvas/graphql_mutations.js")
256
272
  end
257
273
 
258
274
  end
259
275
 
260
276
  desc "Scrape the LMS api"
261
- task :api => [:environment] do
277
+ task :api do
262
278
  LMSApiBuilder.build
263
279
  end
264
-
265
280
  end