Class: FlatApi::ClassApi
- Inherits:
-
Object
- Object
- FlatApi::ClassApi
- Defined in:
- lib/flat_api/api/class_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#activate_class(_class, opts = {}) ⇒ ClassDetails
Activate the class Mark the class as ‘active`.
-
#activate_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Activate the class Mark the class as `active`.
-
#add_class_user(_class, user, opts = {}) ⇒ nil
Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class.
-
#add_class_user_with_http_info(_class, user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class.
-
#archive_class(_class, opts = {}) ⇒ ClassDetails
Archive the class Mark the class as ‘archived`.
-
#archive_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Archive the class Mark the class as `archived`.
-
#copy_assignment(_class, assignment, body, opts = {}) ⇒ Assignment
Copy an assignment Copy an assignment to a specified class.
-
#copy_assignment_with_http_info(_class, assignment, body, opts = {}) ⇒ Array<(Assignment, Fixnum, Hash)>
Copy an assignment Copy an assignment to a specified class.
-
#create_assignment(_class, opts = {}) ⇒ Assignment
Assignment creation Use this method as a teacher to create and post a new assignment to a class.
-
#create_assignment_with_http_info(_class, opts = {}) ⇒ Array<(Assignment, Fixnum, Hash)>
Assignment creation Use this method as a teacher to create and post a new assignment to a class.
-
#create_class(body, opts = {}) ⇒ ClassDetails
Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group.
-
#create_class_with_http_info(body, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group.
-
#create_submission(_class, assignment, body, opts = {}) ⇒ AssignmentSubmission
Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment.
-
#create_submission_with_http_info(_class, assignment, body, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment.
-
#delete_class_user(_class, user, opts = {}) ⇒ nil
Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom.
-
#delete_class_user_with_http_info(_class, user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom.
-
#edit_submission(_class, assignment, submission, body, opts = {}) ⇒ AssignmentSubmission
Edit a submission Use this method as a teacher to update the different submission and give feedback.
-
#edit_submission_with_http_info(_class, assignment, submission, body, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Edit a submission Use this method as a teacher to update the different submission and give feedback.
-
#enroll_class(enrollment_code, opts = {}) ⇒ ClassDetails
Join a class Use this method to join a class using an enrollment code given one of the teacher of this class.
-
#enroll_class_with_http_info(enrollment_code, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Join a class Use this method to join a class using an enrollment code given one of the teacher of this class.
-
#get_class(_class, opts = {}) ⇒ ClassDetails
Get the details of a single class.
-
#get_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Get the details of a single class.
-
#get_score_submissions(score, opts = {}) ⇒ Array<AssignmentSubmission>
List submissions related to the score This API call will list the different assignments submissions where the score is attached.
-
#get_score_submissions_with_http_info(score, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List submissions related to the score This API call will list the different assignments submissions where the score is attached.
-
#get_submission(_class, assignment, submission, opts = {}) ⇒ AssignmentSubmission
Get a student submission.
-
#get_submission_with_http_info(_class, assignment, submission, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Get a student submission.
-
#get_submissions(_class, assignment, opts = {}) ⇒ Array<AssignmentSubmission>
List the students’ submissions.
-
#get_submissions_with_http_info(_class, assignment, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List the students' submissions.
-
#initialize(api_client = ApiClient.default) ⇒ ClassApi
constructor
A new instance of ClassApi.
-
#list_assignments(_class, opts = {}) ⇒ Array<Assignment>
Assignments listing.
-
#list_assignments_with_http_info(_class, opts = {}) ⇒ Array<(Array<Assignment>, Fixnum, Hash)>
Assignments listing.
-
#list_class_student_submissions(_class, user, opts = {}) ⇒ Array<AssignmentSubmission>
List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class.
-
#list_class_student_submissions_with_http_info(_class, user, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class.
-
#list_classes(opts = {}) ⇒ Array<ClassDetails>
List the classes available for the current user.
-
#list_classes_with_http_info(opts = {}) ⇒ Array<(Array<ClassDetails>, Fixnum, Hash)>
List the classes available for the current user.
-
#unarchive_class(_class, opts = {}) ⇒ ClassDetails
Unarchive the class Mark the class as ‘active`.
-
#unarchive_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Unarchive the class Mark the class as `active`.
-
#update_class(_class, opts = {}) ⇒ ClassDetails
Update the class Update the meta information of the class.
-
#update_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Update the class Update the meta information of the class.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/flat_api/api/class_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#activate_class(_class, opts = {}) ⇒ ClassDetails
Activate the class Mark the class as ‘active`. This is mainly used for classes synchronized from Clever that are initially with an `inactive` state and hidden in the UI.
28 29 30 31 |
# File 'lib/flat_api/api/class_api.rb', line 28 def activate_class(_class, opts = {}) data, _status_code, _headers = activate_class_with_http_info(_class, opts) return data end |
#activate_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Activate the class Mark the class as `active`. This is mainly used for classes synchronized from Clever that are initially with an `inactive` state and hidden in the UI.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/flat_api/api/class_api.rb', line 38 def activate_class_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.activate_class ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.activate_class" end # resource path local_var_path = "/classes/{class}/activate".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#activate_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_class_user(_class, user, opts = {}) ⇒ nil
Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.
84 85 86 87 |
# File 'lib/flat_api/api/class_api.rb', line 84 def add_class_user(_class, user, opts = {}) add_class_user_with_http_info(_class, user, opts) return nil end |
#add_class_user_with_http_info(_class, user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/flat_api/api/class_api.rb', line 95 def add_class_user_with_http_info(_class, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.add_class_user ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.add_class_user" end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.add_class_user" end # resource path local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#add_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#archive_class(_class, opts = {}) ⇒ ClassDetails
Archive the class Mark the class as ‘archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
143 144 145 146 |
# File 'lib/flat_api/api/class_api.rb', line 143 def archive_class(_class, opts = {}) data, _status_code, _headers = archive_class_with_http_info(_class, opts) return data end |
#archive_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Archive the class Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/flat_api/api/class_api.rb', line 153 def archive_class_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.archive_class ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.archive_class" end # resource path local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#archive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#copy_assignment(_class, assignment, body, opts = {}) ⇒ Assignment
Copy an assignment Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
200 201 202 203 |
# File 'lib/flat_api/api/class_api.rb', line 200 def copy_assignment(_class, assignment, body, opts = {}) data, _status_code, _headers = copy_assignment_with_http_info(_class, assignment, body, opts) return data end |
#copy_assignment_with_http_info(_class, assignment, body, opts = {}) ⇒ Array<(Assignment, Fixnum, Hash)>
Copy an assignment Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/flat_api/api/class_api.rb', line 212 def copy_assignment_with_http_info(_class, assignment, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.copy_assignment ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.copy_assignment" end # verify the required parameter 'assignment' is set if @api_client.config.client_side_validation && assignment.nil? fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.copy_assignment" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.copy_assignment" end # resource path local_var_path = "/classes/{class}/assignments/{assignment}/copy".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Assignment') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#copy_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_assignment(_class, opts = {}) ⇒ Assignment
Assignment creation Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.
266 267 268 269 |
# File 'lib/flat_api/api/class_api.rb', line 266 def create_assignment(_class, opts = {}) data, _status_code, _headers = create_assignment_with_http_info(_class, opts) return data end |
#create_assignment_with_http_info(_class, opts = {}) ⇒ Array<(Assignment, Fixnum, Hash)>
Assignment creation Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/flat_api/api/class_api.rb', line 277 def create_assignment_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.create_assignment ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_assignment" end # resource path local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Assignment') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#create_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_class(body, opts = {}) ⇒ ClassDetails
Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using ‘POST /classes/class/users/user`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/enrollmentCode` and the `enrollmentCode` returned in the `ClassDetails` response.
322 323 324 325 |
# File 'lib/flat_api/api/class_api.rb', line 322 def create_class(body, opts = {}) data, _status_code, _headers = create_class_with_http_info(body, opts) return data end |
#create_class_with_http_info(body, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/class/users/user`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/enrollmentCode` and the `enrollmentCode` returned in the `ClassDetails` response.
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/flat_api/api/class_api.rb', line 332 def create_class_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.create_class ..." end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_class" end # resource path local_var_path = "/classes" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#create_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_submission(_class, assignment, body, opts = {}) ⇒ AssignmentSubmission
Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. Students can only set ‘attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/class/assignments/assignment/submissions/submission` to update a submission by id.
379 380 381 382 |
# File 'lib/flat_api/api/class_api.rb', line 379 def create_submission(_class, assignment, body, opts = {}) data, _status_code, _headers = create_submission_with_http_info(_class, assignment, body, opts) return data end |
#create_submission_with_http_info(_class, assignment, body, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/class/assignments/assignment/submissions/submission` to update a submission by id.
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/flat_api/api/class_api.rb', line 391 def create_submission_with_http_info(_class, assignment, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.create_submission ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_submission" end # verify the required parameter 'assignment' is set if @api_client.config.client_side_validation && assignment.nil? fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.create_submission" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_submission" end # resource path local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AssignmentSubmission') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_class_user(_class, user, opts = {}) ⇒ nil
Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
445 446 447 448 |
# File 'lib/flat_api/api/class_api.rb', line 445 def delete_class_user(_class, user, opts = {}) delete_class_user_with_http_info(_class, user, opts) return nil end |
#delete_class_user_with_http_info(_class, user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/flat_api/api/class_api.rb', line 456 def delete_class_user_with_http_info(_class, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.delete_class_user ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_class_user" end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user" end # resource path local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#delete_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_submission(_class, assignment, submission, body, opts = {}) ⇒ AssignmentSubmission
Edit a submission Use this method as a teacher to update the different submission and give feedback. Teachers can only set ‘returnFeedback`
507 508 509 510 |
# File 'lib/flat_api/api/class_api.rb', line 507 def edit_submission(_class, assignment, submission, body, opts = {}) data, _status_code, _headers = edit_submission_with_http_info(_class, assignment, submission, body, opts) return data end |
#edit_submission_with_http_info(_class, assignment, submission, body, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Edit a submission Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback`
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/flat_api/api/class_api.rb', line 520 def edit_submission_with_http_info(_class, assignment, submission, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.edit_submission ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.edit_submission" end # verify the required parameter 'assignment' is set if @api_client.config.client_side_validation && assignment.nil? fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.edit_submission" end # verify the required parameter 'submission' is set if @api_client.config.client_side_validation && submission.nil? fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission" end # resource path local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AssignmentSubmission') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#edit_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#enroll_class(enrollment_code, opts = {}) ⇒ ClassDetails
Join a class Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the ‘ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization.
577 578 579 580 |
# File 'lib/flat_api/api/class_api.rb', line 577 def enroll_class(enrollment_code, opts = {}) data, _status_code, _headers = enroll_class_with_http_info(enrollment_code, opts) return data end |
#enroll_class_with_http_info(enrollment_code, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Join a class Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization.
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/flat_api/api/class_api.rb', line 587 def enroll_class_with_http_info(enrollment_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.enroll_class ..." end # verify the required parameter 'enrollment_code' is set if @api_client.config.client_side_validation && enrollment_code.nil? fail ArgumentError, "Missing the required parameter 'enrollment_code' when calling ClassApi.enroll_class" end # resource path local_var_path = "/classes/enroll/{enrollmentCode}".sub('{' + 'enrollmentCode' + '}', enrollment_code.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#enroll_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_class(_class, opts = {}) ⇒ ClassDetails
Get the details of a single class
632 633 634 635 |
# File 'lib/flat_api/api/class_api.rb', line 632 def get_class(_class, opts = {}) data, _status_code, _headers = get_class_with_http_info(_class, opts) return data end |
#get_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Get the details of a single class
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/flat_api/api/class_api.rb', line 642 def get_class_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.get_class ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_class" end # resource path local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#get_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_score_submissions(score, opts = {}) ⇒ Array<AssignmentSubmission>
List submissions related to the score This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
687 688 689 690 |
# File 'lib/flat_api/api/class_api.rb', line 687 def get_score_submissions(score, opts = {}) data, _status_code, _headers = get_score_submissions_with_http_info(score, opts) return data end |
#get_score_submissions_with_http_info(score, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List submissions related to the score This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/flat_api/api/class_api.rb', line 697 def get_score_submissions_with_http_info(score, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.get_score_submissions ..." end # verify the required parameter 'score' is set if @api_client.config.client_side_validation && score.nil? fail ArgumentError, "Missing the required parameter 'score' when calling ClassApi.get_score_submissions" end # resource path local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AssignmentSubmission>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_submission(_class, assignment, submission, opts = {}) ⇒ AssignmentSubmission
Get a student submission
744 745 746 747 |
# File 'lib/flat_api/api/class_api.rb', line 744 def get_submission(_class, assignment, submission, opts = {}) data, _status_code, _headers = get_submission_with_http_info(_class, assignment, submission, opts) return data end |
#get_submission_with_http_info(_class, assignment, submission, opts = {}) ⇒ Array<(AssignmentSubmission, Fixnum, Hash)>
Get a student submission
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/flat_api/api/class_api.rb', line 756 def get_submission_with_http_info(_class, assignment, submission, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.get_submission ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission" end # verify the required parameter 'assignment' is set if @api_client.config.client_side_validation && assignment.nil? fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission" end # verify the required parameter 'submission' is set if @api_client.config.client_side_validation && submission.nil? fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission" end # resource path local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AssignmentSubmission') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_submissions(_class, assignment, opts = {}) ⇒ Array<AssignmentSubmission>
List the students’ submissions
810 811 812 813 |
# File 'lib/flat_api/api/class_api.rb', line 810 def get_submissions(_class, assignment, opts = {}) data, _status_code, _headers = get_submissions_with_http_info(_class, assignment, opts) return data end |
#get_submissions_with_http_info(_class, assignment, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List the students' submissions
821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 |
# File 'lib/flat_api/api/class_api.rb', line 821 def get_submissions_with_http_info(_class, assignment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.get_submissions ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submissions" end # verify the required parameter 'assignment' is set if @api_client.config.client_side_validation && assignment.nil? fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submissions" end # resource path local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AssignmentSubmission>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#get_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_assignments(_class, opts = {}) ⇒ Array<Assignment>
Assignments listing
870 871 872 873 |
# File 'lib/flat_api/api/class_api.rb', line 870 def list_assignments(_class, opts = {}) data, _status_code, _headers = list_assignments_with_http_info(_class, opts) return data end |
#list_assignments_with_http_info(_class, opts = {}) ⇒ Array<(Array<Assignment>, Fixnum, Hash)>
Assignments listing
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 |
# File 'lib/flat_api/api/class_api.rb', line 880 def list_assignments_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.list_assignments ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_assignments" end # resource path local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<Assignment>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_class_student_submissions(_class, user, opts = {}) ⇒ Array<AssignmentSubmission>
List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class
926 927 928 929 |
# File 'lib/flat_api/api/class_api.rb', line 926 def list_class_student_submissions(_class, user, opts = {}) data, _status_code, _headers = list_class_student_submissions_with_http_info(_class, user, opts) return data end |
#list_class_student_submissions_with_http_info(_class, user, opts = {}) ⇒ Array<(Array<AssignmentSubmission>, Fixnum, Hash)>
List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 |
# File 'lib/flat_api/api/class_api.rb', line 937 def list_class_student_submissions_with_http_info(_class, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.list_class_student_submissions ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_class_student_submissions" end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.list_class_student_submissions" end # resource path local_var_path = "/classes/{class}/students/{user}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<AssignmentSubmission>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#list_class_student_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_classes(opts = {}) ⇒ Array<ClassDetails>
List the classes available for the current user
986 987 988 989 |
# File 'lib/flat_api/api/class_api.rb', line 986 def list_classes(opts = {}) data, _status_code, _headers = list_classes_with_http_info(opts) return data end |
#list_classes_with_http_info(opts = {}) ⇒ Array<(Array<ClassDetails>, Fixnum, Hash)>
List the classes available for the current user
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/flat_api/api/class_api.rb', line 996 def list_classes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.list_classes ..." end if @api_client.config.client_side_validation && opts[:'state'] && !['active', 'inactive', 'archived'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of active, inactive, archived' end # resource path local_var_path = "/classes" # query parameters query_params = {} query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<ClassDetails>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#list_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unarchive_class(_class, opts = {}) ⇒ ClassDetails
Unarchive the class Mark the class as ‘active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
1041 1042 1043 1044 |
# File 'lib/flat_api/api/class_api.rb', line 1041 def unarchive_class(_class, opts = {}) data, _status_code, _headers = unarchive_class_with_http_info(_class, opts) return data end |
#unarchive_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Unarchive the class Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'lib/flat_api/api/class_api.rb', line 1051 def unarchive_class_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.unarchive_class ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_class" end # resource path local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#unarchive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_class(_class, opts = {}) ⇒ ClassDetails
Update the class Update the meta information of the class
1097 1098 1099 1100 |
# File 'lib/flat_api/api/class_api.rb', line 1097 def update_class(_class, opts = {}) data, _status_code, _headers = update_class_with_http_info(_class, opts) return data end |
#update_class_with_http_info(_class, opts = {}) ⇒ Array<(ClassDetails, Fixnum, Hash)>
Update the class Update the meta information of the class
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/flat_api/api/class_api.rb', line 1108 def update_class_with_http_info(_class, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ClassApi.update_class ..." end # verify the required parameter '_class' is set if @api_client.config.client_side_validation && _class.nil? fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class" end # resource path local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['OAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ClassDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: ClassApi#update_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |