flat_api 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +60 -8
- data/LICENSE +201 -0
- data/README.md +62 -241
- data/lib/flat_api/api/account_api.rb +32 -22
- data/lib/flat_api/api/class_api.rb +1671 -453
- data/lib/flat_api/api/collection_api.rb +286 -185
- data/lib/flat_api/api/edu_resources_api.rb +863 -0
- data/lib/flat_api/api/group_api.rb +506 -57
- data/lib/flat_api/api/omr_api.rb +894 -0
- data/lib/flat_api/api/organization_api.rb +808 -192
- data/lib/flat_api/api/score_api.rb +1030 -589
- data/lib/flat_api/api/task_api.rb +85 -0
- data/lib/flat_api/api/user_api.rb +151 -82
- data/lib/flat_api/api_client.rb +223 -145
- data/lib/flat_api/api_error.rb +24 -4
- data/lib/flat_api/api_model_base.rb +88 -0
- data/lib/flat_api/client.rb +69 -0
- data/lib/flat_api/configuration.rb +224 -36
- data/lib/flat_api/errors.rb +86 -0
- data/lib/flat_api/models/add_group_user200_response.rb +148 -0
- data/lib/flat_api/models/add_group_user_request.rb +165 -0
- data/lib/flat_api/models/api_access_token.rb +201 -0
- data/lib/flat_api/models/app_scopes.rb +61 -0
- data/lib/flat_api/models/assignment.rb +362 -166
- data/lib/flat_api/models/assignment_capabilities.rb +256 -0
- data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +193 -0
- data/lib/flat_api/models/assignment_copy.rb +79 -169
- data/lib/flat_api/models/assignment_copy_response.rb +535 -0
- data/lib/flat_api/models/assignment_copy_to_class.rb +186 -0
- data/lib/flat_api/models/assignment_copy_to_resource_library.rb +176 -0
- data/lib/flat_api/models/assignment_group.rb +232 -0
- data/lib/flat_api/models/assignment_submission.rb +337 -131
- data/lib/flat_api/models/assignment_submission_comment.rb +209 -0
- data/lib/flat_api/models/assignment_submission_comment_creation.rb +166 -0
- data/lib/flat_api/models/assignment_submission_comments.rb +158 -0
- data/lib/flat_api/models/assignment_submission_history.rb +337 -0
- data/lib/flat_api/models/assignment_submission_history_attachment.rb +168 -0
- data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
- data/lib/flat_api/models/assignment_submission_lti.rb +200 -0
- data/lib/flat_api/models/assignment_submission_playback.rb +193 -0
- data/lib/flat_api/models/assignment_submission_state.rb +42 -0
- data/lib/flat_api/models/assignment_submission_students_mode.rb +40 -0
- data/lib/flat_api/models/assignment_submission_update.rb +157 -113
- data/lib/flat_api/models/assignment_type.rb +45 -0
- data/lib/flat_api/models/assignment_update.rb +538 -0
- data/lib/flat_api/models/class_assignment.rb +750 -0
- data/lib/flat_api/models/class_assignment_all_of_canvas.rb +159 -0
- data/lib/flat_api/models/class_assignment_all_of_lti.rb +149 -0
- data/lib/flat_api/models/class_assignment_all_of_mfc.rb +159 -0
- data/lib/flat_api/models/class_assignment_update.rb +652 -0
- data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +150 -0
- data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +152 -0
- data/lib/flat_api/models/class_attachment_creation.rb +140 -106
- data/lib/flat_api/models/class_creation.rb +142 -108
- data/lib/flat_api/models/class_details.rb +244 -125
- data/lib/flat_api/models/class_details_canvas.rb +59 -99
- data/lib/flat_api/models/class_details_clever.rb +74 -113
- data/lib/flat_api/models/class_details_google_classroom.rb +64 -124
- data/lib/flat_api/models/class_details_google_drive.rb +61 -101
- data/lib/flat_api/models/class_details_issues.rb +151 -0
- data/lib/flat_api/models/class_details_issues_sync_inner.rb +203 -0
- data/lib/flat_api/models/class_details_lti.rb +76 -106
- data/lib/flat_api/models/class_details_mfc.rb +159 -0
- data/lib/flat_api/models/class_details_microsoft_graph.rb +148 -0
- data/lib/flat_api/models/class_grade_level.rb +43 -0
- data/lib/flat_api/models/class_roles.rb +18 -9
- data/lib/flat_api/models/class_state.rb +19 -9
- data/lib/flat_api/models/class_update.rb +142 -107
- data/lib/flat_api/models/collection.rb +304 -115
- data/lib/flat_api/models/collection_app.rb +169 -0
- data/lib/flat_api/models/collection_capabilities.rb +157 -112
- data/lib/flat_api/models/collection_contents.rb +166 -0
- data/lib/flat_api/models/collection_creation.rb +120 -104
- data/lib/flat_api/models/collection_modification.rb +122 -100
- data/lib/flat_api/models/collection_privacy.rb +18 -9
- data/lib/flat_api/models/collection_type.rb +22 -11
- data/lib/flat_api/models/credit_transaction.rb +388 -0
- data/lib/flat_api/models/edu_library.rb +273 -0
- data/lib/flat_api/models/edu_resource.rb +383 -0
- data/lib/flat_api/models/edu_resource_assignment_creation.rb +170 -0
- data/lib/flat_api/models/edu_resource_capabilities.rb +179 -0
- data/lib/flat_api/models/edu_resource_copy.rb +166 -0
- data/lib/flat_api/models/edu_resource_creation.rb +311 -0
- data/lib/flat_api/models/edu_resource_folder.rb +171 -0
- data/lib/flat_api/models/edu_resource_lti_link.rb +166 -0
- data/lib/flat_api/models/edu_resource_move.rb +166 -0
- data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
- data/lib/flat_api/models/edu_resource_resource.rb +104 -0
- data/lib/flat_api/models/edu_resource_type.rb +40 -0
- data/lib/flat_api/models/edu_resource_update.rb +292 -0
- data/lib/flat_api/models/edu_resource_use_in_class.rb +176 -0
- data/lib/flat_api/models/flat_error_response.rb +109 -105
- data/lib/flat_api/models/google_classroom_coursework.rb +74 -103
- data/lib/flat_api/models/google_classroom_submission.rb +112 -101
- data/lib/flat_api/models/grade.rb +51 -0
- data/lib/flat_api/models/group.rb +70 -122
- data/lib/flat_api/models/group_creation.rb +238 -0
- data/lib/flat_api/models/group_details.rb +253 -110
- data/lib/flat_api/models/group_type.rb +20 -9
- data/lib/flat_api/models/license_mode.rb +18 -9
- data/lib/flat_api/models/license_sources.rb +21 -9
- data/lib/flat_api/models/lms_name.rb +19 -9
- data/lib/flat_api/models/lti_configuration.rb +56 -0
- data/lib/flat_api/models/lti_configuration1p1.rb +361 -0
- data/lib/flat_api/models/lti_configuration1p1_all_of_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3.rb +106 -0
- data/lib/flat_api/models/lti_configuration1p3_base.rb +336 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services.rb +166 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_ags.rb +179 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.rb +159 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_nrps.rb +169 -0
- data/lib/flat_api/models/lti_configuration1p3_base_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3_deployment.rb +529 -0
- data/lib/flat_api/models/lti_configuration1p3_dynamic.rb +530 -0
- data/lib/flat_api/models/lti_configuration1p3_manual.rb +489 -0
- data/lib/flat_api/models/lti_configuration_base.rb +306 -0
- data/lib/flat_api/models/lti_configuration_create.rb +60 -0
- data/lib/flat_api/models/lti_configuration_create1p1.rb +210 -0
- data/lib/flat_api/models/lti_configuration_create1p3_deployment.rb +264 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic.rb +209 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.rb +159 -0
- data/lib/flat_api/models/lti_configuration_create1p3_manual.rb +270 -0
- data/lib/flat_api/models/lti_configuration_update.rb +104 -0
- data/lib/flat_api/models/lti_configuration_update_deployment.rb +169 -0
- data/lib/flat_api/models/lti_configuration_update_standalone.rb +219 -0
- data/lib/flat_api/models/lti_credentials.rb +108 -114
- data/lib/flat_api/models/lti_credentials_creation.rb +99 -103
- data/lib/flat_api/models/media_attachment.rb +189 -137
- data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
- data/lib/flat_api/models/microsoft_graph_assignment.rb +259 -0
- data/lib/flat_api/models/microsoft_graph_submission.rb +193 -0
- data/lib/flat_api/models/omr_capabilities.rb +480 -0
- data/lib/flat_api/models/omr_details_step_data.rb +228 -0
- data/lib/flat_api/models/omr_details_submission.rb +288 -0
- data/lib/flat_api/models/omr_detected_instrument.rb +260 -0
- data/lib/flat_api/models/omr_imported_metadata.rb +181 -0
- data/lib/flat_api/models/omr_instrument_override.rb +311 -0
- data/lib/flat_api/models/omr_job.rb +394 -0
- data/lib/flat_api/models/omr_job_creation.rb +238 -0
- data/lib/flat_api/models/omr_job_file_metadata.rb +199 -0
- data/lib/flat_api/models/omr_job_file_upload.rb +176 -0
- data/lib/flat_api/models/omr_job_file_upload_result.rb +159 -0
- data/lib/flat_api/models/omr_job_input_file.rb +176 -0
- data/lib/flat_api/models/omr_job_output.rb +40 -0
- data/lib/flat_api/models/omr_job_progress.rb +169 -0
- data/lib/flat_api/models/omr_job_result.rb +161 -0
- data/lib/flat_api/models/omr_job_retention.rb +176 -0
- data/lib/flat_api/models/omr_job_status.rb +44 -0
- data/lib/flat_api/models/omr_locale_details.rb +193 -0
- data/lib/flat_api/models/omr_pending_step.rb +213 -0
- data/lib/flat_api/models/omr_step_name.rb +39 -0
- data/lib/flat_api/models/organization_invitation.rb +177 -109
- data/lib/flat_api/models/organization_invitation_creation.rb +97 -100
- data/lib/flat_api/models/organization_roles.rb +19 -10
- data/lib/flat_api/models/organization_user_access_token_creation.rb +168 -0
- data/lib/flat_api/models/rename_group_request.rb +165 -0
- data/lib/flat_api/models/resource_collaborator.rb +204 -116
- data/lib/flat_api/models/resource_collaborator_creation.rb +72 -112
- data/lib/flat_api/models/resource_rights.rb +168 -107
- data/lib/flat_api/models/score_comment.rb +200 -121
- data/lib/flat_api/models/score_comment_context.rb +161 -124
- data/lib/flat_api/models/score_comment_creation.rb +79 -107
- data/lib/flat_api/models/score_comment_moderation.rb +193 -0
- data/lib/flat_api/models/score_comment_update.rb +81 -115
- data/lib/flat_api/models/score_comments_counts.rb +78 -108
- data/lib/flat_api/models/score_creation.rb +80 -225
- data/lib/flat_api/models/score_creation_builder_data.rb +234 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +173 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +255 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +217 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +222 -0
- data/lib/flat_api/models/score_creation_common.rb +201 -0
- data/lib/flat_api/models/score_creation_file_import.rb +277 -0
- data/lib/flat_api/models/score_creation_google_drive_import.rb +234 -0
- data/lib/flat_api/models/score_creation_type.rb +18 -9
- data/lib/flat_api/models/score_details.rb +428 -146
- data/lib/flat_api/models/score_details_all_of_me.rb +193 -0
- data/lib/flat_api/models/score_fork.rb +84 -101
- data/lib/flat_api/models/score_license.rb +18 -9
- data/lib/flat_api/models/score_likes_counts.rb +73 -103
- data/lib/flat_api/models/score_modification.rb +178 -115
- data/lib/flat_api/models/score_plays_counts.rb +179 -0
- data/lib/flat_api/models/score_privacy.rb +18 -9
- data/lib/flat_api/models/score_revision.rb +142 -111
- data/lib/flat_api/models/score_revision_creation.rb +113 -105
- data/lib/flat_api/models/score_revision_statistics.rb +81 -101
- data/lib/flat_api/models/score_source.rb +59 -100
- data/lib/flat_api/models/score_summary.rb +172 -105
- data/lib/flat_api/models/score_track.rb +244 -117
- data/lib/flat_api/models/score_track_creation.rb +99 -104
- data/lib/flat_api/models/score_track_creation_response.rb +165 -0
- data/lib/flat_api/models/score_track_point.rb +78 -103
- data/lib/flat_api/models/score_track_purpose.rb +40 -0
- data/lib/flat_api/models/score_track_state.rb +18 -9
- data/lib/flat_api/models/score_track_type.rb +18 -9
- data/lib/flat_api/models/score_track_update.rb +98 -103
- data/lib/flat_api/models/score_views_counts.rb +73 -103
- data/lib/flat_api/models/task.rb +339 -0
- data/lib/flat_api/models/task_export_options.rb +151 -0
- data/lib/flat_api/models/task_progress.rb +159 -0
- data/lib/flat_api/models/task_result.rb +159 -0
- data/lib/flat_api/models/teaching_theme.rb +47 -0
- data/lib/flat_api/models/tutteo_product.rb +42 -0
- data/lib/flat_api/models/user_admin_update.rb +206 -106
- data/lib/flat_api/models/user_azure_details.rb +168 -0
- data/lib/flat_api/models/user_basics.rb +215 -120
- data/lib/flat_api/models/user_community_profile_links.rb +205 -0
- data/lib/flat_api/models/user_creation.rb +203 -114
- data/lib/flat_api/models/user_details.rb +331 -161
- data/lib/flat_api/models/user_details_admin.rb +272 -133
- data/lib/flat_api/models/user_details_admin_all_of_license.rb +211 -0
- data/lib/flat_api/models/user_public.rb +303 -145
- data/lib/flat_api/models/user_public_summary.rb +243 -126
- data/lib/flat_api/models/user_signin_link.rb +168 -0
- data/lib/flat_api/models/user_signin_link_creation.rb +150 -0
- data/lib/flat_api/oauth.rb +128 -0
- data/lib/flat_api/pagination.rb +88 -0
- data/lib/flat_api/retry.rb +56 -0
- data/lib/flat_api/version.rb +5 -5
- data/lib/flat_api.rb +144 -16
- metadata +154 -434
- data/Gemfile +0 -7
- data/Rakefile +0 -8
- data/docs/AccountApi.md +0 -55
- data/docs/Assignment.md +0 -18
- data/docs/AssignmentCopy.md +0 -8
- data/docs/AssignmentCreation.md +0 -12
- data/docs/AssignmentSubmission.md +0 -19
- data/docs/AssignmentSubmissionUpdate.md +0 -11
- data/docs/ClassApi.md +0 -1051
- data/docs/ClassAttachmentCreation.md +0 -10
- data/docs/ClassCreation.md +0 -9
- data/docs/ClassDetails.md +0 -25
- data/docs/ClassDetailsCanvas.md +0 -9
- data/docs/ClassDetailsClever.md +0 -14
- data/docs/ClassDetailsGoogleClassroom.md +0 -11
- data/docs/ClassDetailsGoogleDrive.md +0 -9
- data/docs/ClassDetailsLti.md +0 -10
- data/docs/ClassRoles.md +0 -7
- data/docs/ClassState.md +0 -7
- data/docs/ClassUpdate.md +0 -9
- data/docs/Collection.md +0 -18
- data/docs/CollectionApi.md +0 -521
- data/docs/CollectionCapabilities.md +0 -12
- data/docs/CollectionCreation.md +0 -8
- data/docs/CollectionModification.md +0 -8
- data/docs/CollectionPrivacy.md +0 -7
- data/docs/CollectionTitle.md +0 -7
- data/docs/CollectionType.md +0 -7
- data/docs/FlatErrorResponse.md +0 -11
- data/docs/FlatLocales.md +0 -7
- data/docs/GoogleClassroomCoursework.md +0 -10
- data/docs/GoogleClassroomSubmission.md +0 -10
- data/docs/Group.md +0 -14
- data/docs/GroupApi.md +0 -167
- data/docs/GroupDetails.md +0 -14
- data/docs/GroupType.md +0 -7
- data/docs/LicenseMode.md +0 -7
- data/docs/LicenseSources.md +0 -7
- data/docs/LmsName.md +0 -7
- data/docs/LtiCredentials.md +0 -16
- data/docs/LtiCredentialsCreation.md +0 -9
- data/docs/MediaAttachment.md +0 -23
- data/docs/MediaScoreSharingMode.md +0 -7
- data/docs/OrganizationApi.md +0 -538
- data/docs/OrganizationInvitation.md +0 -14
- data/docs/OrganizationInvitationCreation.md +0 -9
- data/docs/OrganizationRoles.md +0 -7
- data/docs/ResourceCollaborator.md +0 -16
- data/docs/ResourceCollaboratorCreation.md +0 -14
- data/docs/ResourceRights.md +0 -10
- data/docs/ResourceSharingKey.md +0 -7
- data/docs/ScoreApi.md +0 -1658
- data/docs/ScoreComment.md +0 -22
- data/docs/ScoreCommentContext.md +0 -14
- data/docs/ScoreCommentCreation.md +0 -13
- data/docs/ScoreCommentUpdate.md +0 -11
- data/docs/ScoreCommentsCounts.md +0 -11
- data/docs/ScoreCreation.md +0 -14
- data/docs/ScoreCreationType.md +0 -7
- data/docs/ScoreData.md +0 -7
- data/docs/ScoreDataEncoding.md +0 -7
- data/docs/ScoreDetails.md +0 -36
- data/docs/ScoreFork.md +0 -8
- data/docs/ScoreLicense.md +0 -7
- data/docs/ScoreLikesCounts.md +0 -10
- data/docs/ScoreModification.md +0 -14
- data/docs/ScorePrivacy.md +0 -7
- data/docs/ScoreRevision.md +0 -14
- data/docs/ScoreRevisionCreation.md +0 -11
- data/docs/ScoreRevisionStatistics.md +0 -9
- data/docs/ScoreSource.md +0 -8
- data/docs/ScoreSummary.md +0 -13
- data/docs/ScoreTrack.md +0 -19
- data/docs/ScoreTrackCreation.md +0 -12
- data/docs/ScoreTrackPoint.md +0 -10
- data/docs/ScoreTrackState.md +0 -7
- data/docs/ScoreTrackType.md +0 -7
- data/docs/ScoreTrackUpdate.md +0 -11
- data/docs/ScoreViewsCounts.md +0 -10
- data/docs/UserAdminUpdate.md +0 -9
- data/docs/UserApi.md +0 -173
- data/docs/UserBasics.md +0 -13
- data/docs/UserCreation.md +0 -11
- data/docs/UserDetails.md +0 -28
- data/docs/UserDetailsAdmin.md +0 -20
- data/docs/UserDetailsAdminLicense.md +0 -12
- data/docs/UserInstruments.md +0 -7
- data/docs/UserPublic.md +0 -25
- data/docs/UserPublicSummary.md +0 -17
- data/flat_api.gemspec +0 -48
- data/lib/flat_api/models/assignment_creation.rb +0 -230
- data/lib/flat_api/models/collection_title.rb +0 -179
- data/lib/flat_api/models/flat_locales.rb +0 -36
- data/lib/flat_api/models/resource_sharing_key.rb +0 -179
- data/lib/flat_api/models/score_data.rb +0 -179
- data/lib/flat_api/models/score_data_encoding.rb +0 -30
- data/lib/flat_api/models/user_details_admin_license.rb +0 -227
- data/lib/flat_api/models/user_instruments.rb +0 -179
- data/spec/api/account_api_spec.rb +0 -46
- data/spec/api/class_api_spec.rb +0 -278
- data/spec/api/collection_api_spec.rb +0 -159
- data/spec/api/group_api_spec.rb +0 -72
- data/spec/api/organization_api_spec.rb +0 -162
- data/spec/api/score_api_spec.rb +0 -426
- data/spec/api/user_api_spec.rb +0 -73
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/assignment_copy_spec.rb +0 -42
- data/spec/models/assignment_creation_spec.rb +0 -66
- data/spec/models/assignment_spec.rb +0 -106
- data/spec/models/assignment_submission_spec.rb +0 -108
- data/spec/models/assignment_submission_update_spec.rb +0 -60
- data/spec/models/class_attachment_creation_spec.rb +0 -58
- data/spec/models/class_creation_spec.rb +0 -48
- data/spec/models/class_details_canvas_spec.rb +0 -48
- data/spec/models/class_details_clever_spec.rb +0 -82
- data/spec/models/class_details_google_classroom_spec.rb +0 -60
- data/spec/models/class_details_google_drive_spec.rb +0 -48
- data/spec/models/class_details_lti_spec.rb +0 -54
- data/spec/models/class_details_spec.rb +0 -144
- data/spec/models/class_roles_spec.rb +0 -36
- data/spec/models/class_state_spec.rb +0 -36
- data/spec/models/class_update_spec.rb +0 -48
- data/spec/models/collection_capabilities_spec.rb +0 -66
- data/spec/models/collection_creation_spec.rb +0 -42
- data/spec/models/collection_modification_spec.rb +0 -42
- data/spec/models/collection_privacy_spec.rb +0 -36
- data/spec/models/collection_spec.rb +0 -102
- data/spec/models/collection_title_spec.rb +0 -36
- data/spec/models/collection_type_spec.rb +0 -36
- data/spec/models/flat_error_response_spec.rb +0 -60
- data/spec/models/flat_locales_spec.rb +0 -36
- data/spec/models/google_classroom_coursework_spec.rb +0 -54
- data/spec/models/google_classroom_submission_spec.rb +0 -54
- data/spec/models/group_details_spec.rb +0 -78
- data/spec/models/group_spec.rb +0 -82
- data/spec/models/group_type_spec.rb +0 -36
- data/spec/models/license_mode_spec.rb +0 -36
- data/spec/models/license_sources_spec.rb +0 -36
- data/spec/models/lms_name_spec.rb +0 -36
- data/spec/models/lti_credentials_creation_spec.rb +0 -48
- data/spec/models/lti_credentials_spec.rb +0 -90
- data/spec/models/media_attachment_spec.rb +0 -136
- data/spec/models/media_score_sharing_mode_spec.rb +0 -36
- data/spec/models/organization_invitation_creation_spec.rb +0 -48
- data/spec/models/organization_invitation_spec.rb +0 -78
- data/spec/models/organization_roles_spec.rb +0 -36
- data/spec/models/resource_collaborator_creation_spec.rb +0 -78
- data/spec/models/resource_collaborator_spec.rb +0 -90
- data/spec/models/resource_rights_spec.rb +0 -54
- data/spec/models/resource_sharing_key_spec.rb +0 -36
- data/spec/models/score_comment_context_spec.rb +0 -78
- data/spec/models/score_comment_creation_spec.rb +0 -72
- data/spec/models/score_comment_spec.rb +0 -130
- data/spec/models/score_comment_update_spec.rb +0 -60
- data/spec/models/score_comments_counts_spec.rb +0 -60
- data/spec/models/score_creation_spec.rb +0 -78
- data/spec/models/score_creation_type_spec.rb +0 -36
- data/spec/models/score_data_encoding_spec.rb +0 -36
- data/spec/models/score_data_spec.rb +0 -36
- data/spec/models/score_details_spec.rb +0 -210
- data/spec/models/score_fork_spec.rb +0 -42
- data/spec/models/score_license_spec.rb +0 -36
- data/spec/models/score_likes_counts_spec.rb +0 -54
- data/spec/models/score_modification_spec.rb +0 -78
- data/spec/models/score_privacy_spec.rb +0 -36
- data/spec/models/score_revision_creation_spec.rb +0 -60
- data/spec/models/score_revision_spec.rb +0 -78
- data/spec/models/score_revision_statistics_spec.rb +0 -48
- data/spec/models/score_source_spec.rb +0 -42
- data/spec/models/score_summary_spec.rb +0 -72
- data/spec/models/score_track_creation_spec.rb +0 -66
- data/spec/models/score_track_point_spec.rb +0 -58
- data/spec/models/score_track_spec.rb +0 -108
- data/spec/models/score_track_state_spec.rb +0 -36
- data/spec/models/score_track_type_spec.rb +0 -36
- data/spec/models/score_track_update_spec.rb +0 -60
- data/spec/models/score_views_counts_spec.rb +0 -54
- data/spec/models/user_admin_update_spec.rb +0 -48
- data/spec/models/user_basics_spec.rb +0 -72
- data/spec/models/user_creation_spec.rb +0 -60
- data/spec/models/user_details_admin_license_spec.rb +0 -66
- data/spec/models/user_details_admin_spec.rb +0 -114
- data/spec/models/user_details_spec.rb +0 -166
- data/spec/models/user_instruments_spec.rb +0 -36
- data/spec/models/user_public_spec.rb +0 -144
- data/spec/models/user_public_summary_spec.rb +0 -96
- data/spec/spec_helper.rb +0 -111
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Flat API
|
|
3
3
|
|
|
4
|
-
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML
|
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 2.26.1
|
|
7
7
|
Contact: developers@flat.io
|
|
8
|
-
Generated by: https://
|
|
9
|
-
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
|
-
require
|
|
13
|
+
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module FlatApi
|
|
16
16
|
class ClassApi
|
|
@@ -19,56 +19,63 @@ module FlatApi
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
|
|
23
22
|
# Activate the class
|
|
24
23
|
# 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.
|
|
25
|
-
# @param _class Unique identifier of the class
|
|
24
|
+
# @param _class [String] Unique identifier of the class
|
|
26
25
|
# @param [Hash] opts the optional parameters
|
|
27
26
|
# @return [ClassDetails]
|
|
28
27
|
def activate_class(_class, opts = {})
|
|
29
28
|
data, _status_code, _headers = activate_class_with_http_info(_class, opts)
|
|
30
|
-
|
|
29
|
+
data
|
|
31
30
|
end
|
|
32
31
|
|
|
33
32
|
# Activate the class
|
|
34
33
|
# 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.
|
|
35
|
-
# @param _class Unique identifier of the class
|
|
34
|
+
# @param _class [String] Unique identifier of the class
|
|
36
35
|
# @param [Hash] opts the optional parameters
|
|
37
|
-
# @return [Array<(ClassDetails,
|
|
36
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
38
37
|
def activate_class_with_http_info(_class, opts = {})
|
|
39
38
|
if @api_client.config.debugging
|
|
40
|
-
@api_client.config.logger.debug
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.activate_class ...'
|
|
41
40
|
end
|
|
42
41
|
# verify the required parameter '_class' is set
|
|
43
42
|
if @api_client.config.client_side_validation && _class.nil?
|
|
44
43
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.activate_class"
|
|
45
44
|
end
|
|
46
45
|
# resource path
|
|
47
|
-
local_var_path =
|
|
46
|
+
local_var_path = '/classes/{class}/activate'.sub('{class}', CGI.escape(_class.to_s))
|
|
48
47
|
|
|
49
48
|
# query parameters
|
|
50
|
-
query_params = {}
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
51
50
|
|
|
52
51
|
# header parameters
|
|
53
|
-
header_params = {}
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
54
53
|
# HTTP header 'Accept' (if needed)
|
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
56
|
-
# HTTP header 'Content-Type'
|
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
58
55
|
|
|
59
56
|
# form parameters
|
|
60
|
-
form_params = {}
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
61
58
|
|
|
62
59
|
# http body (model)
|
|
63
|
-
post_body =
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"ClassApi.activate_class",
|
|
66
70
|
:header_params => header_params,
|
|
67
71
|
:query_params => query_params,
|
|
68
72
|
:form_params => form_params,
|
|
69
73
|
:body => post_body,
|
|
70
74
|
:auth_names => auth_names,
|
|
71
|
-
:return_type =>
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
72
79
|
if @api_client.config.debugging
|
|
73
80
|
@api_client.config.logger.debug "API called: ClassApi#activate_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
74
81
|
end
|
|
@@ -77,24 +84,24 @@ module FlatApi
|
|
|
77
84
|
|
|
78
85
|
# Add a user to the class
|
|
79
86
|
# 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.
|
|
80
|
-
# @param _class Unique identifier of the class
|
|
81
|
-
# @param user Unique identifier of the user
|
|
87
|
+
# @param _class [String] Unique identifier of the class
|
|
88
|
+
# @param user [String] Unique identifier of the user
|
|
82
89
|
# @param [Hash] opts the optional parameters
|
|
83
90
|
# @return [nil]
|
|
84
91
|
def add_class_user(_class, user, opts = {})
|
|
85
92
|
add_class_user_with_http_info(_class, user, opts)
|
|
86
|
-
|
|
93
|
+
nil
|
|
87
94
|
end
|
|
88
95
|
|
|
89
96
|
# Add a user to the class
|
|
90
97
|
# 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.
|
|
91
|
-
# @param _class Unique identifier of the class
|
|
92
|
-
# @param user Unique identifier of the user
|
|
98
|
+
# @param _class [String] Unique identifier of the class
|
|
99
|
+
# @param user [String] Unique identifier of the user
|
|
93
100
|
# @param [Hash] opts the optional parameters
|
|
94
|
-
# @return [Array<(nil,
|
|
101
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
95
102
|
def add_class_user_with_http_info(_class, user, opts = {})
|
|
96
103
|
if @api_client.config.debugging
|
|
97
|
-
@api_client.config.logger.debug
|
|
104
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.add_class_user ...'
|
|
98
105
|
end
|
|
99
106
|
# verify the required parameter '_class' is set
|
|
100
107
|
if @api_client.config.client_side_validation && _class.nil?
|
|
@@ -105,85 +112,171 @@ module FlatApi
|
|
|
105
112
|
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.add_class_user"
|
|
106
113
|
end
|
|
107
114
|
# resource path
|
|
108
|
-
local_var_path =
|
|
115
|
+
local_var_path = '/classes/{class}/users/{user}'.sub('{class}', CGI.escape(_class.to_s)).sub('{user}', CGI.escape(user.to_s))
|
|
109
116
|
|
|
110
117
|
# query parameters
|
|
111
|
-
query_params = {}
|
|
118
|
+
query_params = opts[:query_params] || {}
|
|
112
119
|
|
|
113
120
|
# header parameters
|
|
114
|
-
header_params = {}
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
115
122
|
# HTTP header 'Accept' (if needed)
|
|
116
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
117
|
-
# HTTP header 'Content-Type'
|
|
118
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
124
|
|
|
120
125
|
# form parameters
|
|
121
|
-
form_params = {}
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
122
127
|
|
|
123
128
|
# http body (model)
|
|
124
|
-
post_body =
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
post_body = opts[:debug_body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type]
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"ClassApi.add_class_user",
|
|
127
139
|
:header_params => header_params,
|
|
128
140
|
:query_params => query_params,
|
|
129
141
|
:form_params => form_params,
|
|
130
142
|
:body => post_body,
|
|
131
|
-
:auth_names => auth_names
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
132
148
|
if @api_client.config.debugging
|
|
133
149
|
@api_client.config.logger.debug "API called: ClassApi#add_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
134
150
|
end
|
|
135
151
|
return data, status_code, headers
|
|
136
152
|
end
|
|
137
153
|
|
|
154
|
+
# Archive the assignment
|
|
155
|
+
# Archive the assignment
|
|
156
|
+
# @param _class [String] Unique identifier of the class
|
|
157
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [Assignment]
|
|
160
|
+
def archive_assignment(_class, assignment, opts = {})
|
|
161
|
+
data, _status_code, _headers = archive_assignment_with_http_info(_class, assignment, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Archive the assignment
|
|
166
|
+
# Archive the assignment
|
|
167
|
+
# @param _class [String] Unique identifier of the class
|
|
168
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
|
171
|
+
def archive_assignment_with_http_info(_class, assignment, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.archive_assignment ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter '_class' is set
|
|
176
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.archive_assignment"
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'assignment' is set
|
|
180
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.archive_assignment"
|
|
182
|
+
end
|
|
183
|
+
# resource path
|
|
184
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/archive'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
185
|
+
|
|
186
|
+
# query parameters
|
|
187
|
+
query_params = opts[:query_params] || {}
|
|
188
|
+
|
|
189
|
+
# header parameters
|
|
190
|
+
header_params = opts[:header_params] || {}
|
|
191
|
+
# HTTP header 'Accept' (if needed)
|
|
192
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
193
|
+
|
|
194
|
+
# form parameters
|
|
195
|
+
form_params = opts[:form_params] || {}
|
|
196
|
+
|
|
197
|
+
# http body (model)
|
|
198
|
+
post_body = opts[:debug_body]
|
|
199
|
+
|
|
200
|
+
# return_type
|
|
201
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
|
202
|
+
|
|
203
|
+
# auth_names
|
|
204
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
205
|
+
|
|
206
|
+
new_options = opts.merge(
|
|
207
|
+
:operation => :"ClassApi.archive_assignment",
|
|
208
|
+
:header_params => header_params,
|
|
209
|
+
:query_params => query_params,
|
|
210
|
+
:form_params => form_params,
|
|
211
|
+
:body => post_body,
|
|
212
|
+
:auth_names => auth_names,
|
|
213
|
+
:return_type => return_type
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: ClassApi#archive_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
138
223
|
# Archive the class
|
|
139
224
|
# Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
|
|
140
|
-
# @param _class Unique identifier of the class
|
|
225
|
+
# @param _class [String] Unique identifier of the class
|
|
141
226
|
# @param [Hash] opts the optional parameters
|
|
142
227
|
# @return [ClassDetails]
|
|
143
228
|
def archive_class(_class, opts = {})
|
|
144
229
|
data, _status_code, _headers = archive_class_with_http_info(_class, opts)
|
|
145
|
-
|
|
230
|
+
data
|
|
146
231
|
end
|
|
147
232
|
|
|
148
233
|
# Archive the class
|
|
149
234
|
# Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
|
|
150
|
-
# @param _class Unique identifier of the class
|
|
235
|
+
# @param _class [String] Unique identifier of the class
|
|
151
236
|
# @param [Hash] opts the optional parameters
|
|
152
|
-
# @return [Array<(ClassDetails,
|
|
237
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
153
238
|
def archive_class_with_http_info(_class, opts = {})
|
|
154
239
|
if @api_client.config.debugging
|
|
155
|
-
@api_client.config.logger.debug
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.archive_class ...'
|
|
156
241
|
end
|
|
157
242
|
# verify the required parameter '_class' is set
|
|
158
243
|
if @api_client.config.client_side_validation && _class.nil?
|
|
159
244
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.archive_class"
|
|
160
245
|
end
|
|
161
246
|
# resource path
|
|
162
|
-
local_var_path =
|
|
247
|
+
local_var_path = '/classes/{class}/archive'.sub('{class}', CGI.escape(_class.to_s))
|
|
163
248
|
|
|
164
249
|
# query parameters
|
|
165
|
-
query_params = {}
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
166
251
|
|
|
167
252
|
# header parameters
|
|
168
|
-
header_params = {}
|
|
253
|
+
header_params = opts[:header_params] || {}
|
|
169
254
|
# HTTP header 'Accept' (if needed)
|
|
170
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
171
|
-
# HTTP header 'Content-Type'
|
|
172
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
173
256
|
|
|
174
257
|
# form parameters
|
|
175
|
-
form_params = {}
|
|
258
|
+
form_params = opts[:form_params] || {}
|
|
176
259
|
|
|
177
260
|
# http body (model)
|
|
178
|
-
post_body =
|
|
179
|
-
|
|
180
|
-
|
|
261
|
+
post_body = opts[:debug_body]
|
|
262
|
+
|
|
263
|
+
# return_type
|
|
264
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
265
|
+
|
|
266
|
+
# auth_names
|
|
267
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
268
|
+
|
|
269
|
+
new_options = opts.merge(
|
|
270
|
+
:operation => :"ClassApi.archive_class",
|
|
181
271
|
:header_params => header_params,
|
|
182
272
|
:query_params => query_params,
|
|
183
273
|
:form_params => form_params,
|
|
184
274
|
:body => post_body,
|
|
185
275
|
:auth_names => auth_names,
|
|
186
|
-
:return_type =>
|
|
276
|
+
:return_type => return_type
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
187
280
|
if @api_client.config.debugging
|
|
188
281
|
@api_client.config.logger.debug "API called: ClassApi#archive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
189
282
|
end
|
|
@@ -191,27 +284,27 @@ module FlatApi
|
|
|
191
284
|
end
|
|
192
285
|
|
|
193
286
|
# Copy an assignment
|
|
194
|
-
# Copy an assignment to a specified class
|
|
195
|
-
# @param _class Unique identifier of the class
|
|
196
|
-
# @param assignment Unique identifier of the assignment
|
|
197
|
-
# @param body
|
|
287
|
+
# Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
|
|
288
|
+
# @param _class [String] Unique identifier of the class
|
|
289
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
290
|
+
# @param body [AssignmentCopy]
|
|
198
291
|
# @param [Hash] opts the optional parameters
|
|
199
|
-
# @return [
|
|
292
|
+
# @return [AssignmentCopyResponse]
|
|
200
293
|
def copy_assignment(_class, assignment, body, opts = {})
|
|
201
294
|
data, _status_code, _headers = copy_assignment_with_http_info(_class, assignment, body, opts)
|
|
202
|
-
|
|
295
|
+
data
|
|
203
296
|
end
|
|
204
297
|
|
|
205
298
|
# Copy an assignment
|
|
206
|
-
# Copy an assignment to a specified class
|
|
207
|
-
# @param _class Unique identifier of the class
|
|
208
|
-
# @param assignment Unique identifier of the assignment
|
|
209
|
-
# @param body
|
|
299
|
+
# Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app.
|
|
300
|
+
# @param _class [String] Unique identifier of the class
|
|
301
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
302
|
+
# @param body [AssignmentCopy]
|
|
210
303
|
# @param [Hash] opts the optional parameters
|
|
211
|
-
# @return [Array<(
|
|
304
|
+
# @return [Array<(AssignmentCopyResponse, Integer, Hash)>] AssignmentCopyResponse data, response status code and response headers
|
|
212
305
|
def copy_assignment_with_http_info(_class, assignment, body, opts = {})
|
|
213
306
|
if @api_client.config.debugging
|
|
214
|
-
@api_client.config.logger.debug
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.copy_assignment ...'
|
|
215
308
|
end
|
|
216
309
|
# verify the required parameter '_class' is set
|
|
217
310
|
if @api_client.config.client_side_validation && _class.nil?
|
|
@@ -226,171 +319,214 @@ module FlatApi
|
|
|
226
319
|
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.copy_assignment"
|
|
227
320
|
end
|
|
228
321
|
# resource path
|
|
229
|
-
local_var_path =
|
|
322
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/copy'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
230
323
|
|
|
231
324
|
# query parameters
|
|
232
|
-
query_params = {}
|
|
325
|
+
query_params = opts[:query_params] || {}
|
|
233
326
|
|
|
234
327
|
# header parameters
|
|
235
|
-
header_params = {}
|
|
328
|
+
header_params = opts[:header_params] || {}
|
|
236
329
|
# HTTP header 'Accept' (if needed)
|
|
237
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
238
331
|
# HTTP header 'Content-Type'
|
|
239
|
-
|
|
332
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
333
|
+
if !content_type.nil?
|
|
334
|
+
header_params['Content-Type'] = content_type
|
|
335
|
+
end
|
|
240
336
|
|
|
241
337
|
# form parameters
|
|
242
|
-
form_params = {}
|
|
338
|
+
form_params = opts[:form_params] || {}
|
|
243
339
|
|
|
244
340
|
# http body (model)
|
|
245
|
-
post_body = @api_client.object_to_http_body(body)
|
|
246
|
-
|
|
247
|
-
|
|
341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
342
|
+
|
|
343
|
+
# return_type
|
|
344
|
+
return_type = opts[:debug_return_type] || 'AssignmentCopyResponse'
|
|
345
|
+
|
|
346
|
+
# auth_names
|
|
347
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
348
|
+
|
|
349
|
+
new_options = opts.merge(
|
|
350
|
+
:operation => :"ClassApi.copy_assignment",
|
|
248
351
|
:header_params => header_params,
|
|
249
352
|
:query_params => query_params,
|
|
250
353
|
:form_params => form_params,
|
|
251
354
|
:body => post_body,
|
|
252
355
|
:auth_names => auth_names,
|
|
253
|
-
:return_type =>
|
|
356
|
+
:return_type => return_type
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
254
360
|
if @api_client.config.debugging
|
|
255
361
|
@api_client.config.logger.debug "API called: ClassApi#copy_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
256
362
|
end
|
|
257
363
|
return data, status_code, headers
|
|
258
364
|
end
|
|
259
365
|
|
|
260
|
-
#
|
|
261
|
-
#
|
|
262
|
-
# @param
|
|
366
|
+
# Create a new class
|
|
367
|
+
# 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 `PUT /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.
|
|
368
|
+
# @param body [ClassCreation]
|
|
263
369
|
# @param [Hash] opts the optional parameters
|
|
264
|
-
# @
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
data
|
|
268
|
-
return data
|
|
370
|
+
# @return [ClassDetails]
|
|
371
|
+
def create_class(body, opts = {})
|
|
372
|
+
data, _status_code, _headers = create_class_with_http_info(body, opts)
|
|
373
|
+
data
|
|
269
374
|
end
|
|
270
375
|
|
|
271
|
-
#
|
|
272
|
-
#
|
|
273
|
-
# @param
|
|
376
|
+
# Create a new class
|
|
377
|
+
# 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 `PUT /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.
|
|
378
|
+
# @param body [ClassCreation]
|
|
274
379
|
# @param [Hash] opts the optional parameters
|
|
275
|
-
# @
|
|
276
|
-
|
|
277
|
-
def create_assignment_with_http_info(_class, opts = {})
|
|
380
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
381
|
+
def create_class_with_http_info(body, opts = {})
|
|
278
382
|
if @api_client.config.debugging
|
|
279
|
-
@api_client.config.logger.debug
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.create_class ...'
|
|
280
384
|
end
|
|
281
|
-
# verify the required parameter '
|
|
282
|
-
if @api_client.config.client_side_validation &&
|
|
283
|
-
fail ArgumentError, "Missing the required parameter '
|
|
385
|
+
# verify the required parameter 'body' is set
|
|
386
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_class"
|
|
284
388
|
end
|
|
285
389
|
# resource path
|
|
286
|
-
local_var_path =
|
|
390
|
+
local_var_path = '/classes'
|
|
287
391
|
|
|
288
392
|
# query parameters
|
|
289
|
-
query_params = {}
|
|
393
|
+
query_params = opts[:query_params] || {}
|
|
290
394
|
|
|
291
395
|
# header parameters
|
|
292
|
-
header_params = {}
|
|
396
|
+
header_params = opts[:header_params] || {}
|
|
293
397
|
# HTTP header 'Accept' (if needed)
|
|
294
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
398
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
295
399
|
# HTTP header 'Content-Type'
|
|
296
|
-
|
|
400
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
401
|
+
if !content_type.nil?
|
|
402
|
+
header_params['Content-Type'] = content_type
|
|
403
|
+
end
|
|
297
404
|
|
|
298
405
|
# form parameters
|
|
299
|
-
form_params = {}
|
|
406
|
+
form_params = opts[:form_params] || {}
|
|
300
407
|
|
|
301
408
|
# http body (model)
|
|
302
|
-
post_body = @api_client.object_to_http_body(
|
|
303
|
-
|
|
304
|
-
|
|
409
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
410
|
+
|
|
411
|
+
# return_type
|
|
412
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
413
|
+
|
|
414
|
+
# auth_names
|
|
415
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
416
|
+
|
|
417
|
+
new_options = opts.merge(
|
|
418
|
+
:operation => :"ClassApi.create_class",
|
|
305
419
|
:header_params => header_params,
|
|
306
420
|
:query_params => query_params,
|
|
307
421
|
:form_params => form_params,
|
|
308
422
|
:body => post_body,
|
|
309
423
|
:auth_names => auth_names,
|
|
310
|
-
:return_type =>
|
|
424
|
+
:return_type => return_type
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
311
428
|
if @api_client.config.debugging
|
|
312
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
429
|
+
@api_client.config.logger.debug "API called: ClassApi#create_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
313
430
|
end
|
|
314
431
|
return data, status_code, headers
|
|
315
432
|
end
|
|
316
433
|
|
|
317
|
-
#
|
|
318
|
-
#
|
|
319
|
-
# @param
|
|
434
|
+
# Assignment creation
|
|
435
|
+
# 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.
|
|
436
|
+
# @param _class [String] Unique identifier of the class
|
|
437
|
+
# @param body [ClassAssignmentUpdate]
|
|
320
438
|
# @param [Hash] opts the optional parameters
|
|
321
|
-
# @return [
|
|
322
|
-
def
|
|
323
|
-
data, _status_code, _headers =
|
|
324
|
-
|
|
439
|
+
# @return [Assignment]
|
|
440
|
+
def create_class_assignment(_class, body, opts = {})
|
|
441
|
+
data, _status_code, _headers = create_class_assignment_with_http_info(_class, body, opts)
|
|
442
|
+
data
|
|
325
443
|
end
|
|
326
444
|
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
# @param
|
|
445
|
+
# Assignment creation
|
|
446
|
+
# 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.
|
|
447
|
+
# @param _class [String] Unique identifier of the class
|
|
448
|
+
# @param body [ClassAssignmentUpdate]
|
|
330
449
|
# @param [Hash] opts the optional parameters
|
|
331
|
-
# @return [Array<(
|
|
332
|
-
def
|
|
450
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
|
451
|
+
def create_class_assignment_with_http_info(_class, body, opts = {})
|
|
333
452
|
if @api_client.config.debugging
|
|
334
|
-
@api_client.config.logger.debug
|
|
453
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.create_class_assignment ...'
|
|
454
|
+
end
|
|
455
|
+
# verify the required parameter '_class' is set
|
|
456
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
457
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_class_assignment"
|
|
335
458
|
end
|
|
336
459
|
# verify the required parameter 'body' is set
|
|
337
460
|
if @api_client.config.client_side_validation && body.nil?
|
|
338
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.
|
|
461
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_class_assignment"
|
|
339
462
|
end
|
|
340
463
|
# resource path
|
|
341
|
-
local_var_path =
|
|
464
|
+
local_var_path = '/classes/{class}/assignments'.sub('{class}', CGI.escape(_class.to_s))
|
|
342
465
|
|
|
343
466
|
# query parameters
|
|
344
|
-
query_params = {}
|
|
467
|
+
query_params = opts[:query_params] || {}
|
|
345
468
|
|
|
346
469
|
# header parameters
|
|
347
|
-
header_params = {}
|
|
470
|
+
header_params = opts[:header_params] || {}
|
|
348
471
|
# HTTP header 'Accept' (if needed)
|
|
349
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
350
473
|
# HTTP header 'Content-Type'
|
|
351
|
-
|
|
474
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
475
|
+
if !content_type.nil?
|
|
476
|
+
header_params['Content-Type'] = content_type
|
|
477
|
+
end
|
|
352
478
|
|
|
353
479
|
# form parameters
|
|
354
|
-
form_params = {}
|
|
480
|
+
form_params = opts[:form_params] || {}
|
|
355
481
|
|
|
356
482
|
# http body (model)
|
|
357
|
-
post_body = @api_client.object_to_http_body(body)
|
|
358
|
-
|
|
359
|
-
|
|
483
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
484
|
+
|
|
485
|
+
# return_type
|
|
486
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
|
487
|
+
|
|
488
|
+
# auth_names
|
|
489
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
490
|
+
|
|
491
|
+
new_options = opts.merge(
|
|
492
|
+
:operation => :"ClassApi.create_class_assignment",
|
|
360
493
|
:header_params => header_params,
|
|
361
494
|
:query_params => query_params,
|
|
362
495
|
:form_params => form_params,
|
|
363
496
|
:body => post_body,
|
|
364
497
|
:auth_names => auth_names,
|
|
365
|
-
:return_type =>
|
|
498
|
+
:return_type => return_type
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
366
502
|
if @api_client.config.debugging
|
|
367
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
503
|
+
@api_client.config.logger.debug "API called: ClassApi#create_class_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
368
504
|
end
|
|
369
505
|
return data, status_code, headers
|
|
370
506
|
end
|
|
371
507
|
|
|
372
508
|
# Create or edit a submission
|
|
373
|
-
# Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments
|
|
374
|
-
# @param _class Unique identifier of the class
|
|
375
|
-
# @param assignment Unique identifier of the assignment
|
|
376
|
-
# @param body
|
|
509
|
+
# Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id.
|
|
510
|
+
# @param _class [String] Unique identifier of the class
|
|
511
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
512
|
+
# @param body [AssignmentSubmissionUpdate]
|
|
377
513
|
# @param [Hash] opts the optional parameters
|
|
378
514
|
# @return [AssignmentSubmission]
|
|
379
515
|
def create_submission(_class, assignment, body, opts = {})
|
|
380
516
|
data, _status_code, _headers = create_submission_with_http_info(_class, assignment, body, opts)
|
|
381
|
-
|
|
517
|
+
data
|
|
382
518
|
end
|
|
383
519
|
|
|
384
520
|
# Create or edit a submission
|
|
385
|
-
# Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`
|
|
386
|
-
# @param _class Unique identifier of the class
|
|
387
|
-
# @param assignment Unique identifier of the assignment
|
|
388
|
-
# @param body
|
|
521
|
+
# Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id.
|
|
522
|
+
# @param _class [String] Unique identifier of the class
|
|
523
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
524
|
+
# @param body [AssignmentSubmissionUpdate]
|
|
389
525
|
# @param [Hash] opts the optional parameters
|
|
390
|
-
# @return [Array<(AssignmentSubmission,
|
|
526
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
|
391
527
|
def create_submission_with_http_info(_class, assignment, body, opts = {})
|
|
392
528
|
if @api_client.config.debugging
|
|
393
|
-
@api_client.config.logger.debug
|
|
529
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.create_submission ...'
|
|
394
530
|
end
|
|
395
531
|
# verify the required parameter '_class' is set
|
|
396
532
|
if @api_client.config.client_side_validation && _class.nil?
|
|
@@ -405,422 +541,1127 @@ module FlatApi
|
|
|
405
541
|
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_submission"
|
|
406
542
|
end
|
|
407
543
|
# resource path
|
|
408
|
-
local_var_path =
|
|
544
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
409
545
|
|
|
410
546
|
# query parameters
|
|
411
|
-
query_params = {}
|
|
547
|
+
query_params = opts[:query_params] || {}
|
|
412
548
|
|
|
413
549
|
# header parameters
|
|
414
|
-
header_params = {}
|
|
550
|
+
header_params = opts[:header_params] || {}
|
|
415
551
|
# HTTP header 'Accept' (if needed)
|
|
416
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
552
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
417
553
|
# HTTP header 'Content-Type'
|
|
418
|
-
|
|
554
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
555
|
+
if !content_type.nil?
|
|
556
|
+
header_params['Content-Type'] = content_type
|
|
557
|
+
end
|
|
419
558
|
|
|
420
559
|
# form parameters
|
|
421
|
-
form_params = {}
|
|
560
|
+
form_params = opts[:form_params] || {}
|
|
422
561
|
|
|
423
562
|
# http body (model)
|
|
424
|
-
post_body = @api_client.object_to_http_body(body)
|
|
425
|
-
|
|
426
|
-
|
|
563
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
564
|
+
|
|
565
|
+
# return_type
|
|
566
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
|
567
|
+
|
|
568
|
+
# auth_names
|
|
569
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
570
|
+
|
|
571
|
+
new_options = opts.merge(
|
|
572
|
+
:operation => :"ClassApi.create_submission",
|
|
427
573
|
:header_params => header_params,
|
|
428
574
|
:query_params => query_params,
|
|
429
575
|
:form_params => form_params,
|
|
430
576
|
:body => post_body,
|
|
431
577
|
:auth_names => auth_names,
|
|
432
|
-
:return_type =>
|
|
578
|
+
:return_type => return_type
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
433
582
|
if @api_client.config.debugging
|
|
434
583
|
@api_client.config.logger.debug "API called: ClassApi#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
435
584
|
end
|
|
436
585
|
return data, status_code, headers
|
|
437
586
|
end
|
|
438
587
|
|
|
439
|
-
#
|
|
440
|
-
#
|
|
441
|
-
# @param _class Unique identifier of the class
|
|
442
|
-
# @param user Unique identifier of the user
|
|
588
|
+
# Create a test student account
|
|
589
|
+
# Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license.
|
|
590
|
+
# @param _class [String] Unique identifier of the class
|
|
443
591
|
# @param [Hash] opts the optional parameters
|
|
444
|
-
# @
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
592
|
+
# @option opts [Boolean] :reset If true, the testing account will be re-created.
|
|
593
|
+
# @return [UserDetails]
|
|
594
|
+
def create_test_student_account(_class, opts = {})
|
|
595
|
+
data, _status_code, _headers = create_test_student_account_with_http_info(_class, opts)
|
|
596
|
+
data
|
|
448
597
|
end
|
|
449
598
|
|
|
450
|
-
#
|
|
451
|
-
#
|
|
452
|
-
# @param _class Unique identifier of the class
|
|
453
|
-
# @param user Unique identifier of the user
|
|
599
|
+
# Create a test student account
|
|
600
|
+
# Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license.
|
|
601
|
+
# @param _class [String] Unique identifier of the class
|
|
454
602
|
# @param [Hash] opts the optional parameters
|
|
455
|
-
# @
|
|
456
|
-
|
|
603
|
+
# @option opts [Boolean] :reset If true, the testing account will be re-created.
|
|
604
|
+
# @return [Array<(UserDetails, Integer, Hash)>] UserDetails data, response status code and response headers
|
|
605
|
+
def create_test_student_account_with_http_info(_class, opts = {})
|
|
457
606
|
if @api_client.config.debugging
|
|
458
|
-
@api_client.config.logger.debug
|
|
607
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.create_test_student_account ...'
|
|
459
608
|
end
|
|
460
609
|
# verify the required parameter '_class' is set
|
|
461
610
|
if @api_client.config.client_side_validation && _class.nil?
|
|
462
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
|
463
|
-
end
|
|
464
|
-
# verify the required parameter 'user' is set
|
|
465
|
-
if @api_client.config.client_side_validation && user.nil?
|
|
466
|
-
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user"
|
|
611
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_test_student_account"
|
|
467
612
|
end
|
|
468
613
|
# resource path
|
|
469
|
-
local_var_path =
|
|
614
|
+
local_var_path = '/classes/{class}/testStudent'.sub('{class}', CGI.escape(_class.to_s))
|
|
470
615
|
|
|
471
616
|
# query parameters
|
|
472
|
-
query_params = {}
|
|
617
|
+
query_params = opts[:query_params] || {}
|
|
618
|
+
query_params[:'reset'] = opts[:'reset'] if !opts[:'reset'].nil?
|
|
473
619
|
|
|
474
620
|
# header parameters
|
|
475
|
-
header_params = {}
|
|
621
|
+
header_params = opts[:header_params] || {}
|
|
476
622
|
# HTTP header 'Accept' (if needed)
|
|
477
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
478
|
-
# HTTP header 'Content-Type'
|
|
479
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
623
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
480
624
|
|
|
481
625
|
# form parameters
|
|
482
|
-
form_params = {}
|
|
626
|
+
form_params = opts[:form_params] || {}
|
|
483
627
|
|
|
484
628
|
# http body (model)
|
|
485
|
-
post_body =
|
|
486
|
-
|
|
487
|
-
|
|
629
|
+
post_body = opts[:debug_body]
|
|
630
|
+
|
|
631
|
+
# return_type
|
|
632
|
+
return_type = opts[:debug_return_type] || 'UserDetails'
|
|
633
|
+
|
|
634
|
+
# auth_names
|
|
635
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
636
|
+
|
|
637
|
+
new_options = opts.merge(
|
|
638
|
+
:operation => :"ClassApi.create_test_student_account",
|
|
488
639
|
:header_params => header_params,
|
|
489
640
|
:query_params => query_params,
|
|
490
641
|
:form_params => form_params,
|
|
491
642
|
:body => post_body,
|
|
492
|
-
:auth_names => auth_names
|
|
643
|
+
:auth_names => auth_names,
|
|
644
|
+
:return_type => return_type
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
493
648
|
if @api_client.config.debugging
|
|
494
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
649
|
+
@api_client.config.logger.debug "API called: ClassApi#create_test_student_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
650
|
end
|
|
496
651
|
return data, status_code, headers
|
|
497
652
|
end
|
|
498
653
|
|
|
499
|
-
#
|
|
500
|
-
#
|
|
501
|
-
# @param _class Unique identifier of the class
|
|
502
|
-
# @param assignment Unique identifier of the assignment
|
|
503
|
-
# @param submission Unique identifier of the submission
|
|
504
|
-
# @param body
|
|
654
|
+
# Delete an assignment
|
|
655
|
+
# Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades.
|
|
656
|
+
# @param _class [String] Unique identifier of the class
|
|
657
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
505
658
|
# @param [Hash] opts the optional parameters
|
|
506
|
-
# @return [
|
|
507
|
-
def
|
|
508
|
-
|
|
509
|
-
|
|
659
|
+
# @return [nil]
|
|
660
|
+
def delete_assignment(_class, assignment, opts = {})
|
|
661
|
+
delete_assignment_with_http_info(_class, assignment, opts)
|
|
662
|
+
nil
|
|
510
663
|
end
|
|
511
664
|
|
|
512
|
-
#
|
|
513
|
-
#
|
|
514
|
-
# @param _class Unique identifier of the class
|
|
515
|
-
# @param assignment Unique identifier of the assignment
|
|
516
|
-
# @param submission Unique identifier of the submission
|
|
517
|
-
# @param body
|
|
665
|
+
# Delete an assignment
|
|
666
|
+
# Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades.
|
|
667
|
+
# @param _class [String] Unique identifier of the class
|
|
668
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
518
669
|
# @param [Hash] opts the optional parameters
|
|
519
|
-
# @return [Array<(
|
|
520
|
-
def
|
|
670
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
671
|
+
def delete_assignment_with_http_info(_class, assignment, opts = {})
|
|
521
672
|
if @api_client.config.debugging
|
|
522
|
-
@api_client.config.logger.debug
|
|
673
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_assignment ...'
|
|
523
674
|
end
|
|
524
675
|
# verify the required parameter '_class' is set
|
|
525
676
|
if @api_client.config.client_side_validation && _class.nil?
|
|
526
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
|
677
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_assignment"
|
|
527
678
|
end
|
|
528
679
|
# verify the required parameter 'assignment' is set
|
|
529
680
|
if @api_client.config.client_side_validation && assignment.nil?
|
|
530
|
-
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.
|
|
531
|
-
end
|
|
532
|
-
# verify the required parameter 'submission' is set
|
|
533
|
-
if @api_client.config.client_side_validation && submission.nil?
|
|
534
|
-
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission"
|
|
535
|
-
end
|
|
536
|
-
# verify the required parameter 'body' is set
|
|
537
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
538
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission"
|
|
681
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.delete_assignment"
|
|
539
682
|
end
|
|
540
683
|
# resource path
|
|
541
|
-
local_var_path =
|
|
684
|
+
local_var_path = '/classes/{class}/assignments/{assignment}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
542
685
|
|
|
543
686
|
# query parameters
|
|
544
|
-
query_params = {}
|
|
687
|
+
query_params = opts[:query_params] || {}
|
|
545
688
|
|
|
546
689
|
# header parameters
|
|
547
|
-
header_params = {}
|
|
690
|
+
header_params = opts[:header_params] || {}
|
|
548
691
|
# HTTP header 'Accept' (if needed)
|
|
549
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
550
|
-
# HTTP header 'Content-Type'
|
|
551
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
692
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
552
693
|
|
|
553
694
|
# form parameters
|
|
554
|
-
form_params = {}
|
|
695
|
+
form_params = opts[:form_params] || {}
|
|
555
696
|
|
|
556
697
|
# http body (model)
|
|
557
|
-
post_body =
|
|
558
|
-
|
|
559
|
-
|
|
698
|
+
post_body = opts[:debug_body]
|
|
699
|
+
|
|
700
|
+
# return_type
|
|
701
|
+
return_type = opts[:debug_return_type]
|
|
702
|
+
|
|
703
|
+
# auth_names
|
|
704
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
705
|
+
|
|
706
|
+
new_options = opts.merge(
|
|
707
|
+
:operation => :"ClassApi.delete_assignment",
|
|
560
708
|
:header_params => header_params,
|
|
561
709
|
:query_params => query_params,
|
|
562
710
|
:form_params => form_params,
|
|
563
711
|
:body => post_body,
|
|
564
712
|
:auth_names => auth_names,
|
|
565
|
-
:return_type =>
|
|
713
|
+
:return_type => return_type
|
|
714
|
+
)
|
|
715
|
+
|
|
716
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
566
717
|
if @api_client.config.debugging
|
|
567
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
718
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
568
719
|
end
|
|
569
720
|
return data, status_code, headers
|
|
570
721
|
end
|
|
571
722
|
|
|
572
|
-
#
|
|
573
|
-
#
|
|
574
|
-
# @param
|
|
723
|
+
# Remove a user from the class
|
|
724
|
+
# This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
|
|
725
|
+
# @param _class [String] Unique identifier of the class
|
|
726
|
+
# @param user [String] Unique identifier of the user
|
|
575
727
|
# @param [Hash] opts the optional parameters
|
|
576
|
-
# @return [
|
|
577
|
-
def
|
|
578
|
-
|
|
579
|
-
|
|
728
|
+
# @return [nil]
|
|
729
|
+
def delete_class_user(_class, user, opts = {})
|
|
730
|
+
delete_class_user_with_http_info(_class, user, opts)
|
|
731
|
+
nil
|
|
580
732
|
end
|
|
581
733
|
|
|
582
|
-
#
|
|
583
|
-
#
|
|
584
|
-
# @param
|
|
734
|
+
# Remove a user from the class
|
|
735
|
+
# This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
|
|
736
|
+
# @param _class [String] Unique identifier of the class
|
|
737
|
+
# @param user [String] Unique identifier of the user
|
|
585
738
|
# @param [Hash] opts the optional parameters
|
|
586
|
-
# @return [Array<(
|
|
587
|
-
def
|
|
739
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
740
|
+
def delete_class_user_with_http_info(_class, user, opts = {})
|
|
588
741
|
if @api_client.config.debugging
|
|
589
|
-
@api_client.config.logger.debug
|
|
742
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_class_user ...'
|
|
590
743
|
end
|
|
591
|
-
# verify the required parameter '
|
|
592
|
-
if @api_client.config.client_side_validation &&
|
|
593
|
-
fail ArgumentError, "Missing the required parameter '
|
|
744
|
+
# verify the required parameter '_class' is set
|
|
745
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
746
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_class_user"
|
|
747
|
+
end
|
|
748
|
+
# verify the required parameter 'user' is set
|
|
749
|
+
if @api_client.config.client_side_validation && user.nil?
|
|
750
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user"
|
|
594
751
|
end
|
|
595
752
|
# resource path
|
|
596
|
-
local_var_path =
|
|
753
|
+
local_var_path = '/classes/{class}/users/{user}'.sub('{class}', CGI.escape(_class.to_s)).sub('{user}', CGI.escape(user.to_s))
|
|
597
754
|
|
|
598
755
|
# query parameters
|
|
599
|
-
query_params = {}
|
|
756
|
+
query_params = opts[:query_params] || {}
|
|
600
757
|
|
|
601
758
|
# header parameters
|
|
602
|
-
header_params = {}
|
|
759
|
+
header_params = opts[:header_params] || {}
|
|
603
760
|
# HTTP header 'Accept' (if needed)
|
|
604
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
605
|
-
# HTTP header 'Content-Type'
|
|
606
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
761
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
607
762
|
|
|
608
763
|
# form parameters
|
|
609
|
-
form_params = {}
|
|
764
|
+
form_params = opts[:form_params] || {}
|
|
610
765
|
|
|
611
766
|
# http body (model)
|
|
612
|
-
post_body =
|
|
613
|
-
|
|
614
|
-
|
|
767
|
+
post_body = opts[:debug_body]
|
|
768
|
+
|
|
769
|
+
# return_type
|
|
770
|
+
return_type = opts[:debug_return_type]
|
|
771
|
+
|
|
772
|
+
# auth_names
|
|
773
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
774
|
+
|
|
775
|
+
new_options = opts.merge(
|
|
776
|
+
:operation => :"ClassApi.delete_class_user",
|
|
615
777
|
:header_params => header_params,
|
|
616
778
|
:query_params => query_params,
|
|
617
779
|
:form_params => form_params,
|
|
618
780
|
:body => post_body,
|
|
619
781
|
:auth_names => auth_names,
|
|
620
|
-
:return_type =>
|
|
782
|
+
:return_type => return_type
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
621
786
|
if @api_client.config.debugging
|
|
622
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
787
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
623
788
|
end
|
|
624
789
|
return data, status_code, headers
|
|
625
790
|
end
|
|
626
791
|
|
|
627
|
-
#
|
|
628
|
-
#
|
|
629
|
-
# @param _class Unique identifier of the class
|
|
792
|
+
# Reset a submission
|
|
793
|
+
# Use this method as a teacher to reset a submission and allow student to start over the assignment
|
|
794
|
+
# @param _class [String] Unique identifier of the class
|
|
795
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
796
|
+
# @param submission [String] Unique identifier of the submission
|
|
630
797
|
# @param [Hash] opts the optional parameters
|
|
631
|
-
# @return [
|
|
632
|
-
def
|
|
633
|
-
data, _status_code, _headers =
|
|
634
|
-
|
|
798
|
+
# @return [AssignmentSubmission]
|
|
799
|
+
def delete_submission(_class, assignment, submission, opts = {})
|
|
800
|
+
data, _status_code, _headers = delete_submission_with_http_info(_class, assignment, submission, opts)
|
|
801
|
+
data
|
|
635
802
|
end
|
|
636
803
|
|
|
637
|
-
#
|
|
638
|
-
#
|
|
639
|
-
# @param _class Unique identifier of the class
|
|
804
|
+
# Reset a submission
|
|
805
|
+
# Use this method as a teacher to reset a submission and allow student to start over the assignment
|
|
806
|
+
# @param _class [String] Unique identifier of the class
|
|
807
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
808
|
+
# @param submission [String] Unique identifier of the submission
|
|
640
809
|
# @param [Hash] opts the optional parameters
|
|
641
|
-
# @return [Array<(
|
|
642
|
-
def
|
|
810
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
|
811
|
+
def delete_submission_with_http_info(_class, assignment, submission, opts = {})
|
|
643
812
|
if @api_client.config.debugging
|
|
644
|
-
@api_client.config.logger.debug
|
|
813
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_submission ...'
|
|
645
814
|
end
|
|
646
815
|
# verify the required parameter '_class' is set
|
|
647
816
|
if @api_client.config.client_side_validation && _class.nil?
|
|
648
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
|
817
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_submission"
|
|
818
|
+
end
|
|
819
|
+
# verify the required parameter 'assignment' is set
|
|
820
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
821
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.delete_submission"
|
|
822
|
+
end
|
|
823
|
+
# verify the required parameter 'submission' is set
|
|
824
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
825
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.delete_submission"
|
|
649
826
|
end
|
|
650
827
|
# resource path
|
|
651
|
-
local_var_path =
|
|
828
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
652
829
|
|
|
653
830
|
# query parameters
|
|
654
|
-
query_params = {}
|
|
831
|
+
query_params = opts[:query_params] || {}
|
|
655
832
|
|
|
656
833
|
# header parameters
|
|
657
|
-
header_params = {}
|
|
834
|
+
header_params = opts[:header_params] || {}
|
|
658
835
|
# HTTP header 'Accept' (if needed)
|
|
659
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
660
|
-
# HTTP header 'Content-Type'
|
|
661
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
836
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
662
837
|
|
|
663
838
|
# form parameters
|
|
664
|
-
form_params = {}
|
|
839
|
+
form_params = opts[:form_params] || {}
|
|
665
840
|
|
|
666
841
|
# http body (model)
|
|
667
|
-
post_body =
|
|
668
|
-
|
|
669
|
-
|
|
842
|
+
post_body = opts[:debug_body]
|
|
843
|
+
|
|
844
|
+
# return_type
|
|
845
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
|
846
|
+
|
|
847
|
+
# auth_names
|
|
848
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
849
|
+
|
|
850
|
+
new_options = opts.merge(
|
|
851
|
+
:operation => :"ClassApi.delete_submission",
|
|
670
852
|
:header_params => header_params,
|
|
671
853
|
:query_params => query_params,
|
|
672
854
|
:form_params => form_params,
|
|
673
855
|
:body => post_body,
|
|
674
856
|
:auth_names => auth_names,
|
|
675
|
-
:return_type =>
|
|
857
|
+
:return_type => return_type
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
676
861
|
if @api_client.config.debugging
|
|
677
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
862
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
678
863
|
end
|
|
679
864
|
return data, status_code, headers
|
|
680
865
|
end
|
|
681
866
|
|
|
682
|
-
#
|
|
683
|
-
#
|
|
684
|
-
# @param
|
|
867
|
+
# Delete a feedback comment to a submission
|
|
868
|
+
# @param _class [String] Unique identifier of the class
|
|
869
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
870
|
+
# @param submission [String] Unique identifier of the submission
|
|
871
|
+
# @param comment [String] Unique identifier of the comment
|
|
685
872
|
# @param [Hash] opts the optional parameters
|
|
686
|
-
# @return [
|
|
687
|
-
def
|
|
688
|
-
|
|
689
|
-
|
|
873
|
+
# @return [nil]
|
|
874
|
+
def delete_submission_comment(_class, assignment, submission, comment, opts = {})
|
|
875
|
+
delete_submission_comment_with_http_info(_class, assignment, submission, comment, opts)
|
|
876
|
+
nil
|
|
690
877
|
end
|
|
691
878
|
|
|
692
|
-
#
|
|
693
|
-
#
|
|
694
|
-
# @param
|
|
879
|
+
# Delete a feedback comment to a submission
|
|
880
|
+
# @param _class [String] Unique identifier of the class
|
|
881
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
882
|
+
# @param submission [String] Unique identifier of the submission
|
|
883
|
+
# @param comment [String] Unique identifier of the comment
|
|
695
884
|
# @param [Hash] opts the optional parameters
|
|
696
|
-
# @return [Array<(
|
|
697
|
-
def
|
|
885
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
886
|
+
def delete_submission_comment_with_http_info(_class, assignment, submission, comment, opts = {})
|
|
698
887
|
if @api_client.config.debugging
|
|
699
|
-
@api_client.config.logger.debug
|
|
888
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_submission_comment ...'
|
|
700
889
|
end
|
|
701
|
-
# verify the required parameter '
|
|
702
|
-
if @api_client.config.client_side_validation &&
|
|
703
|
-
fail ArgumentError, "Missing the required parameter '
|
|
890
|
+
# verify the required parameter '_class' is set
|
|
891
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
892
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_submission_comment"
|
|
893
|
+
end
|
|
894
|
+
# verify the required parameter 'assignment' is set
|
|
895
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
896
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.delete_submission_comment"
|
|
897
|
+
end
|
|
898
|
+
# verify the required parameter 'submission' is set
|
|
899
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
900
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.delete_submission_comment"
|
|
901
|
+
end
|
|
902
|
+
# verify the required parameter 'comment' is set
|
|
903
|
+
if @api_client.config.client_side_validation && comment.nil?
|
|
904
|
+
fail ArgumentError, "Missing the required parameter 'comment' when calling ClassApi.delete_submission_comment"
|
|
704
905
|
end
|
|
705
906
|
# resource path
|
|
706
|
-
local_var_path =
|
|
907
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
707
908
|
|
|
708
909
|
# query parameters
|
|
709
|
-
query_params = {}
|
|
910
|
+
query_params = opts[:query_params] || {}
|
|
710
911
|
|
|
711
912
|
# header parameters
|
|
712
|
-
header_params = {}
|
|
913
|
+
header_params = opts[:header_params] || {}
|
|
713
914
|
# HTTP header 'Accept' (if needed)
|
|
714
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
715
|
-
# HTTP header 'Content-Type'
|
|
716
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
915
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
717
916
|
|
|
718
917
|
# form parameters
|
|
719
|
-
form_params = {}
|
|
918
|
+
form_params = opts[:form_params] || {}
|
|
720
919
|
|
|
721
920
|
# http body (model)
|
|
722
|
-
post_body =
|
|
723
|
-
|
|
724
|
-
|
|
921
|
+
post_body = opts[:debug_body]
|
|
922
|
+
|
|
923
|
+
# return_type
|
|
924
|
+
return_type = opts[:debug_return_type]
|
|
925
|
+
|
|
926
|
+
# auth_names
|
|
927
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
928
|
+
|
|
929
|
+
new_options = opts.merge(
|
|
930
|
+
:operation => :"ClassApi.delete_submission_comment",
|
|
725
931
|
:header_params => header_params,
|
|
726
932
|
:query_params => query_params,
|
|
727
933
|
:form_params => form_params,
|
|
728
934
|
:body => post_body,
|
|
729
935
|
:auth_names => auth_names,
|
|
730
|
-
:return_type =>
|
|
936
|
+
:return_type => return_type
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
731
940
|
if @api_client.config.debugging
|
|
732
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
941
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
733
942
|
end
|
|
734
943
|
return data, status_code, headers
|
|
735
944
|
end
|
|
736
945
|
|
|
737
|
-
#
|
|
738
|
-
#
|
|
739
|
-
# @param _class Unique identifier of the class
|
|
740
|
-
# @param assignment Unique identifier of the assignment
|
|
741
|
-
# @param submission Unique identifier of the submission
|
|
946
|
+
# Edit a submission
|
|
947
|
+
# Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`
|
|
948
|
+
# @param _class [String] Unique identifier of the class
|
|
949
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
950
|
+
# @param submission [String] Unique identifier of the submission
|
|
951
|
+
# @param body [AssignmentSubmissionUpdate]
|
|
742
952
|
# @param [Hash] opts the optional parameters
|
|
743
953
|
# @return [AssignmentSubmission]
|
|
744
|
-
def
|
|
745
|
-
data, _status_code, _headers =
|
|
746
|
-
|
|
954
|
+
def edit_submission(_class, assignment, submission, body, opts = {})
|
|
955
|
+
data, _status_code, _headers = edit_submission_with_http_info(_class, assignment, submission, body, opts)
|
|
956
|
+
data
|
|
747
957
|
end
|
|
748
958
|
|
|
749
|
-
#
|
|
750
|
-
#
|
|
751
|
-
# @param _class Unique identifier of the class
|
|
752
|
-
# @param assignment Unique identifier of the assignment
|
|
753
|
-
# @param submission Unique identifier of the submission
|
|
959
|
+
# Edit a submission
|
|
960
|
+
# Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`
|
|
961
|
+
# @param _class [String] Unique identifier of the class
|
|
962
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
963
|
+
# @param submission [String] Unique identifier of the submission
|
|
964
|
+
# @param body [AssignmentSubmissionUpdate]
|
|
754
965
|
# @param [Hash] opts the optional parameters
|
|
755
|
-
# @return [Array<(AssignmentSubmission,
|
|
756
|
-
def
|
|
966
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
|
967
|
+
def edit_submission_with_http_info(_class, assignment, submission, body, opts = {})
|
|
757
968
|
if @api_client.config.debugging
|
|
758
|
-
@api_client.config.logger.debug
|
|
969
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.edit_submission ...'
|
|
759
970
|
end
|
|
760
971
|
# verify the required parameter '_class' is set
|
|
761
972
|
if @api_client.config.client_side_validation && _class.nil?
|
|
762
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
|
973
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.edit_submission"
|
|
763
974
|
end
|
|
764
975
|
# verify the required parameter 'assignment' is set
|
|
765
976
|
if @api_client.config.client_side_validation && assignment.nil?
|
|
766
|
-
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.
|
|
977
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.edit_submission"
|
|
767
978
|
end
|
|
768
979
|
# verify the required parameter 'submission' is set
|
|
769
980
|
if @api_client.config.client_side_validation && submission.nil?
|
|
770
|
-
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.
|
|
981
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission"
|
|
982
|
+
end
|
|
983
|
+
# verify the required parameter 'body' is set
|
|
984
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
985
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission"
|
|
771
986
|
end
|
|
772
987
|
# resource path
|
|
773
|
-
local_var_path =
|
|
988
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
774
989
|
|
|
775
990
|
# query parameters
|
|
776
|
-
query_params = {}
|
|
991
|
+
query_params = opts[:query_params] || {}
|
|
777
992
|
|
|
778
993
|
# header parameters
|
|
779
|
-
header_params = {}
|
|
994
|
+
header_params = opts[:header_params] || {}
|
|
780
995
|
# HTTP header 'Accept' (if needed)
|
|
781
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
996
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
782
997
|
# HTTP header 'Content-Type'
|
|
783
|
-
|
|
998
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
999
|
+
if !content_type.nil?
|
|
1000
|
+
header_params['Content-Type'] = content_type
|
|
1001
|
+
end
|
|
784
1002
|
|
|
785
1003
|
# form parameters
|
|
786
|
-
form_params = {}
|
|
1004
|
+
form_params = opts[:form_params] || {}
|
|
787
1005
|
|
|
788
1006
|
# http body (model)
|
|
789
|
-
post_body =
|
|
790
|
-
|
|
791
|
-
|
|
1007
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1008
|
+
|
|
1009
|
+
# return_type
|
|
1010
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
|
1011
|
+
|
|
1012
|
+
# auth_names
|
|
1013
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1014
|
+
|
|
1015
|
+
new_options = opts.merge(
|
|
1016
|
+
:operation => :"ClassApi.edit_submission",
|
|
792
1017
|
:header_params => header_params,
|
|
793
1018
|
:query_params => query_params,
|
|
794
1019
|
:form_params => form_params,
|
|
795
1020
|
:body => post_body,
|
|
796
1021
|
:auth_names => auth_names,
|
|
797
|
-
:return_type =>
|
|
1022
|
+
:return_type => return_type
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
798
1026
|
if @api_client.config.debugging
|
|
799
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
|
1027
|
+
@api_client.config.logger.debug "API called: ClassApi#edit_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
800
1028
|
end
|
|
801
1029
|
return data, status_code, headers
|
|
802
1030
|
end
|
|
803
1031
|
|
|
804
|
-
#
|
|
805
|
-
#
|
|
806
|
-
# @param
|
|
807
|
-
# @param
|
|
808
|
-
# @
|
|
1032
|
+
# Join a class
|
|
1033
|
+
# 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.
|
|
1034
|
+
# @param enrollment_code [String] The enrollment code, available to the teacher in `ClassDetails`
|
|
1035
|
+
# @param [Hash] opts the optional parameters
|
|
1036
|
+
# @return [ClassDetails]
|
|
1037
|
+
def enroll_class(enrollment_code, opts = {})
|
|
1038
|
+
data, _status_code, _headers = enroll_class_with_http_info(enrollment_code, opts)
|
|
1039
|
+
data
|
|
1040
|
+
end
|
|
1041
|
+
|
|
1042
|
+
# Join a class
|
|
1043
|
+
# 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.
|
|
1044
|
+
# @param enrollment_code [String] The enrollment code, available to the teacher in `ClassDetails`
|
|
1045
|
+
# @param [Hash] opts the optional parameters
|
|
1046
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
1047
|
+
def enroll_class_with_http_info(enrollment_code, opts = {})
|
|
1048
|
+
if @api_client.config.debugging
|
|
1049
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.enroll_class ...'
|
|
1050
|
+
end
|
|
1051
|
+
# verify the required parameter 'enrollment_code' is set
|
|
1052
|
+
if @api_client.config.client_side_validation && enrollment_code.nil?
|
|
1053
|
+
fail ArgumentError, "Missing the required parameter 'enrollment_code' when calling ClassApi.enroll_class"
|
|
1054
|
+
end
|
|
1055
|
+
# resource path
|
|
1056
|
+
local_var_path = '/classes/enroll/{enrollmentCode}'.sub('{enrollmentCode}', CGI.escape(enrollment_code.to_s))
|
|
1057
|
+
|
|
1058
|
+
# query parameters
|
|
1059
|
+
query_params = opts[:query_params] || {}
|
|
1060
|
+
|
|
1061
|
+
# header parameters
|
|
1062
|
+
header_params = opts[:header_params] || {}
|
|
1063
|
+
# HTTP header 'Accept' (if needed)
|
|
1064
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1065
|
+
|
|
1066
|
+
# form parameters
|
|
1067
|
+
form_params = opts[:form_params] || {}
|
|
1068
|
+
|
|
1069
|
+
# http body (model)
|
|
1070
|
+
post_body = opts[:debug_body]
|
|
1071
|
+
|
|
1072
|
+
# return_type
|
|
1073
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
1074
|
+
|
|
1075
|
+
# auth_names
|
|
1076
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1077
|
+
|
|
1078
|
+
new_options = opts.merge(
|
|
1079
|
+
:operation => :"ClassApi.enroll_class",
|
|
1080
|
+
:header_params => header_params,
|
|
1081
|
+
:query_params => query_params,
|
|
1082
|
+
:form_params => form_params,
|
|
1083
|
+
:body => post_body,
|
|
1084
|
+
:auth_names => auth_names,
|
|
1085
|
+
:return_type => return_type
|
|
1086
|
+
)
|
|
1087
|
+
|
|
1088
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1089
|
+
if @api_client.config.debugging
|
|
1090
|
+
@api_client.config.logger.debug "API called: ClassApi#enroll_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1091
|
+
end
|
|
1092
|
+
return data, status_code, headers
|
|
1093
|
+
end
|
|
1094
|
+
|
|
1095
|
+
# CSV Grades exports
|
|
1096
|
+
# Export list of submissions grades to a CSV file
|
|
1097
|
+
# @param _class [String] Unique identifier of the class
|
|
1098
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1099
|
+
# @param [Hash] opts the optional parameters
|
|
1100
|
+
# @return [File]
|
|
1101
|
+
def export_submissions_reviews_as_csv(_class, assignment, opts = {})
|
|
1102
|
+
data, _status_code, _headers = export_submissions_reviews_as_csv_with_http_info(_class, assignment, opts)
|
|
1103
|
+
data
|
|
1104
|
+
end
|
|
1105
|
+
|
|
1106
|
+
# CSV Grades exports
|
|
1107
|
+
# Export list of submissions grades to a CSV file
|
|
1108
|
+
# @param _class [String] Unique identifier of the class
|
|
1109
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1110
|
+
# @param [Hash] opts the optional parameters
|
|
1111
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
1112
|
+
def export_submissions_reviews_as_csv_with_http_info(_class, assignment, opts = {})
|
|
1113
|
+
if @api_client.config.debugging
|
|
1114
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.export_submissions_reviews_as_csv ...'
|
|
1115
|
+
end
|
|
1116
|
+
# verify the required parameter '_class' is set
|
|
1117
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1118
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.export_submissions_reviews_as_csv"
|
|
1119
|
+
end
|
|
1120
|
+
# verify the required parameter 'assignment' is set
|
|
1121
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1122
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.export_submissions_reviews_as_csv"
|
|
1123
|
+
end
|
|
1124
|
+
# resource path
|
|
1125
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/csv'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
1126
|
+
|
|
1127
|
+
# query parameters
|
|
1128
|
+
query_params = opts[:query_params] || {}
|
|
1129
|
+
|
|
1130
|
+
# header parameters
|
|
1131
|
+
header_params = opts[:header_params] || {}
|
|
1132
|
+
# HTTP header 'Accept' (if needed)
|
|
1133
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv']) unless header_params['Accept']
|
|
1134
|
+
|
|
1135
|
+
# form parameters
|
|
1136
|
+
form_params = opts[:form_params] || {}
|
|
1137
|
+
|
|
1138
|
+
# http body (model)
|
|
1139
|
+
post_body = opts[:debug_body]
|
|
1140
|
+
|
|
1141
|
+
# return_type
|
|
1142
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
1143
|
+
|
|
1144
|
+
# auth_names
|
|
1145
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1146
|
+
|
|
1147
|
+
new_options = opts.merge(
|
|
1148
|
+
:operation => :"ClassApi.export_submissions_reviews_as_csv",
|
|
1149
|
+
:header_params => header_params,
|
|
1150
|
+
:query_params => query_params,
|
|
1151
|
+
:form_params => form_params,
|
|
1152
|
+
:body => post_body,
|
|
1153
|
+
:auth_names => auth_names,
|
|
1154
|
+
:return_type => return_type
|
|
1155
|
+
)
|
|
1156
|
+
|
|
1157
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1158
|
+
if @api_client.config.debugging
|
|
1159
|
+
@api_client.config.logger.debug "API called: ClassApi#export_submissions_reviews_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1160
|
+
end
|
|
1161
|
+
return data, status_code, headers
|
|
1162
|
+
end
|
|
1163
|
+
|
|
1164
|
+
# Excel Grades exports
|
|
1165
|
+
# Export list of submissions grades to an Excel file
|
|
1166
|
+
# @param _class [String] Unique identifier of the class
|
|
1167
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1168
|
+
# @param [Hash] opts the optional parameters
|
|
1169
|
+
# @return [File]
|
|
1170
|
+
def export_submissions_reviews_as_excel(_class, assignment, opts = {})
|
|
1171
|
+
data, _status_code, _headers = export_submissions_reviews_as_excel_with_http_info(_class, assignment, opts)
|
|
1172
|
+
data
|
|
1173
|
+
end
|
|
1174
|
+
|
|
1175
|
+
# Excel Grades exports
|
|
1176
|
+
# Export list of submissions grades to an Excel file
|
|
1177
|
+
# @param _class [String] Unique identifier of the class
|
|
1178
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1179
|
+
# @param [Hash] opts the optional parameters
|
|
1180
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
1181
|
+
def export_submissions_reviews_as_excel_with_http_info(_class, assignment, opts = {})
|
|
1182
|
+
if @api_client.config.debugging
|
|
1183
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.export_submissions_reviews_as_excel ...'
|
|
1184
|
+
end
|
|
1185
|
+
# verify the required parameter '_class' is set
|
|
1186
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1187
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.export_submissions_reviews_as_excel"
|
|
1188
|
+
end
|
|
1189
|
+
# verify the required parameter 'assignment' is set
|
|
1190
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1191
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.export_submissions_reviews_as_excel"
|
|
1192
|
+
end
|
|
1193
|
+
# resource path
|
|
1194
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/excel'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
1195
|
+
|
|
1196
|
+
# query parameters
|
|
1197
|
+
query_params = opts[:query_params] || {}
|
|
1198
|
+
|
|
1199
|
+
# header parameters
|
|
1200
|
+
header_params = opts[:header_params] || {}
|
|
1201
|
+
# HTTP header 'Accept' (if needed)
|
|
1202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']) unless header_params['Accept']
|
|
1203
|
+
|
|
1204
|
+
# form parameters
|
|
1205
|
+
form_params = opts[:form_params] || {}
|
|
1206
|
+
|
|
1207
|
+
# http body (model)
|
|
1208
|
+
post_body = opts[:debug_body]
|
|
1209
|
+
|
|
1210
|
+
# return_type
|
|
1211
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
1212
|
+
|
|
1213
|
+
# auth_names
|
|
1214
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1215
|
+
|
|
1216
|
+
new_options = opts.merge(
|
|
1217
|
+
:operation => :"ClassApi.export_submissions_reviews_as_excel",
|
|
1218
|
+
:header_params => header_params,
|
|
1219
|
+
:query_params => query_params,
|
|
1220
|
+
:form_params => form_params,
|
|
1221
|
+
:body => post_body,
|
|
1222
|
+
:auth_names => auth_names,
|
|
1223
|
+
:return_type => return_type
|
|
1224
|
+
)
|
|
1225
|
+
|
|
1226
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1227
|
+
if @api_client.config.debugging
|
|
1228
|
+
@api_client.config.logger.debug "API called: ClassApi#export_submissions_reviews_as_excel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1229
|
+
end
|
|
1230
|
+
return data, status_code, headers
|
|
1231
|
+
end
|
|
1232
|
+
|
|
1233
|
+
# Get an assignment
|
|
1234
|
+
# Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them.
|
|
1235
|
+
# @param _class [String] Unique identifier of the class
|
|
1236
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1237
|
+
# @param [Hash] opts the optional parameters
|
|
1238
|
+
# @return [Assignment]
|
|
1239
|
+
def get_assignment(_class, assignment, opts = {})
|
|
1240
|
+
data, _status_code, _headers = get_assignment_with_http_info(_class, assignment, opts)
|
|
1241
|
+
data
|
|
1242
|
+
end
|
|
1243
|
+
|
|
1244
|
+
# Get an assignment
|
|
1245
|
+
# Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them.
|
|
1246
|
+
# @param _class [String] Unique identifier of the class
|
|
1247
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1248
|
+
# @param [Hash] opts the optional parameters
|
|
1249
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
|
1250
|
+
def get_assignment_with_http_info(_class, assignment, opts = {})
|
|
1251
|
+
if @api_client.config.debugging
|
|
1252
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_assignment ...'
|
|
1253
|
+
end
|
|
1254
|
+
# verify the required parameter '_class' is set
|
|
1255
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1256
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_assignment"
|
|
1257
|
+
end
|
|
1258
|
+
# verify the required parameter 'assignment' is set
|
|
1259
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1260
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_assignment"
|
|
1261
|
+
end
|
|
1262
|
+
# resource path
|
|
1263
|
+
local_var_path = '/classes/{class}/assignments/{assignment}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
1264
|
+
|
|
1265
|
+
# query parameters
|
|
1266
|
+
query_params = opts[:query_params] || {}
|
|
1267
|
+
|
|
1268
|
+
# header parameters
|
|
1269
|
+
header_params = opts[:header_params] || {}
|
|
1270
|
+
# HTTP header 'Accept' (if needed)
|
|
1271
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1272
|
+
|
|
1273
|
+
# form parameters
|
|
1274
|
+
form_params = opts[:form_params] || {}
|
|
1275
|
+
|
|
1276
|
+
# http body (model)
|
|
1277
|
+
post_body = opts[:debug_body]
|
|
1278
|
+
|
|
1279
|
+
# return_type
|
|
1280
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
|
1281
|
+
|
|
1282
|
+
# auth_names
|
|
1283
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1284
|
+
|
|
1285
|
+
new_options = opts.merge(
|
|
1286
|
+
:operation => :"ClassApi.get_assignment",
|
|
1287
|
+
:header_params => header_params,
|
|
1288
|
+
:query_params => query_params,
|
|
1289
|
+
:form_params => form_params,
|
|
1290
|
+
:body => post_body,
|
|
1291
|
+
:auth_names => auth_names,
|
|
1292
|
+
:return_type => return_type
|
|
1293
|
+
)
|
|
1294
|
+
|
|
1295
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1296
|
+
if @api_client.config.debugging
|
|
1297
|
+
@api_client.config.logger.debug "API called: ClassApi#get_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1298
|
+
end
|
|
1299
|
+
return data, status_code, headers
|
|
1300
|
+
end
|
|
1301
|
+
|
|
1302
|
+
# Get the details of a single class
|
|
1303
|
+
# @param _class [String] Unique identifier of the class
|
|
1304
|
+
# @param [Hash] opts the optional parameters
|
|
1305
|
+
# @return [ClassDetails]
|
|
1306
|
+
def get_class(_class, opts = {})
|
|
1307
|
+
data, _status_code, _headers = get_class_with_http_info(_class, opts)
|
|
1308
|
+
data
|
|
1309
|
+
end
|
|
1310
|
+
|
|
1311
|
+
# Get the details of a single class
|
|
1312
|
+
# @param _class [String] Unique identifier of the class
|
|
1313
|
+
# @param [Hash] opts the optional parameters
|
|
1314
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
1315
|
+
def get_class_with_http_info(_class, opts = {})
|
|
1316
|
+
if @api_client.config.debugging
|
|
1317
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_class ...'
|
|
1318
|
+
end
|
|
1319
|
+
# verify the required parameter '_class' is set
|
|
1320
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1321
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_class"
|
|
1322
|
+
end
|
|
1323
|
+
# resource path
|
|
1324
|
+
local_var_path = '/classes/{class}'.sub('{class}', CGI.escape(_class.to_s))
|
|
1325
|
+
|
|
1326
|
+
# query parameters
|
|
1327
|
+
query_params = opts[:query_params] || {}
|
|
1328
|
+
|
|
1329
|
+
# header parameters
|
|
1330
|
+
header_params = opts[:header_params] || {}
|
|
1331
|
+
# HTTP header 'Accept' (if needed)
|
|
1332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1333
|
+
|
|
1334
|
+
# form parameters
|
|
1335
|
+
form_params = opts[:form_params] || {}
|
|
1336
|
+
|
|
1337
|
+
# http body (model)
|
|
1338
|
+
post_body = opts[:debug_body]
|
|
1339
|
+
|
|
1340
|
+
# return_type
|
|
1341
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
1342
|
+
|
|
1343
|
+
# auth_names
|
|
1344
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1345
|
+
|
|
1346
|
+
new_options = opts.merge(
|
|
1347
|
+
:operation => :"ClassApi.get_class",
|
|
1348
|
+
:header_params => header_params,
|
|
1349
|
+
:query_params => query_params,
|
|
1350
|
+
:form_params => form_params,
|
|
1351
|
+
:body => post_body,
|
|
1352
|
+
:auth_names => auth_names,
|
|
1353
|
+
:return_type => return_type
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1357
|
+
if @api_client.config.debugging
|
|
1358
|
+
@api_client.config.logger.debug "API called: ClassApi#get_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1359
|
+
end
|
|
1360
|
+
return data, status_code, headers
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
# List submissions related to the score
|
|
1364
|
+
# 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.
|
|
1365
|
+
# @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
|
1366
|
+
# @param [Hash] opts the optional parameters
|
|
1367
|
+
# @return [Array<AssignmentSubmission>]
|
|
1368
|
+
def get_score_submissions(score, opts = {})
|
|
1369
|
+
data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
|
|
1370
|
+
data
|
|
1371
|
+
end
|
|
1372
|
+
|
|
1373
|
+
# List submissions related to the score
|
|
1374
|
+
# 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.
|
|
1375
|
+
# @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
|
|
1376
|
+
# @param [Hash] opts the optional parameters
|
|
1377
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
|
1378
|
+
def get_score_submissions_with_http_info(score, opts = {})
|
|
1379
|
+
if @api_client.config.debugging
|
|
1380
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_score_submissions ...'
|
|
1381
|
+
end
|
|
1382
|
+
# verify the required parameter 'score' is set
|
|
1383
|
+
if @api_client.config.client_side_validation && score.nil?
|
|
1384
|
+
fail ArgumentError, "Missing the required parameter 'score' when calling ClassApi.get_score_submissions"
|
|
1385
|
+
end
|
|
1386
|
+
# resource path
|
|
1387
|
+
local_var_path = '/scores/{score}/submissions'.sub('{score}', CGI.escape(score.to_s))
|
|
1388
|
+
|
|
1389
|
+
# query parameters
|
|
1390
|
+
query_params = opts[:query_params] || {}
|
|
1391
|
+
|
|
1392
|
+
# header parameters
|
|
1393
|
+
header_params = opts[:header_params] || {}
|
|
1394
|
+
# HTTP header 'Accept' (if needed)
|
|
1395
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1396
|
+
|
|
1397
|
+
# form parameters
|
|
1398
|
+
form_params = opts[:form_params] || {}
|
|
1399
|
+
|
|
1400
|
+
# http body (model)
|
|
1401
|
+
post_body = opts[:debug_body]
|
|
1402
|
+
|
|
1403
|
+
# return_type
|
|
1404
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
|
1405
|
+
|
|
1406
|
+
# auth_names
|
|
1407
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1408
|
+
|
|
1409
|
+
new_options = opts.merge(
|
|
1410
|
+
:operation => :"ClassApi.get_score_submissions",
|
|
1411
|
+
:header_params => header_params,
|
|
1412
|
+
:query_params => query_params,
|
|
1413
|
+
:form_params => form_params,
|
|
1414
|
+
:body => post_body,
|
|
1415
|
+
:auth_names => auth_names,
|
|
1416
|
+
:return_type => return_type
|
|
1417
|
+
)
|
|
1418
|
+
|
|
1419
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1420
|
+
if @api_client.config.debugging
|
|
1421
|
+
@api_client.config.logger.debug "API called: ClassApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1422
|
+
end
|
|
1423
|
+
return data, status_code, headers
|
|
1424
|
+
end
|
|
1425
|
+
|
|
1426
|
+
# Get a student submission
|
|
1427
|
+
# @param _class [String] Unique identifier of the class
|
|
1428
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1429
|
+
# @param submission [String] Unique identifier of the submission
|
|
1430
|
+
# @param [Hash] opts the optional parameters
|
|
1431
|
+
# @return [AssignmentSubmission]
|
|
1432
|
+
def get_submission(_class, assignment, submission, opts = {})
|
|
1433
|
+
data, _status_code, _headers = get_submission_with_http_info(_class, assignment, submission, opts)
|
|
1434
|
+
data
|
|
1435
|
+
end
|
|
1436
|
+
|
|
1437
|
+
# Get a student submission
|
|
1438
|
+
# @param _class [String] Unique identifier of the class
|
|
1439
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1440
|
+
# @param submission [String] Unique identifier of the submission
|
|
1441
|
+
# @param [Hash] opts the optional parameters
|
|
1442
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
|
1443
|
+
def get_submission_with_http_info(_class, assignment, submission, opts = {})
|
|
1444
|
+
if @api_client.config.debugging
|
|
1445
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission ...'
|
|
1446
|
+
end
|
|
1447
|
+
# verify the required parameter '_class' is set
|
|
1448
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1449
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission"
|
|
1450
|
+
end
|
|
1451
|
+
# verify the required parameter 'assignment' is set
|
|
1452
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1453
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission"
|
|
1454
|
+
end
|
|
1455
|
+
# verify the required parameter 'submission' is set
|
|
1456
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
1457
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission"
|
|
1458
|
+
end
|
|
1459
|
+
# resource path
|
|
1460
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
1461
|
+
|
|
1462
|
+
# query parameters
|
|
1463
|
+
query_params = opts[:query_params] || {}
|
|
1464
|
+
|
|
1465
|
+
# header parameters
|
|
1466
|
+
header_params = opts[:header_params] || {}
|
|
1467
|
+
# HTTP header 'Accept' (if needed)
|
|
1468
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1469
|
+
|
|
1470
|
+
# form parameters
|
|
1471
|
+
form_params = opts[:form_params] || {}
|
|
1472
|
+
|
|
1473
|
+
# http body (model)
|
|
1474
|
+
post_body = opts[:debug_body]
|
|
1475
|
+
|
|
1476
|
+
# return_type
|
|
1477
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
|
1478
|
+
|
|
1479
|
+
# auth_names
|
|
1480
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1481
|
+
|
|
1482
|
+
new_options = opts.merge(
|
|
1483
|
+
:operation => :"ClassApi.get_submission",
|
|
1484
|
+
:header_params => header_params,
|
|
1485
|
+
:query_params => query_params,
|
|
1486
|
+
:form_params => form_params,
|
|
1487
|
+
:body => post_body,
|
|
1488
|
+
:auth_names => auth_names,
|
|
1489
|
+
:return_type => return_type
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1493
|
+
if @api_client.config.debugging
|
|
1494
|
+
@api_client.config.logger.debug "API called: ClassApi#get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1495
|
+
end
|
|
1496
|
+
return data, status_code, headers
|
|
1497
|
+
end
|
|
1498
|
+
|
|
1499
|
+
# List the feedback comments of a submission
|
|
1500
|
+
# @param _class [String] Unique identifier of the class
|
|
1501
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1502
|
+
# @param submission [String] Unique identifier of the submission
|
|
1503
|
+
# @param [Hash] opts the optional parameters
|
|
1504
|
+
# @return [Array<AssignmentSubmissionComment>]
|
|
1505
|
+
def get_submission_comments(_class, assignment, submission, opts = {})
|
|
1506
|
+
data, _status_code, _headers = get_submission_comments_with_http_info(_class, assignment, submission, opts)
|
|
1507
|
+
data
|
|
1508
|
+
end
|
|
1509
|
+
|
|
1510
|
+
# List the feedback comments of a submission
|
|
1511
|
+
# @param _class [String] Unique identifier of the class
|
|
1512
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1513
|
+
# @param submission [String] Unique identifier of the submission
|
|
1514
|
+
# @param [Hash] opts the optional parameters
|
|
1515
|
+
# @return [Array<(Array<AssignmentSubmissionComment>, Integer, Hash)>] Array<AssignmentSubmissionComment> data, response status code and response headers
|
|
1516
|
+
def get_submission_comments_with_http_info(_class, assignment, submission, opts = {})
|
|
1517
|
+
if @api_client.config.debugging
|
|
1518
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission_comments ...'
|
|
1519
|
+
end
|
|
1520
|
+
# verify the required parameter '_class' is set
|
|
1521
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1522
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission_comments"
|
|
1523
|
+
end
|
|
1524
|
+
# verify the required parameter 'assignment' is set
|
|
1525
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1526
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission_comments"
|
|
1527
|
+
end
|
|
1528
|
+
# verify the required parameter 'submission' is set
|
|
1529
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
1530
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission_comments"
|
|
1531
|
+
end
|
|
1532
|
+
# resource path
|
|
1533
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
1534
|
+
|
|
1535
|
+
# query parameters
|
|
1536
|
+
query_params = opts[:query_params] || {}
|
|
1537
|
+
|
|
1538
|
+
# header parameters
|
|
1539
|
+
header_params = opts[:header_params] || {}
|
|
1540
|
+
# HTTP header 'Accept' (if needed)
|
|
1541
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1542
|
+
|
|
1543
|
+
# form parameters
|
|
1544
|
+
form_params = opts[:form_params] || {}
|
|
1545
|
+
|
|
1546
|
+
# http body (model)
|
|
1547
|
+
post_body = opts[:debug_body]
|
|
1548
|
+
|
|
1549
|
+
# return_type
|
|
1550
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmissionComment>'
|
|
1551
|
+
|
|
1552
|
+
# auth_names
|
|
1553
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1554
|
+
|
|
1555
|
+
new_options = opts.merge(
|
|
1556
|
+
:operation => :"ClassApi.get_submission_comments",
|
|
1557
|
+
:header_params => header_params,
|
|
1558
|
+
:query_params => query_params,
|
|
1559
|
+
:form_params => form_params,
|
|
1560
|
+
:body => post_body,
|
|
1561
|
+
:auth_names => auth_names,
|
|
1562
|
+
:return_type => return_type
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1566
|
+
if @api_client.config.debugging
|
|
1567
|
+
@api_client.config.logger.debug "API called: ClassApi#get_submission_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1568
|
+
end
|
|
1569
|
+
return data, status_code, headers
|
|
1570
|
+
end
|
|
1571
|
+
|
|
1572
|
+
# Get the history of the submission
|
|
1573
|
+
# For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.
|
|
1574
|
+
# @param _class [String] Unique identifier of the class
|
|
1575
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1576
|
+
# @param submission [String] Unique identifier of the submission
|
|
1577
|
+
# @param [Hash] opts the optional parameters
|
|
1578
|
+
# @return [Array<AssignmentSubmissionHistory>]
|
|
1579
|
+
def get_submission_history(_class, assignment, submission, opts = {})
|
|
1580
|
+
data, _status_code, _headers = get_submission_history_with_http_info(_class, assignment, submission, opts)
|
|
1581
|
+
data
|
|
1582
|
+
end
|
|
1583
|
+
|
|
1584
|
+
# Get the history of the submission
|
|
1585
|
+
# For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.
|
|
1586
|
+
# @param _class [String] Unique identifier of the class
|
|
1587
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1588
|
+
# @param submission [String] Unique identifier of the submission
|
|
1589
|
+
# @param [Hash] opts the optional parameters
|
|
1590
|
+
# @return [Array<(Array<AssignmentSubmissionHistory>, Integer, Hash)>] Array<AssignmentSubmissionHistory> data, response status code and response headers
|
|
1591
|
+
def get_submission_history_with_http_info(_class, assignment, submission, opts = {})
|
|
1592
|
+
if @api_client.config.debugging
|
|
1593
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission_history ...'
|
|
1594
|
+
end
|
|
1595
|
+
# verify the required parameter '_class' is set
|
|
1596
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1597
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission_history"
|
|
1598
|
+
end
|
|
1599
|
+
# verify the required parameter 'assignment' is set
|
|
1600
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1601
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission_history"
|
|
1602
|
+
end
|
|
1603
|
+
# verify the required parameter 'submission' is set
|
|
1604
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
1605
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission_history"
|
|
1606
|
+
end
|
|
1607
|
+
# resource path
|
|
1608
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}/history'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
1609
|
+
|
|
1610
|
+
# query parameters
|
|
1611
|
+
query_params = opts[:query_params] || {}
|
|
1612
|
+
|
|
1613
|
+
# header parameters
|
|
1614
|
+
header_params = opts[:header_params] || {}
|
|
1615
|
+
# HTTP header 'Accept' (if needed)
|
|
1616
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1617
|
+
|
|
1618
|
+
# form parameters
|
|
1619
|
+
form_params = opts[:form_params] || {}
|
|
1620
|
+
|
|
1621
|
+
# http body (model)
|
|
1622
|
+
post_body = opts[:debug_body]
|
|
1623
|
+
|
|
1624
|
+
# return_type
|
|
1625
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmissionHistory>'
|
|
1626
|
+
|
|
1627
|
+
# auth_names
|
|
1628
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1629
|
+
|
|
1630
|
+
new_options = opts.merge(
|
|
1631
|
+
:operation => :"ClassApi.get_submission_history",
|
|
1632
|
+
:header_params => header_params,
|
|
1633
|
+
:query_params => query_params,
|
|
1634
|
+
:form_params => form_params,
|
|
1635
|
+
:body => post_body,
|
|
1636
|
+
:auth_names => auth_names,
|
|
1637
|
+
:return_type => return_type
|
|
1638
|
+
)
|
|
1639
|
+
|
|
1640
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1641
|
+
if @api_client.config.debugging
|
|
1642
|
+
@api_client.config.logger.debug "API called: ClassApi#get_submission_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1643
|
+
end
|
|
1644
|
+
return data, status_code, headers
|
|
1645
|
+
end
|
|
1646
|
+
|
|
1647
|
+
# List the students' submissions
|
|
1648
|
+
# @param _class [String] Unique identifier of the class
|
|
1649
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1650
|
+
# @param [Hash] opts the optional parameters
|
|
809
1651
|
# @return [Array<AssignmentSubmission>]
|
|
810
1652
|
def get_submissions(_class, assignment, opts = {})
|
|
811
1653
|
data, _status_code, _headers = get_submissions_with_http_info(_class, assignment, opts)
|
|
812
|
-
|
|
1654
|
+
data
|
|
813
1655
|
end
|
|
814
1656
|
|
|
815
1657
|
# List the students' submissions
|
|
816
|
-
#
|
|
817
|
-
# @param
|
|
818
|
-
# @param assignment Unique identifier of the assignment
|
|
1658
|
+
# @param _class [String] Unique identifier of the class
|
|
1659
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
819
1660
|
# @param [Hash] opts the optional parameters
|
|
820
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
|
1661
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
|
821
1662
|
def get_submissions_with_http_info(_class, assignment, opts = {})
|
|
822
1663
|
if @api_client.config.debugging
|
|
823
|
-
@api_client.config.logger.debug
|
|
1664
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submissions ...'
|
|
824
1665
|
end
|
|
825
1666
|
# verify the required parameter '_class' is set
|
|
826
1667
|
if @api_client.config.client_side_validation && _class.nil?
|
|
@@ -831,31 +1672,39 @@ module FlatApi
|
|
|
831
1672
|
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submissions"
|
|
832
1673
|
end
|
|
833
1674
|
# resource path
|
|
834
|
-
local_var_path =
|
|
1675
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
835
1676
|
|
|
836
1677
|
# query parameters
|
|
837
|
-
query_params = {}
|
|
1678
|
+
query_params = opts[:query_params] || {}
|
|
838
1679
|
|
|
839
1680
|
# header parameters
|
|
840
|
-
header_params = {}
|
|
1681
|
+
header_params = opts[:header_params] || {}
|
|
841
1682
|
# HTTP header 'Accept' (if needed)
|
|
842
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
843
|
-
# HTTP header 'Content-Type'
|
|
844
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1683
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
845
1684
|
|
|
846
1685
|
# form parameters
|
|
847
|
-
form_params = {}
|
|
1686
|
+
form_params = opts[:form_params] || {}
|
|
848
1687
|
|
|
849
1688
|
# http body (model)
|
|
850
|
-
post_body =
|
|
851
|
-
|
|
852
|
-
|
|
1689
|
+
post_body = opts[:debug_body]
|
|
1690
|
+
|
|
1691
|
+
# return_type
|
|
1692
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
|
1693
|
+
|
|
1694
|
+
# auth_names
|
|
1695
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1696
|
+
|
|
1697
|
+
new_options = opts.merge(
|
|
1698
|
+
:operation => :"ClassApi.get_submissions",
|
|
853
1699
|
:header_params => header_params,
|
|
854
1700
|
:query_params => query_params,
|
|
855
1701
|
:form_params => form_params,
|
|
856
1702
|
:body => post_body,
|
|
857
1703
|
:auth_names => auth_names,
|
|
858
|
-
:return_type =>
|
|
1704
|
+
:return_type => return_type
|
|
1705
|
+
)
|
|
1706
|
+
|
|
1707
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
859
1708
|
if @api_client.config.debugging
|
|
860
1709
|
@api_client.config.logger.debug "API called: ClassApi#get_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
861
1710
|
end
|
|
@@ -863,54 +1712,60 @@ module FlatApi
|
|
|
863
1712
|
end
|
|
864
1713
|
|
|
865
1714
|
# Assignments listing
|
|
866
|
-
#
|
|
867
|
-
# @param _class Unique identifier of the class
|
|
1715
|
+
# @param _class [String] Unique identifier of the class
|
|
868
1716
|
# @param [Hash] opts the optional parameters
|
|
869
|
-
# @return [Array<
|
|
1717
|
+
# @return [Array<ClassAssignment>]
|
|
870
1718
|
def list_assignments(_class, opts = {})
|
|
871
1719
|
data, _status_code, _headers = list_assignments_with_http_info(_class, opts)
|
|
872
|
-
|
|
1720
|
+
data
|
|
873
1721
|
end
|
|
874
1722
|
|
|
875
1723
|
# Assignments listing
|
|
876
|
-
#
|
|
877
|
-
# @param _class Unique identifier of the class
|
|
1724
|
+
# @param _class [String] Unique identifier of the class
|
|
878
1725
|
# @param [Hash] opts the optional parameters
|
|
879
|
-
# @return [Array<(Array<
|
|
1726
|
+
# @return [Array<(Array<ClassAssignment>, Integer, Hash)>] Array<ClassAssignment> data, response status code and response headers
|
|
880
1727
|
def list_assignments_with_http_info(_class, opts = {})
|
|
881
1728
|
if @api_client.config.debugging
|
|
882
|
-
@api_client.config.logger.debug
|
|
1729
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_assignments ...'
|
|
883
1730
|
end
|
|
884
1731
|
# verify the required parameter '_class' is set
|
|
885
1732
|
if @api_client.config.client_side_validation && _class.nil?
|
|
886
1733
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_assignments"
|
|
887
1734
|
end
|
|
888
1735
|
# resource path
|
|
889
|
-
local_var_path =
|
|
1736
|
+
local_var_path = '/classes/{class}/assignments'.sub('{class}', CGI.escape(_class.to_s))
|
|
890
1737
|
|
|
891
1738
|
# query parameters
|
|
892
|
-
query_params = {}
|
|
1739
|
+
query_params = opts[:query_params] || {}
|
|
893
1740
|
|
|
894
1741
|
# header parameters
|
|
895
|
-
header_params = {}
|
|
1742
|
+
header_params = opts[:header_params] || {}
|
|
896
1743
|
# HTTP header 'Accept' (if needed)
|
|
897
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
898
|
-
# HTTP header 'Content-Type'
|
|
899
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1744
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
900
1745
|
|
|
901
1746
|
# form parameters
|
|
902
|
-
form_params = {}
|
|
1747
|
+
form_params = opts[:form_params] || {}
|
|
903
1748
|
|
|
904
1749
|
# http body (model)
|
|
905
|
-
post_body =
|
|
906
|
-
|
|
907
|
-
|
|
1750
|
+
post_body = opts[:debug_body]
|
|
1751
|
+
|
|
1752
|
+
# return_type
|
|
1753
|
+
return_type = opts[:debug_return_type] || 'Array<ClassAssignment>'
|
|
1754
|
+
|
|
1755
|
+
# auth_names
|
|
1756
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1757
|
+
|
|
1758
|
+
new_options = opts.merge(
|
|
1759
|
+
:operation => :"ClassApi.list_assignments",
|
|
908
1760
|
:header_params => header_params,
|
|
909
1761
|
:query_params => query_params,
|
|
910
1762
|
:form_params => form_params,
|
|
911
1763
|
:body => post_body,
|
|
912
1764
|
:auth_names => auth_names,
|
|
913
|
-
:return_type =>
|
|
1765
|
+
:return_type => return_type
|
|
1766
|
+
)
|
|
1767
|
+
|
|
1768
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
914
1769
|
if @api_client.config.debugging
|
|
915
1770
|
@api_client.config.logger.debug "API called: ClassApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
916
1771
|
end
|
|
@@ -919,24 +1774,24 @@ module FlatApi
|
|
|
919
1774
|
|
|
920
1775
|
# List the submissions for a student
|
|
921
1776
|
# Use this method as a teacher to list all the assignment submissions sent by a student of the class
|
|
922
|
-
# @param _class Unique identifier of the class
|
|
923
|
-
# @param user Unique identifier of the user
|
|
1777
|
+
# @param _class [String] Unique identifier of the class
|
|
1778
|
+
# @param user [String] Unique identifier of the user
|
|
924
1779
|
# @param [Hash] opts the optional parameters
|
|
925
1780
|
# @return [Array<AssignmentSubmission>]
|
|
926
1781
|
def list_class_student_submissions(_class, user, opts = {})
|
|
927
1782
|
data, _status_code, _headers = list_class_student_submissions_with_http_info(_class, user, opts)
|
|
928
|
-
|
|
1783
|
+
data
|
|
929
1784
|
end
|
|
930
1785
|
|
|
931
1786
|
# List the submissions for a student
|
|
932
1787
|
# Use this method as a teacher to list all the assignment submissions sent by a student of the class
|
|
933
|
-
# @param _class Unique identifier of the class
|
|
934
|
-
# @param user Unique identifier of the user
|
|
1788
|
+
# @param _class [String] Unique identifier of the class
|
|
1789
|
+
# @param user [String] Unique identifier of the user
|
|
935
1790
|
# @param [Hash] opts the optional parameters
|
|
936
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
|
1791
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
|
937
1792
|
def list_class_student_submissions_with_http_info(_class, user, opts = {})
|
|
938
1793
|
if @api_client.config.debugging
|
|
939
|
-
@api_client.config.logger.debug
|
|
1794
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_class_student_submissions ...'
|
|
940
1795
|
end
|
|
941
1796
|
# verify the required parameter '_class' is set
|
|
942
1797
|
if @api_client.config.client_side_validation && _class.nil?
|
|
@@ -947,31 +1802,39 @@ module FlatApi
|
|
|
947
1802
|
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.list_class_student_submissions"
|
|
948
1803
|
end
|
|
949
1804
|
# resource path
|
|
950
|
-
local_var_path =
|
|
1805
|
+
local_var_path = '/classes/{class}/students/{user}/submissions'.sub('{class}', CGI.escape(_class.to_s)).sub('{user}', CGI.escape(user.to_s))
|
|
951
1806
|
|
|
952
1807
|
# query parameters
|
|
953
|
-
query_params = {}
|
|
1808
|
+
query_params = opts[:query_params] || {}
|
|
954
1809
|
|
|
955
1810
|
# header parameters
|
|
956
|
-
header_params = {}
|
|
1811
|
+
header_params = opts[:header_params] || {}
|
|
957
1812
|
# HTTP header 'Accept' (if needed)
|
|
958
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
959
|
-
# HTTP header 'Content-Type'
|
|
960
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1813
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
961
1814
|
|
|
962
1815
|
# form parameters
|
|
963
|
-
form_params = {}
|
|
1816
|
+
form_params = opts[:form_params] || {}
|
|
964
1817
|
|
|
965
1818
|
# http body (model)
|
|
966
|
-
post_body =
|
|
967
|
-
|
|
968
|
-
|
|
1819
|
+
post_body = opts[:debug_body]
|
|
1820
|
+
|
|
1821
|
+
# return_type
|
|
1822
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
|
1823
|
+
|
|
1824
|
+
# auth_names
|
|
1825
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1826
|
+
|
|
1827
|
+
new_options = opts.merge(
|
|
1828
|
+
:operation => :"ClassApi.list_class_student_submissions",
|
|
969
1829
|
:header_params => header_params,
|
|
970
1830
|
:query_params => query_params,
|
|
971
1831
|
:form_params => form_params,
|
|
972
1832
|
:body => post_body,
|
|
973
1833
|
:auth_names => auth_names,
|
|
974
|
-
:return_type =>
|
|
1834
|
+
:return_type => return_type
|
|
1835
|
+
)
|
|
1836
|
+
|
|
1837
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
975
1838
|
if @api_client.config.debugging
|
|
976
1839
|
@api_client.config.logger.debug "API called: ClassApi#list_class_student_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
977
1840
|
end
|
|
@@ -979,109 +1842,277 @@ module FlatApi
|
|
|
979
1842
|
end
|
|
980
1843
|
|
|
981
1844
|
# List the classes available for the current user
|
|
982
|
-
#
|
|
983
1845
|
# @param [Hash] opts the optional parameters
|
|
984
|
-
# @option opts [String] :state Filter the classes by state (default to active)
|
|
1846
|
+
# @option opts [String] :state Filter the classes by state (default to 'active')
|
|
985
1847
|
# @return [Array<ClassDetails>]
|
|
986
1848
|
def list_classes(opts = {})
|
|
987
1849
|
data, _status_code, _headers = list_classes_with_http_info(opts)
|
|
988
|
-
|
|
1850
|
+
data
|
|
989
1851
|
end
|
|
990
1852
|
|
|
991
1853
|
# List the classes available for the current user
|
|
992
|
-
#
|
|
993
1854
|
# @param [Hash] opts the optional parameters
|
|
994
|
-
# @option opts [String] :state Filter the classes by state
|
|
995
|
-
# @return [Array<(Array<ClassDetails>,
|
|
1855
|
+
# @option opts [String] :state Filter the classes by state (default to 'active')
|
|
1856
|
+
# @return [Array<(Array<ClassDetails>, Integer, Hash)>] Array<ClassDetails> data, response status code and response headers
|
|
996
1857
|
def list_classes_with_http_info(opts = {})
|
|
997
1858
|
if @api_client.config.debugging
|
|
998
|
-
@api_client.config.logger.debug
|
|
1859
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_classes ...'
|
|
999
1860
|
end
|
|
1000
|
-
|
|
1001
|
-
|
|
1861
|
+
allowable_values = ["active", "inactive", "archived"]
|
|
1862
|
+
if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
|
|
1863
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
|
|
1002
1864
|
end
|
|
1003
1865
|
# resource path
|
|
1004
|
-
local_var_path =
|
|
1866
|
+
local_var_path = '/classes'
|
|
1005
1867
|
|
|
1006
1868
|
# query parameters
|
|
1007
|
-
query_params = {}
|
|
1869
|
+
query_params = opts[:query_params] || {}
|
|
1008
1870
|
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
|
1009
1871
|
|
|
1010
1872
|
# header parameters
|
|
1011
|
-
header_params = {}
|
|
1873
|
+
header_params = opts[:header_params] || {}
|
|
1012
1874
|
# HTTP header 'Accept' (if needed)
|
|
1013
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1014
|
-
# HTTP header 'Content-Type'
|
|
1015
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1875
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1016
1876
|
|
|
1017
1877
|
# form parameters
|
|
1018
|
-
form_params = {}
|
|
1878
|
+
form_params = opts[:form_params] || {}
|
|
1019
1879
|
|
|
1020
1880
|
# http body (model)
|
|
1021
|
-
post_body =
|
|
1022
|
-
|
|
1023
|
-
|
|
1881
|
+
post_body = opts[:debug_body]
|
|
1882
|
+
|
|
1883
|
+
# return_type
|
|
1884
|
+
return_type = opts[:debug_return_type] || 'Array<ClassDetails>'
|
|
1885
|
+
|
|
1886
|
+
# auth_names
|
|
1887
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1888
|
+
|
|
1889
|
+
new_options = opts.merge(
|
|
1890
|
+
:operation => :"ClassApi.list_classes",
|
|
1024
1891
|
:header_params => header_params,
|
|
1025
1892
|
:query_params => query_params,
|
|
1026
1893
|
:form_params => form_params,
|
|
1027
1894
|
:body => post_body,
|
|
1028
1895
|
:auth_names => auth_names,
|
|
1029
|
-
:return_type =>
|
|
1896
|
+
:return_type => return_type
|
|
1897
|
+
)
|
|
1898
|
+
|
|
1899
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1030
1900
|
if @api_client.config.debugging
|
|
1031
1901
|
@api_client.config.logger.debug "API called: ClassApi#list_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1032
1902
|
end
|
|
1033
1903
|
return data, status_code, headers
|
|
1034
1904
|
end
|
|
1035
1905
|
|
|
1906
|
+
# Add a feedback comment to a submission
|
|
1907
|
+
# @param _class [String] Unique identifier of the class
|
|
1908
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1909
|
+
# @param submission [String] Unique identifier of the submission
|
|
1910
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
|
1911
|
+
# @param [Hash] opts the optional parameters
|
|
1912
|
+
# @return [AssignmentSubmissionComment]
|
|
1913
|
+
def post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, opts = {})
|
|
1914
|
+
data, _status_code, _headers = post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, opts)
|
|
1915
|
+
data
|
|
1916
|
+
end
|
|
1917
|
+
|
|
1918
|
+
# Add a feedback comment to a submission
|
|
1919
|
+
# @param _class [String] Unique identifier of the class
|
|
1920
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1921
|
+
# @param submission [String] Unique identifier of the submission
|
|
1922
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
|
1923
|
+
# @param [Hash] opts the optional parameters
|
|
1924
|
+
# @return [Array<(AssignmentSubmissionComment, Integer, Hash)>] AssignmentSubmissionComment data, response status code and response headers
|
|
1925
|
+
def post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, opts = {})
|
|
1926
|
+
if @api_client.config.debugging
|
|
1927
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.post_submission_comment ...'
|
|
1928
|
+
end
|
|
1929
|
+
# verify the required parameter '_class' is set
|
|
1930
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
1931
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.post_submission_comment"
|
|
1932
|
+
end
|
|
1933
|
+
# verify the required parameter 'assignment' is set
|
|
1934
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
1935
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.post_submission_comment"
|
|
1936
|
+
end
|
|
1937
|
+
# verify the required parameter 'submission' is set
|
|
1938
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
1939
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.post_submission_comment"
|
|
1940
|
+
end
|
|
1941
|
+
# verify the required parameter 'assignment_submission_comment_creation' is set
|
|
1942
|
+
if @api_client.config.client_side_validation && assignment_submission_comment_creation.nil?
|
|
1943
|
+
fail ArgumentError, "Missing the required parameter 'assignment_submission_comment_creation' when calling ClassApi.post_submission_comment"
|
|
1944
|
+
end
|
|
1945
|
+
# resource path
|
|
1946
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s))
|
|
1947
|
+
|
|
1948
|
+
# query parameters
|
|
1949
|
+
query_params = opts[:query_params] || {}
|
|
1950
|
+
|
|
1951
|
+
# header parameters
|
|
1952
|
+
header_params = opts[:header_params] || {}
|
|
1953
|
+
# HTTP header 'Accept' (if needed)
|
|
1954
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1955
|
+
# HTTP header 'Content-Type'
|
|
1956
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1957
|
+
if !content_type.nil?
|
|
1958
|
+
header_params['Content-Type'] = content_type
|
|
1959
|
+
end
|
|
1960
|
+
|
|
1961
|
+
# form parameters
|
|
1962
|
+
form_params = opts[:form_params] || {}
|
|
1963
|
+
|
|
1964
|
+
# http body (model)
|
|
1965
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assignment_submission_comment_creation)
|
|
1966
|
+
|
|
1967
|
+
# return_type
|
|
1968
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmissionComment'
|
|
1969
|
+
|
|
1970
|
+
# auth_names
|
|
1971
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1972
|
+
|
|
1973
|
+
new_options = opts.merge(
|
|
1974
|
+
:operation => :"ClassApi.post_submission_comment",
|
|
1975
|
+
:header_params => header_params,
|
|
1976
|
+
:query_params => query_params,
|
|
1977
|
+
:form_params => form_params,
|
|
1978
|
+
:body => post_body,
|
|
1979
|
+
:auth_names => auth_names,
|
|
1980
|
+
:return_type => return_type
|
|
1981
|
+
)
|
|
1982
|
+
|
|
1983
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1984
|
+
if @api_client.config.debugging
|
|
1985
|
+
@api_client.config.logger.debug "API called: ClassApi#post_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1986
|
+
end
|
|
1987
|
+
return data, status_code, headers
|
|
1988
|
+
end
|
|
1989
|
+
|
|
1990
|
+
# Unarchive the assignment.
|
|
1991
|
+
# Mark the assignment as `active`.
|
|
1992
|
+
# @param _class [String] Unique identifier of the class
|
|
1993
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
1994
|
+
# @param [Hash] opts the optional parameters
|
|
1995
|
+
# @return [Assignment]
|
|
1996
|
+
def unarchive_assignment(_class, assignment, opts = {})
|
|
1997
|
+
data, _status_code, _headers = unarchive_assignment_with_http_info(_class, assignment, opts)
|
|
1998
|
+
data
|
|
1999
|
+
end
|
|
2000
|
+
|
|
2001
|
+
# Unarchive the assignment.
|
|
2002
|
+
# Mark the assignment as `active`.
|
|
2003
|
+
# @param _class [String] Unique identifier of the class
|
|
2004
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
2005
|
+
# @param [Hash] opts the optional parameters
|
|
2006
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
|
2007
|
+
def unarchive_assignment_with_http_info(_class, assignment, opts = {})
|
|
2008
|
+
if @api_client.config.debugging
|
|
2009
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.unarchive_assignment ...'
|
|
2010
|
+
end
|
|
2011
|
+
# verify the required parameter '_class' is set
|
|
2012
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
2013
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_assignment"
|
|
2014
|
+
end
|
|
2015
|
+
# verify the required parameter 'assignment' is set
|
|
2016
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
2017
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.unarchive_assignment"
|
|
2018
|
+
end
|
|
2019
|
+
# resource path
|
|
2020
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/archive'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
2021
|
+
|
|
2022
|
+
# query parameters
|
|
2023
|
+
query_params = opts[:query_params] || {}
|
|
2024
|
+
|
|
2025
|
+
# header parameters
|
|
2026
|
+
header_params = opts[:header_params] || {}
|
|
2027
|
+
# HTTP header 'Accept' (if needed)
|
|
2028
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2029
|
+
|
|
2030
|
+
# form parameters
|
|
2031
|
+
form_params = opts[:form_params] || {}
|
|
2032
|
+
|
|
2033
|
+
# http body (model)
|
|
2034
|
+
post_body = opts[:debug_body]
|
|
2035
|
+
|
|
2036
|
+
# return_type
|
|
2037
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
|
2038
|
+
|
|
2039
|
+
# auth_names
|
|
2040
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
2041
|
+
|
|
2042
|
+
new_options = opts.merge(
|
|
2043
|
+
:operation => :"ClassApi.unarchive_assignment",
|
|
2044
|
+
:header_params => header_params,
|
|
2045
|
+
:query_params => query_params,
|
|
2046
|
+
:form_params => form_params,
|
|
2047
|
+
:body => post_body,
|
|
2048
|
+
:auth_names => auth_names,
|
|
2049
|
+
:return_type => return_type
|
|
2050
|
+
)
|
|
2051
|
+
|
|
2052
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2053
|
+
if @api_client.config.debugging
|
|
2054
|
+
@api_client.config.logger.debug "API called: ClassApi#unarchive_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2055
|
+
end
|
|
2056
|
+
return data, status_code, headers
|
|
2057
|
+
end
|
|
2058
|
+
|
|
1036
2059
|
# Unarchive the class
|
|
1037
2060
|
# Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
|
|
1038
|
-
# @param _class Unique identifier of the class
|
|
2061
|
+
# @param _class [String] Unique identifier of the class
|
|
1039
2062
|
# @param [Hash] opts the optional parameters
|
|
1040
2063
|
# @return [ClassDetails]
|
|
1041
2064
|
def unarchive_class(_class, opts = {})
|
|
1042
2065
|
data, _status_code, _headers = unarchive_class_with_http_info(_class, opts)
|
|
1043
|
-
|
|
2066
|
+
data
|
|
1044
2067
|
end
|
|
1045
2068
|
|
|
1046
2069
|
# Unarchive the class
|
|
1047
2070
|
# Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated.
|
|
1048
|
-
# @param _class Unique identifier of the class
|
|
2071
|
+
# @param _class [String] Unique identifier of the class
|
|
1049
2072
|
# @param [Hash] opts the optional parameters
|
|
1050
|
-
# @return [Array<(ClassDetails,
|
|
2073
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
1051
2074
|
def unarchive_class_with_http_info(_class, opts = {})
|
|
1052
2075
|
if @api_client.config.debugging
|
|
1053
|
-
@api_client.config.logger.debug
|
|
2076
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.unarchive_class ...'
|
|
1054
2077
|
end
|
|
1055
2078
|
# verify the required parameter '_class' is set
|
|
1056
2079
|
if @api_client.config.client_side_validation && _class.nil?
|
|
1057
2080
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_class"
|
|
1058
2081
|
end
|
|
1059
2082
|
# resource path
|
|
1060
|
-
local_var_path =
|
|
2083
|
+
local_var_path = '/classes/{class}/archive'.sub('{class}', CGI.escape(_class.to_s))
|
|
1061
2084
|
|
|
1062
2085
|
# query parameters
|
|
1063
|
-
query_params = {}
|
|
2086
|
+
query_params = opts[:query_params] || {}
|
|
1064
2087
|
|
|
1065
2088
|
# header parameters
|
|
1066
|
-
header_params = {}
|
|
2089
|
+
header_params = opts[:header_params] || {}
|
|
1067
2090
|
# HTTP header 'Accept' (if needed)
|
|
1068
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1069
|
-
# HTTP header 'Content-Type'
|
|
1070
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
2091
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1071
2092
|
|
|
1072
2093
|
# form parameters
|
|
1073
|
-
form_params = {}
|
|
2094
|
+
form_params = opts[:form_params] || {}
|
|
1074
2095
|
|
|
1075
2096
|
# http body (model)
|
|
1076
|
-
post_body =
|
|
1077
|
-
|
|
1078
|
-
|
|
2097
|
+
post_body = opts[:debug_body]
|
|
2098
|
+
|
|
2099
|
+
# return_type
|
|
2100
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
2101
|
+
|
|
2102
|
+
# auth_names
|
|
2103
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
2104
|
+
|
|
2105
|
+
new_options = opts.merge(
|
|
2106
|
+
:operation => :"ClassApi.unarchive_class",
|
|
1079
2107
|
:header_params => header_params,
|
|
1080
2108
|
:query_params => query_params,
|
|
1081
2109
|
:form_params => form_params,
|
|
1082
2110
|
:body => post_body,
|
|
1083
2111
|
:auth_names => auth_names,
|
|
1084
|
-
:return_type =>
|
|
2112
|
+
:return_type => return_type
|
|
2113
|
+
)
|
|
2114
|
+
|
|
2115
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1085
2116
|
if @api_client.config.debugging
|
|
1086
2117
|
@api_client.config.logger.debug "API called: ClassApi#unarchive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1087
2118
|
end
|
|
@@ -1090,59 +2121,246 @@ module FlatApi
|
|
|
1090
2121
|
|
|
1091
2122
|
# Update the class
|
|
1092
2123
|
# Update the meta information of the class
|
|
1093
|
-
# @param _class Unique identifier of the class
|
|
2124
|
+
# @param _class [String] Unique identifier of the class
|
|
2125
|
+
# @param body [ClassUpdate] Details of the Class
|
|
1094
2126
|
# @param [Hash] opts the optional parameters
|
|
1095
|
-
# @option opts [ClassUpdate] :body Details of the Class
|
|
1096
2127
|
# @return [ClassDetails]
|
|
1097
|
-
def update_class(_class, opts = {})
|
|
1098
|
-
data, _status_code, _headers = update_class_with_http_info(_class, opts)
|
|
1099
|
-
|
|
2128
|
+
def update_class(_class, body, opts = {})
|
|
2129
|
+
data, _status_code, _headers = update_class_with_http_info(_class, body, opts)
|
|
2130
|
+
data
|
|
1100
2131
|
end
|
|
1101
2132
|
|
|
1102
2133
|
# Update the class
|
|
1103
2134
|
# Update the meta information of the class
|
|
1104
|
-
# @param _class Unique identifier of the class
|
|
2135
|
+
# @param _class [String] Unique identifier of the class
|
|
2136
|
+
# @param body [ClassUpdate] Details of the Class
|
|
1105
2137
|
# @param [Hash] opts the optional parameters
|
|
1106
|
-
# @
|
|
1107
|
-
|
|
1108
|
-
def update_class_with_http_info(_class, opts = {})
|
|
2138
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
|
2139
|
+
def update_class_with_http_info(_class, body, opts = {})
|
|
1109
2140
|
if @api_client.config.debugging
|
|
1110
|
-
@api_client.config.logger.debug
|
|
2141
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.update_class ...'
|
|
1111
2142
|
end
|
|
1112
2143
|
# verify the required parameter '_class' is set
|
|
1113
2144
|
if @api_client.config.client_side_validation && _class.nil?
|
|
1114
2145
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class"
|
|
1115
2146
|
end
|
|
2147
|
+
# verify the required parameter 'body' is set
|
|
2148
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2149
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.update_class"
|
|
2150
|
+
end
|
|
1116
2151
|
# resource path
|
|
1117
|
-
local_var_path =
|
|
2152
|
+
local_var_path = '/classes/{class}'.sub('{class}', CGI.escape(_class.to_s))
|
|
1118
2153
|
|
|
1119
2154
|
# query parameters
|
|
1120
|
-
query_params = {}
|
|
2155
|
+
query_params = opts[:query_params] || {}
|
|
1121
2156
|
|
|
1122
2157
|
# header parameters
|
|
1123
|
-
header_params = {}
|
|
2158
|
+
header_params = opts[:header_params] || {}
|
|
1124
2159
|
# HTTP header 'Accept' (if needed)
|
|
1125
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1126
2161
|
# HTTP header 'Content-Type'
|
|
1127
|
-
|
|
2162
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2163
|
+
if !content_type.nil?
|
|
2164
|
+
header_params['Content-Type'] = content_type
|
|
2165
|
+
end
|
|
1128
2166
|
|
|
1129
2167
|
# form parameters
|
|
1130
|
-
form_params = {}
|
|
2168
|
+
form_params = opts[:form_params] || {}
|
|
1131
2169
|
|
|
1132
2170
|
# http body (model)
|
|
1133
|
-
post_body = @api_client.object_to_http_body(
|
|
1134
|
-
|
|
1135
|
-
|
|
2171
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2172
|
+
|
|
2173
|
+
# return_type
|
|
2174
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
|
2175
|
+
|
|
2176
|
+
# auth_names
|
|
2177
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
2178
|
+
|
|
2179
|
+
new_options = opts.merge(
|
|
2180
|
+
:operation => :"ClassApi.update_class",
|
|
1136
2181
|
:header_params => header_params,
|
|
1137
2182
|
:query_params => query_params,
|
|
1138
2183
|
:form_params => form_params,
|
|
1139
2184
|
:body => post_body,
|
|
1140
2185
|
:auth_names => auth_names,
|
|
1141
|
-
:return_type =>
|
|
2186
|
+
:return_type => return_type
|
|
2187
|
+
)
|
|
2188
|
+
|
|
2189
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1142
2190
|
if @api_client.config.debugging
|
|
1143
2191
|
@api_client.config.logger.debug "API called: ClassApi#update_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1144
2192
|
end
|
|
1145
2193
|
return data, status_code, headers
|
|
1146
2194
|
end
|
|
2195
|
+
|
|
2196
|
+
# Update an assignment
|
|
2197
|
+
# Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`.
|
|
2198
|
+
# @param _class [String] Unique identifier of the class
|
|
2199
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
2200
|
+
# @param body [ClassAssignmentUpdate]
|
|
2201
|
+
# @param [Hash] opts the optional parameters
|
|
2202
|
+
# @return [Assignment]
|
|
2203
|
+
def update_class_assignment(_class, assignment, body, opts = {})
|
|
2204
|
+
data, _status_code, _headers = update_class_assignment_with_http_info(_class, assignment, body, opts)
|
|
2205
|
+
data
|
|
2206
|
+
end
|
|
2207
|
+
|
|
2208
|
+
# Update an assignment
|
|
2209
|
+
# Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`.
|
|
2210
|
+
# @param _class [String] Unique identifier of the class
|
|
2211
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
2212
|
+
# @param body [ClassAssignmentUpdate]
|
|
2213
|
+
# @param [Hash] opts the optional parameters
|
|
2214
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
|
2215
|
+
def update_class_assignment_with_http_info(_class, assignment, body, opts = {})
|
|
2216
|
+
if @api_client.config.debugging
|
|
2217
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.update_class_assignment ...'
|
|
2218
|
+
end
|
|
2219
|
+
# verify the required parameter '_class' is set
|
|
2220
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
2221
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class_assignment"
|
|
2222
|
+
end
|
|
2223
|
+
# verify the required parameter 'assignment' is set
|
|
2224
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
2225
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.update_class_assignment"
|
|
2226
|
+
end
|
|
2227
|
+
# verify the required parameter 'body' is set
|
|
2228
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2229
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.update_class_assignment"
|
|
2230
|
+
end
|
|
2231
|
+
# resource path
|
|
2232
|
+
local_var_path = '/classes/{class}/assignments/{assignment}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s))
|
|
2233
|
+
|
|
2234
|
+
# query parameters
|
|
2235
|
+
query_params = opts[:query_params] || {}
|
|
2236
|
+
|
|
2237
|
+
# header parameters
|
|
2238
|
+
header_params = opts[:header_params] || {}
|
|
2239
|
+
# HTTP header 'Accept' (if needed)
|
|
2240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2241
|
+
# HTTP header 'Content-Type'
|
|
2242
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2243
|
+
if !content_type.nil?
|
|
2244
|
+
header_params['Content-Type'] = content_type
|
|
2245
|
+
end
|
|
2246
|
+
|
|
2247
|
+
# form parameters
|
|
2248
|
+
form_params = opts[:form_params] || {}
|
|
2249
|
+
|
|
2250
|
+
# http body (model)
|
|
2251
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2252
|
+
|
|
2253
|
+
# return_type
|
|
2254
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
|
2255
|
+
|
|
2256
|
+
# auth_names
|
|
2257
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
2258
|
+
|
|
2259
|
+
new_options = opts.merge(
|
|
2260
|
+
:operation => :"ClassApi.update_class_assignment",
|
|
2261
|
+
:header_params => header_params,
|
|
2262
|
+
:query_params => query_params,
|
|
2263
|
+
:form_params => form_params,
|
|
2264
|
+
:body => post_body,
|
|
2265
|
+
:auth_names => auth_names,
|
|
2266
|
+
:return_type => return_type
|
|
2267
|
+
)
|
|
2268
|
+
|
|
2269
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2270
|
+
if @api_client.config.debugging
|
|
2271
|
+
@api_client.config.logger.debug "API called: ClassApi#update_class_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2272
|
+
end
|
|
2273
|
+
return data, status_code, headers
|
|
2274
|
+
end
|
|
2275
|
+
|
|
2276
|
+
# Update a feedback comment to a submission
|
|
2277
|
+
# @param _class [String] Unique identifier of the class
|
|
2278
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
2279
|
+
# @param submission [String] Unique identifier of the submission
|
|
2280
|
+
# @param comment [String] Unique identifier of the comment
|
|
2281
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
|
2282
|
+
# @param [Hash] opts the optional parameters
|
|
2283
|
+
# @return [AssignmentSubmissionComment]
|
|
2284
|
+
def update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, opts = {})
|
|
2285
|
+
data, _status_code, _headers = update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, opts)
|
|
2286
|
+
data
|
|
2287
|
+
end
|
|
2288
|
+
|
|
2289
|
+
# Update a feedback comment to a submission
|
|
2290
|
+
# @param _class [String] Unique identifier of the class
|
|
2291
|
+
# @param assignment [String] Unique identifier of the assignment
|
|
2292
|
+
# @param submission [String] Unique identifier of the submission
|
|
2293
|
+
# @param comment [String] Unique identifier of the comment
|
|
2294
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
|
2295
|
+
# @param [Hash] opts the optional parameters
|
|
2296
|
+
# @return [Array<(AssignmentSubmissionComment, Integer, Hash)>] AssignmentSubmissionComment data, response status code and response headers
|
|
2297
|
+
def update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, opts = {})
|
|
2298
|
+
if @api_client.config.debugging
|
|
2299
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.update_submission_comment ...'
|
|
2300
|
+
end
|
|
2301
|
+
# verify the required parameter '_class' is set
|
|
2302
|
+
if @api_client.config.client_side_validation && _class.nil?
|
|
2303
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_submission_comment"
|
|
2304
|
+
end
|
|
2305
|
+
# verify the required parameter 'assignment' is set
|
|
2306
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
|
2307
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.update_submission_comment"
|
|
2308
|
+
end
|
|
2309
|
+
# verify the required parameter 'submission' is set
|
|
2310
|
+
if @api_client.config.client_side_validation && submission.nil?
|
|
2311
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.update_submission_comment"
|
|
2312
|
+
end
|
|
2313
|
+
# verify the required parameter 'comment' is set
|
|
2314
|
+
if @api_client.config.client_side_validation && comment.nil?
|
|
2315
|
+
fail ArgumentError, "Missing the required parameter 'comment' when calling ClassApi.update_submission_comment"
|
|
2316
|
+
end
|
|
2317
|
+
# verify the required parameter 'assignment_submission_comment_creation' is set
|
|
2318
|
+
if @api_client.config.client_side_validation && assignment_submission_comment_creation.nil?
|
|
2319
|
+
fail ArgumentError, "Missing the required parameter 'assignment_submission_comment_creation' when calling ClassApi.update_submission_comment"
|
|
2320
|
+
end
|
|
2321
|
+
# resource path
|
|
2322
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}'.sub('{class}', CGI.escape(_class.to_s)).sub('{assignment}', CGI.escape(assignment.to_s)).sub('{submission}', CGI.escape(submission.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
2323
|
+
|
|
2324
|
+
# query parameters
|
|
2325
|
+
query_params = opts[:query_params] || {}
|
|
2326
|
+
|
|
2327
|
+
# header parameters
|
|
2328
|
+
header_params = opts[:header_params] || {}
|
|
2329
|
+
# HTTP header 'Accept' (if needed)
|
|
2330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2331
|
+
# HTTP header 'Content-Type'
|
|
2332
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2333
|
+
if !content_type.nil?
|
|
2334
|
+
header_params['Content-Type'] = content_type
|
|
2335
|
+
end
|
|
2336
|
+
|
|
2337
|
+
# form parameters
|
|
2338
|
+
form_params = opts[:form_params] || {}
|
|
2339
|
+
|
|
2340
|
+
# http body (model)
|
|
2341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assignment_submission_comment_creation)
|
|
2342
|
+
|
|
2343
|
+
# return_type
|
|
2344
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmissionComment'
|
|
2345
|
+
|
|
2346
|
+
# auth_names
|
|
2347
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
2348
|
+
|
|
2349
|
+
new_options = opts.merge(
|
|
2350
|
+
:operation => :"ClassApi.update_submission_comment",
|
|
2351
|
+
:header_params => header_params,
|
|
2352
|
+
:query_params => query_params,
|
|
2353
|
+
:form_params => form_params,
|
|
2354
|
+
:body => post_body,
|
|
2355
|
+
:auth_names => auth_names,
|
|
2356
|
+
:return_type => return_type
|
|
2357
|
+
)
|
|
2358
|
+
|
|
2359
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2360
|
+
if @api_client.config.debugging
|
|
2361
|
+
@api_client.config.logger.debug "API called: ClassApi#update_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2362
|
+
end
|
|
2363
|
+
return data, status_code, headers
|
|
2364
|
+
end
|
|
1147
2365
|
end
|
|
1148
2366
|
end
|