flat_api 0.1.2 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/flat_api/api/account_api.rb +31 -21
- data/lib/flat_api/api/class_api.rb +1405 -405
- data/lib/flat_api/api/collection_api.rb +684 -0
- data/lib/flat_api/api/edu_resources_api.rb +851 -0
- data/lib/flat_api/api/group_api.rb +81 -55
- data/lib/flat_api/api/organization_api.rb +524 -180
- data/lib/flat_api/api/score_api.rb +1034 -570
- data/lib/flat_api/api/task_api.rb +85 -0
- data/lib/flat_api/api/user_api.rb +114 -76
- data/lib/flat_api/api_client.rb +112 -107
- data/lib/flat_api/api_error.rb +24 -4
- data/lib/flat_api/configuration.rb +105 -16
- data/lib/flat_api/models/api_access_token.rb +268 -0
- data/lib/flat_api/models/app_scopes.rb +59 -0
- data/lib/flat_api/models/assignment.rb +192 -101
- data/lib/flat_api/models/assignment_capabilities.rb +283 -0
- data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +240 -0
- data/lib/flat_api/models/assignment_copy.rb +80 -169
- data/lib/flat_api/models/assignment_copy_response.rb +430 -0
- data/lib/flat_api/models/assignment_copy_to_class.rb +243 -0
- data/lib/flat_api/models/assignment_copy_to_resource_library.rb +233 -0
- data/lib/flat_api/models/assignment_submission.rb +249 -66
- data/lib/flat_api/models/assignment_submission_comment.rb +276 -0
- data/lib/flat_api/models/assignment_submission_comment_creation.rb +223 -0
- data/lib/flat_api/models/assignment_submission_comments.rb +225 -0
- data/lib/flat_api/models/assignment_submission_history.rb +384 -0
- data/lib/flat_api/models/assignment_submission_history_attachment.rb +235 -0
- data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
- data/lib/flat_api/models/assignment_submission_lti.rb +222 -0
- data/lib/flat_api/models/assignment_submission_playback_inner.rb +240 -0
- data/lib/flat_api/models/assignment_submission_state.rb +42 -0
- data/lib/flat_api/models/assignment_submission_update.rb +150 -50
- data/lib/flat_api/models/assignment_type.rb +44 -0
- data/lib/flat_api/models/assignment_update.rb +407 -0
- data/lib/flat_api/models/class_assignment.rb +613 -0
- data/lib/flat_api/models/class_assignment_all_of_canvas.rb +226 -0
- data/lib/flat_api/models/class_assignment_all_of_lti.rb +216 -0
- data/lib/flat_api/models/class_assignment_all_of_mfc.rb +226 -0
- data/lib/flat_api/models/class_assignment_update.rb +509 -0
- data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +217 -0
- data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +219 -0
- data/lib/flat_api/models/class_attachment_creation.rb +110 -41
- data/lib/flat_api/models/class_creation.rb +144 -43
- data/lib/flat_api/models/class_details.rb +175 -60
- data/lib/flat_api/models/class_details_canvas.rb +61 -34
- data/lib/flat_api/models/class_details_clever.rb +76 -48
- data/lib/flat_api/models/class_details_google_classroom.rb +66 -59
- data/lib/flat_api/models/class_details_google_drive.rb +63 -36
- data/lib/flat_api/models/class_details_issues.rb +218 -0
- data/lib/flat_api/models/class_details_issues_sync_inner.rb +270 -0
- data/lib/flat_api/models/class_details_lti.rb +65 -38
- data/lib/flat_api/models/class_details_mfc.rb +226 -0
- data/lib/flat_api/models/class_details_microsoft_graph.rb +215 -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 +18 -9
- data/lib/flat_api/models/class_update.rb +144 -42
- data/lib/flat_api/models/collection.rb +373 -0
- data/lib/flat_api/models/collection_app.rb +236 -0
- data/lib/flat_api/models/collection_capabilities.rb +291 -0
- data/lib/flat_api/models/collection_creation.rb +288 -0
- data/lib/flat_api/models/collection_modification.rb +275 -0
- data/lib/flat_api/models/collection_privacy.rb +39 -0
- data/lib/flat_api/models/collection_type.rb +44 -0
- data/lib/flat_api/models/edu_library.rb +292 -0
- data/lib/flat_api/models/edu_resource.rb +366 -0
- data/lib/flat_api/models/edu_resource_capabilities.rb +236 -0
- data/lib/flat_api/models/edu_resource_copy.rb +223 -0
- data/lib/flat_api/models/edu_resource_creation.rb +301 -0
- data/lib/flat_api/models/edu_resource_folder.rb +216 -0
- data/lib/flat_api/models/edu_resource_lti_link.rb +223 -0
- data/lib/flat_api/models/edu_resource_move.rb +223 -0
- data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
- data/lib/flat_api/models/edu_resource_resource.rb +105 -0
- data/lib/flat_api/models/edu_resource_type.rb +40 -0
- data/lib/flat_api/models/edu_resource_update.rb +277 -0
- data/lib/flat_api/models/edu_resource_use_in_class.rb +233 -0
- data/lib/flat_api/models/flat_error_response.rb +79 -38
- data/lib/flat_api/models/flat_locales.rb +30 -10
- data/lib/flat_api/models/google_classroom_coursework.rb +76 -38
- data/lib/flat_api/models/google_classroom_submission.rb +84 -36
- data/lib/flat_api/models/group.rb +72 -44
- data/lib/flat_api/models/group_details.rb +92 -43
- data/lib/flat_api/models/group_type.rb +18 -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_credentials.rb +95 -46
- data/lib/flat_api/models/lti_credentials_creation.rb +91 -38
- data/lib/flat_api/models/media_attachment.rb +167 -70
- data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
- data/lib/flat_api/models/microsoft_graph_assignment.rb +248 -0
- data/lib/flat_api/models/microsoft_graph_submission.rb +240 -0
- data/lib/flat_api/models/organization_invitation.rb +139 -44
- data/lib/flat_api/models/organization_invitation_creation.rb +99 -35
- data/lib/flat_api/models/organization_roles.rb +18 -9
- data/lib/flat_api/models/organization_user_access_token_creation.rb +225 -0
- data/lib/flat_api/models/resource_collaborator.rb +403 -0
- data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +85 -48
- data/lib/flat_api/models/resource_rights.rb +318 -0
- data/lib/flat_api/models/score_comment.rb +93 -56
- data/lib/flat_api/models/score_comment_context.rb +103 -59
- data/lib/flat_api/models/score_comment_creation.rb +70 -41
- data/lib/flat_api/models/score_comment_moderation.rb +260 -0
- data/lib/flat_api/models/score_comment_update.rb +82 -49
- data/lib/flat_api/models/score_comments_counts.rb +67 -40
- data/lib/flat_api/models/score_creation.rb +81 -215
- data/lib/flat_api/models/score_creation_builder_data.rb +298 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +230 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +322 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +274 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +269 -0
- data/lib/flat_api/models/score_creation_common.rb +268 -0
- data/lib/flat_api/models/score_creation_file_import.rb +324 -0
- data/lib/flat_api/models/score_creation_google_drive_import.rb +291 -0
- data/lib/flat_api/models/score_creation_type.rb +19 -9
- data/lib/flat_api/models/score_details.rb +274 -83
- data/lib/flat_api/models/score_fork.rb +94 -32
- data/lib/flat_api/models/score_license.rb +19 -9
- data/lib/flat_api/models/score_likes_counts.rb +83 -35
- data/lib/flat_api/models/score_modification.rb +175 -52
- data/lib/flat_api/models/score_plays_counts.rb +236 -0
- data/lib/flat_api/models/score_privacy.rb +18 -9
- data/lib/flat_api/models/score_revision.rb +80 -43
- data/lib/flat_api/models/score_revision_creation.rb +105 -40
- data/lib/flat_api/models/score_revision_statistics.rb +83 -36
- data/lib/flat_api/models/score_source.rb +61 -35
- data/lib/flat_api/models/score_summary.rb +124 -40
- data/lib/flat_api/models/score_track.rb +172 -51
- data/lib/flat_api/models/score_track_creation.rb +101 -39
- data/lib/flat_api/models/score_track_point.rb +70 -38
- 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 +88 -37
- data/lib/flat_api/models/score_views_counts.rb +62 -35
- data/lib/flat_api/models/task.rb +364 -0
- data/lib/flat_api/models/task_export_options.rb +218 -0
- data/lib/flat_api/models/task_progress.rb +226 -0
- data/lib/flat_api/models/task_result.rb +226 -0
- data/lib/flat_api/models/tutteo_product.rb +42 -0
- data/lib/flat_api/models/user_admin_update.rb +219 -41
- data/lib/flat_api/models/user_azure_details.rb +235 -0
- data/lib/flat_api/models/user_basics.rb +187 -55
- data/lib/flat_api/models/user_community_profile_links.rb +272 -0
- data/lib/flat_api/models/user_creation.rb +215 -49
- data/lib/flat_api/models/user_details.rb +258 -93
- data/lib/flat_api/models/user_details_admin.rb +220 -68
- data/lib/flat_api/models/user_details_admin_all_of_license.rb +278 -0
- data/lib/flat_api/models/user_public.rb +242 -79
- data/lib/flat_api/models/user_public_summary.rb +201 -61
- data/lib/flat_api/models/user_signin_link.rb +225 -0
- data/lib/flat_api/models/user_signin_link_creation.rb +217 -0
- data/lib/flat_api/version.rb +5 -5
- data/lib/flat_api.rb +87 -15
- data/spec/api/account_api_spec.rb +11 -10
- data/spec/api/class_api_spec.rb +212 -68
- data/spec/api/collection_api_spec.rb +158 -0
- data/spec/api/edu_resources_api_spec.rb +181 -0
- data/spec/api/group_api_spec.rb +14 -15
- data/spec/api/organization_api_spec.rb +78 -39
- data/spec/api/score_api_spec.rb +139 -110
- data/spec/api/task_api_spec.rb +47 -0
- data/spec/api/user_api_spec.rb +28 -26
- data/spec/models/api_access_token_spec.rb +66 -0
- data/spec/models/app_scopes_spec.rb +30 -0
- data/spec/models/assignment_capabilities_can_publish_in_class_error_spec.rb +42 -0
- data/spec/models/assignment_capabilities_spec.rb +60 -0
- data/spec/models/assignment_copy_response_spec.rb +124 -0
- data/spec/models/assignment_copy_spec.rb +13 -23
- data/spec/models/assignment_copy_to_class_spec.rb +48 -0
- data/spec/models/assignment_copy_to_resource_library_spec.rb +42 -0
- data/spec/models/assignment_spec.rb +51 -39
- data/spec/models/assignment_submission_comment_creation_spec.rb +36 -0
- data/spec/models/assignment_submission_comment_spec.rb +72 -0
- data/spec/models/assignment_submission_comments_spec.rb +42 -0
- data/spec/models/assignment_submission_history_attachment_spec.rb +48 -0
- data/spec/models/assignment_submission_history_spec.rb +112 -0
- data/spec/models/assignment_submission_history_state_spec.rb +30 -0
- data/spec/models/assignment_submission_lti_spec.rb +36 -0
- data/spec/models/assignment_submission_playback_inner_spec.rb +42 -0
- data/spec/models/assignment_submission_spec.rb +68 -32
- data/spec/models/assignment_submission_state_spec.rb +30 -0
- data/spec/models/assignment_submission_update_spec.rb +29 -23
- data/spec/models/assignment_type_spec.rb +30 -0
- data/spec/models/assignment_update_spec.rb +100 -0
- data/spec/models/class_assignment_all_of_canvas_spec.rb +42 -0
- data/spec/models/class_assignment_all_of_lti_spec.rb +36 -0
- data/spec/models/class_assignment_all_of_mfc_spec.rb +42 -0
- data/spec/models/class_assignment_spec.rb +216 -0
- data/spec/models/class_assignment_update_all_of_google_classroom_spec.rb +36 -0
- data/spec/models/class_assignment_update_all_of_microsoft_graph_spec.rb +36 -0
- data/spec/models/class_assignment_update_spec.rb +150 -0
- data/spec/models/class_attachment_creation_spec.rb +41 -23
- data/spec/models/class_creation_spec.rb +34 -18
- data/spec/models/class_details_canvas_spec.rb +12 -18
- data/spec/models/class_details_clever_spec.rb +21 -27
- data/spec/models/class_details_google_classroom_spec.rb +12 -30
- data/spec/models/class_details_google_drive_spec.rb +12 -18
- data/spec/models/class_details_issues_spec.rb +36 -0
- data/spec/models/class_details_issues_sync_inner_spec.rb +52 -0
- data/spec/models/class_details_lti_spec.rb +13 -19
- data/spec/models/class_details_mfc_spec.rb +42 -0
- data/spec/models/class_details_microsoft_graph_spec.rb +36 -0
- data/spec/models/class_details_spec.rb +68 -34
- data/spec/models/class_grade_level_spec.rb +30 -0
- data/spec/models/class_roles_spec.rb +10 -16
- data/spec/models/class_state_spec.rb +10 -16
- data/spec/models/class_update_spec.rb +34 -18
- data/spec/models/collection_app_spec.rb +48 -0
- data/spec/models/collection_capabilities_spec.rb +60 -0
- data/spec/models/collection_creation_spec.rb +42 -0
- data/spec/models/collection_modification_spec.rb +42 -0
- data/spec/models/collection_privacy_spec.rb +30 -0
- data/spec/models/collection_spec.rb +114 -0
- data/spec/models/collection_type_spec.rb +30 -0
- data/spec/models/edu_library_spec.rb +62 -0
- data/spec/models/edu_resource_capabilities_spec.rb +48 -0
- data/spec/models/edu_resource_copy_spec.rb +36 -0
- data/spec/models/edu_resource_creation_spec.rb +48 -0
- data/spec/models/edu_resource_folder_spec.rb +36 -0
- data/spec/models/edu_resource_lti_link_spec.rb +36 -0
- data/spec/models/edu_resource_move_spec.rb +36 -0
- data/spec/models/edu_resource_privacy_spec.rb +30 -0
- data/spec/models/edu_resource_resource_spec.rb +32 -0
- data/spec/models/edu_resource_spec.rb +96 -0
- data/spec/models/edu_resource_type_spec.rb +30 -0
- data/spec/models/edu_resource_update_spec.rb +42 -0
- data/spec/models/edu_resource_use_in_class_spec.rb +42 -0
- data/spec/models/flat_error_response_spec.rb +14 -20
- data/spec/models/flat_locales_spec.rb +10 -16
- data/spec/models/google_classroom_coursework_spec.rb +19 -19
- data/spec/models/google_classroom_submission_spec.rb +13 -19
- data/spec/models/group_details_spec.rb +17 -23
- data/spec/models/group_spec.rb +21 -27
- data/spec/models/group_type_spec.rb +10 -16
- data/spec/models/license_mode_spec.rb +10 -16
- data/spec/models/license_sources_spec.rb +10 -16
- data/spec/models/lms_name_spec.rb +10 -16
- data/spec/models/lti_credentials_creation_spec.rb +12 -18
- data/spec/models/lti_credentials_spec.rb +19 -25
- data/spec/models/media_attachment_spec.rb +67 -37
- data/spec/models/media_score_sharing_mode_spec.rb +10 -16
- data/spec/models/microsoft_graph_assignment_spec.rb +54 -0
- data/spec/models/microsoft_graph_submission_spec.rb +42 -0
- data/spec/models/organization_invitation_creation_spec.rb +16 -18
- data/spec/models/organization_invitation_spec.rb +29 -23
- data/spec/models/organization_roles_spec.rb +10 -16
- data/spec/models/organization_user_access_token_creation_spec.rb +36 -0
- data/spec/models/resource_collaborator_creation_spec.rb +72 -0
- data/spec/models/resource_collaborator_spec.rb +112 -0
- data/spec/models/resource_rights_spec.rb +64 -0
- data/spec/models/score_comment_context_spec.rb +23 -23
- data/spec/models/score_comment_creation_spec.rb +16 -22
- data/spec/models/score_comment_moderation_spec.rb +46 -0
- data/spec/models/score_comment_spec.rb +35 -35
- data/spec/models/score_comment_update_spec.rb +14 -20
- data/spec/models/score_comments_counts_spec.rb +14 -20
- data/spec/models/score_creation_builder_data_all_of_builder_data_layout_data_spec.rb +82 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_instruments_spec.rb +60 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_spec.rb +66 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_spec.rb +42 -0
- data/spec/models/score_creation_builder_data_spec.rb +60 -0
- data/spec/models/score_creation_common_spec.rb +54 -0
- data/spec/models/score_creation_file_import_spec.rb +76 -0
- data/spec/models/score_creation_google_drive_import_spec.rb +60 -0
- data/spec/models/score_creation_spec.rb +12 -52
- data/spec/models/score_creation_type_spec.rb +10 -16
- data/spec/models/score_details_spec.rb +75 -45
- data/spec/models/score_fork_spec.rb +27 -15
- data/spec/models/score_license_spec.rb +10 -16
- data/spec/models/score_likes_counts_spec.rb +13 -19
- data/spec/models/score_modification_spec.rb +51 -21
- data/spec/models/score_plays_counts_spec.rb +48 -0
- data/spec/models/score_privacy_spec.rb +10 -16
- data/spec/models/score_revision_creation_spec.rb +18 -20
- data/spec/models/score_revision_spec.rb +23 -23
- data/spec/models/score_revision_statistics_spec.rb +24 -18
- data/spec/models/score_source_spec.rb +11 -17
- data/spec/models/score_summary_spec.rb +16 -22
- data/spec/models/score_track_creation_spec.rb +21 -21
- data/spec/models/score_track_point_spec.rb +17 -23
- data/spec/models/score_track_purpose_spec.rb +30 -0
- data/spec/models/score_track_spec.rb +28 -28
- data/spec/models/score_track_state_spec.rb +10 -16
- data/spec/models/score_track_type_spec.rb +10 -16
- data/spec/models/score_track_update_spec.rb +14 -20
- data/spec/models/score_views_counts_spec.rb +13 -19
- data/spec/models/task_export_options_spec.rb +36 -0
- data/spec/models/task_progress_spec.rb +42 -0
- data/spec/models/task_result_spec.rb +42 -0
- data/spec/models/task_spec.rb +100 -0
- data/spec/models/tutteo_product_spec.rb +30 -0
- data/spec/models/user_admin_update_spec.rb +36 -18
- data/spec/models/user_azure_details_spec.rb +48 -0
- data/spec/models/user_basics_spec.rb +47 -25
- data/spec/models/user_community_profile_links_spec.rb +66 -0
- data/spec/models/user_creation_spec.rb +36 -20
- data/spec/models/user_details_admin_all_of_license_spec.rb +60 -0
- data/spec/models/user_details_admin_spec.rb +60 -32
- data/spec/models/user_details_spec.rb +93 -45
- data/spec/models/user_public_spec.rb +71 -37
- data/spec/models/user_public_summary_spec.rb +51 -29
- data/spec/models/user_signin_link_creation_spec.rb +36 -0
- data/spec/models/user_signin_link_spec.rb +42 -0
- data/spec/spec_helper.rb +4 -4
- metadata +299 -312
- data/CHANGELOG.md +0 -13
- data/Gemfile +0 -7
- data/README.md +0 -249
- 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/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/ScoreApi.md +0 -1605
- data/docs/ScoreCollaborator.md +0 -15
- data/docs/ScoreCollaboratorCreation.md +0 -13
- 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 -13
- 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 -7
- data/docs/ScoreLicense.md +0 -7
- data/docs/ScoreLikesCounts.md +0 -10
- data/docs/ScoreModification.md +0 -13
- 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/ScoreRights.md +0 -10
- 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/git_push.sh +0 -55
- data/lib/flat_api/models/assignment_creation.rb +0 -230
- data/lib/flat_api/models/score_collaborator.rb +0 -263
- 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/score_rights.rb +0 -215
- 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_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/assignment_creation_spec.rb +0 -66
- data/spec/models/score_collaborator_creation_spec.rb +0 -72
- data/spec/models/score_collaborator_spec.rb +0 -84
- data/spec/models/score_data_encoding_spec.rb +0 -36
- data/spec/models/score_data_spec.rb +0 -36
- data/spec/models/score_rights_spec.rb +0 -48
- data/spec/models/user_details_admin_license_spec.rb +0 -66
- data/spec/models/user_instruments_spec.rb +0 -36
@@ -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 (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * 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.20.0
|
7
7
|
Contact: developers@flat.io
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.3.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
54
|
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'])
|
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
123
|
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'])
|
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'])
|
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
255
|
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'])
|
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
330
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
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
398
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
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
472
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
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,57 +541,136 @@ 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
552
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
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
|
|
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
|
591
|
+
# @param [Hash] opts the optional parameters
|
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
|
597
|
+
end
|
598
|
+
|
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
|
602
|
+
# @param [Hash] opts the optional parameters
|
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 = {})
|
606
|
+
if @api_client.config.debugging
|
607
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.create_test_student_account ...'
|
608
|
+
end
|
609
|
+
# verify the required parameter '_class' is set
|
610
|
+
if @api_client.config.client_side_validation && _class.nil?
|
611
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_test_student_account"
|
612
|
+
end
|
613
|
+
# resource path
|
614
|
+
local_var_path = '/classes/{class}/testStudent'.sub('{' + 'class' + '}', CGI.escape(_class.to_s))
|
615
|
+
|
616
|
+
# query parameters
|
617
|
+
query_params = opts[:query_params] || {}
|
618
|
+
query_params[:'reset'] = opts[:'reset'] if !opts[:'reset'].nil?
|
619
|
+
|
620
|
+
# header parameters
|
621
|
+
header_params = opts[:header_params] || {}
|
622
|
+
# HTTP header 'Accept' (if needed)
|
623
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
624
|
+
|
625
|
+
# form parameters
|
626
|
+
form_params = opts[:form_params] || {}
|
627
|
+
|
628
|
+
# http body (model)
|
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",
|
639
|
+
:header_params => header_params,
|
640
|
+
:query_params => query_params,
|
641
|
+
:form_params => form_params,
|
642
|
+
:body => post_body,
|
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)
|
648
|
+
if @api_client.config.debugging
|
649
|
+
@api_client.config.logger.debug "API called: ClassApi#create_test_student_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
650
|
+
end
|
651
|
+
return data, status_code, headers
|
652
|
+
end
|
653
|
+
|
439
654
|
# Remove a user from the class
|
440
655
|
# This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
|
441
|
-
# @param _class Unique identifier of the class
|
442
|
-
# @param user Unique identifier of the user
|
656
|
+
# @param _class [String] Unique identifier of the class
|
657
|
+
# @param user [String] Unique identifier of the user
|
443
658
|
# @param [Hash] opts the optional parameters
|
444
659
|
# @return [nil]
|
445
660
|
def delete_class_user(_class, user, opts = {})
|
446
661
|
delete_class_user_with_http_info(_class, user, opts)
|
447
|
-
|
662
|
+
nil
|
448
663
|
end
|
449
664
|
|
450
665
|
# Remove a user from the class
|
451
666
|
# This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions.
|
452
|
-
# @param _class Unique identifier of the class
|
453
|
-
# @param user Unique identifier of the user
|
667
|
+
# @param _class [String] Unique identifier of the class
|
668
|
+
# @param user [String] Unique identifier of the user
|
454
669
|
# @param [Hash] opts the optional parameters
|
455
|
-
# @return [Array<(nil,
|
670
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
456
671
|
def delete_class_user_with_http_info(_class, user, opts = {})
|
457
672
|
if @api_client.config.debugging
|
458
|
-
@api_client.config.logger.debug
|
673
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_class_user ...'
|
459
674
|
end
|
460
675
|
# verify the required parameter '_class' is set
|
461
676
|
if @api_client.config.client_side_validation && _class.nil?
|
@@ -466,296 +681,630 @@ module FlatApi
|
|
466
681
|
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user"
|
467
682
|
end
|
468
683
|
# resource path
|
469
|
-
local_var_path =
|
684
|
+
local_var_path = '/classes/{class}/users/{user}'.sub('{' + 'class' + '}', CGI.escape(_class.to_s)).sub('{' + 'user' + '}', CGI.escape(user.to_s))
|
470
685
|
|
471
686
|
# query parameters
|
472
|
-
query_params = {}
|
687
|
+
query_params = opts[:query_params] || {}
|
473
688
|
|
474
689
|
# header parameters
|
475
|
-
header_params = {}
|
690
|
+
header_params = opts[:header_params] || {}
|
476
691
|
# HTTP header 'Accept' (if needed)
|
477
692
|
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'])
|
480
693
|
|
481
694
|
# form parameters
|
482
|
-
form_params = {}
|
695
|
+
form_params = opts[:form_params] || {}
|
483
696
|
|
484
697
|
# http body (model)
|
485
|
-
post_body =
|
486
|
-
|
487
|
-
|
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_class_user",
|
488
708
|
:header_params => header_params,
|
489
709
|
:query_params => query_params,
|
490
710
|
:form_params => form_params,
|
491
711
|
:body => post_body,
|
492
|
-
:auth_names => auth_names
|
712
|
+
:auth_names => auth_names,
|
713
|
+
:return_type => return_type
|
714
|
+
)
|
715
|
+
|
716
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
493
717
|
if @api_client.config.debugging
|
494
718
|
@api_client.config.logger.debug "API called: ClassApi#delete_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
495
719
|
end
|
496
720
|
return data, status_code, headers
|
497
721
|
end
|
498
722
|
|
499
|
-
#
|
500
|
-
# Use this method as a teacher to
|
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
|
723
|
+
# Reset a submission
|
724
|
+
# Use this method as a teacher to reset a submission and allow student to start over the assignment
|
725
|
+
# @param _class [String] Unique identifier of the class
|
726
|
+
# @param assignment [String] Unique identifier of the assignment
|
727
|
+
# @param submission [String] Unique identifier of the submission
|
505
728
|
# @param [Hash] opts the optional parameters
|
506
729
|
# @return [AssignmentSubmission]
|
507
|
-
def
|
508
|
-
data, _status_code, _headers =
|
509
|
-
|
730
|
+
def delete_submission(_class, assignment, submission, opts = {})
|
731
|
+
data, _status_code, _headers = delete_submission_with_http_info(_class, assignment, submission, opts)
|
732
|
+
data
|
510
733
|
end
|
511
734
|
|
512
|
-
#
|
513
|
-
# Use this method as a teacher to
|
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
|
735
|
+
# Reset a submission
|
736
|
+
# Use this method as a teacher to reset a submission and allow student to start over the assignment
|
737
|
+
# @param _class [String] Unique identifier of the class
|
738
|
+
# @param assignment [String] Unique identifier of the assignment
|
739
|
+
# @param submission [String] Unique identifier of the submission
|
518
740
|
# @param [Hash] opts the optional parameters
|
519
|
-
# @return [Array<(AssignmentSubmission,
|
520
|
-
def
|
741
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
742
|
+
def delete_submission_with_http_info(_class, assignment, submission, opts = {})
|
521
743
|
if @api_client.config.debugging
|
522
|
-
@api_client.config.logger.debug
|
744
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_submission ...'
|
523
745
|
end
|
524
746
|
# verify the required parameter '_class' is set
|
525
747
|
if @api_client.config.client_side_validation && _class.nil?
|
526
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
748
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_submission"
|
527
749
|
end
|
528
750
|
# verify the required parameter 'assignment' is set
|
529
751
|
if @api_client.config.client_side_validation && assignment.nil?
|
530
|
-
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.
|
752
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.delete_submission"
|
531
753
|
end
|
532
754
|
# verify the required parameter 'submission' is set
|
533
755
|
if @api_client.config.client_side_validation && submission.nil?
|
534
|
-
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.
|
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"
|
756
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.delete_submission"
|
539
757
|
end
|
540
758
|
# resource path
|
541
|
-
local_var_path =
|
759
|
+
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))
|
542
760
|
|
543
761
|
# query parameters
|
544
|
-
query_params = {}
|
762
|
+
query_params = opts[:query_params] || {}
|
545
763
|
|
546
764
|
# header parameters
|
547
|
-
header_params = {}
|
765
|
+
header_params = opts[:header_params] || {}
|
548
766
|
# HTTP header 'Accept' (if needed)
|
549
767
|
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'])
|
552
768
|
|
553
769
|
# form parameters
|
554
|
-
form_params = {}
|
770
|
+
form_params = opts[:form_params] || {}
|
555
771
|
|
556
772
|
# http body (model)
|
557
|
-
post_body =
|
558
|
-
|
559
|
-
|
773
|
+
post_body = opts[:debug_body]
|
774
|
+
|
775
|
+
# return_type
|
776
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
777
|
+
|
778
|
+
# auth_names
|
779
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
780
|
+
|
781
|
+
new_options = opts.merge(
|
782
|
+
:operation => :"ClassApi.delete_submission",
|
560
783
|
:header_params => header_params,
|
561
784
|
:query_params => query_params,
|
562
785
|
:form_params => form_params,
|
563
786
|
:body => post_body,
|
564
787
|
:auth_names => auth_names,
|
565
|
-
:return_type =>
|
788
|
+
:return_type => return_type
|
789
|
+
)
|
790
|
+
|
791
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
566
792
|
if @api_client.config.debugging
|
567
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
793
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
568
794
|
end
|
569
795
|
return data, status_code, headers
|
570
796
|
end
|
571
797
|
|
572
|
-
#
|
573
|
-
#
|
574
|
-
# @param
|
798
|
+
# Delete a feedback comment to a submission
|
799
|
+
# @param _class [String] Unique identifier of the class
|
800
|
+
# @param assignment [String] Unique identifier of the assignment
|
801
|
+
# @param submission [String] Unique identifier of the submission
|
802
|
+
# @param comment [String] Unique identifier of the comment
|
575
803
|
# @param [Hash] opts the optional parameters
|
576
|
-
# @return [
|
577
|
-
def
|
578
|
-
|
579
|
-
|
804
|
+
# @return [nil]
|
805
|
+
def delete_submission_comment(_class, assignment, submission, comment, opts = {})
|
806
|
+
delete_submission_comment_with_http_info(_class, assignment, submission, comment, opts)
|
807
|
+
nil
|
580
808
|
end
|
581
809
|
|
582
|
-
#
|
583
|
-
#
|
584
|
-
# @param
|
810
|
+
# Delete a feedback comment to a submission
|
811
|
+
# @param _class [String] Unique identifier of the class
|
812
|
+
# @param assignment [String] Unique identifier of the assignment
|
813
|
+
# @param submission [String] Unique identifier of the submission
|
814
|
+
# @param comment [String] Unique identifier of the comment
|
585
815
|
# @param [Hash] opts the optional parameters
|
586
|
-
# @return [Array<(
|
587
|
-
def
|
816
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
817
|
+
def delete_submission_comment_with_http_info(_class, assignment, submission, comment, opts = {})
|
588
818
|
if @api_client.config.debugging
|
589
|
-
@api_client.config.logger.debug
|
819
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.delete_submission_comment ...'
|
590
820
|
end
|
591
|
-
# verify the required parameter '
|
592
|
-
if @api_client.config.client_side_validation &&
|
593
|
-
fail ArgumentError, "Missing the required parameter '
|
821
|
+
# verify the required parameter '_class' is set
|
822
|
+
if @api_client.config.client_side_validation && _class.nil?
|
823
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_submission_comment"
|
824
|
+
end
|
825
|
+
# verify the required parameter 'assignment' is set
|
826
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
827
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.delete_submission_comment"
|
828
|
+
end
|
829
|
+
# verify the required parameter 'submission' is set
|
830
|
+
if @api_client.config.client_side_validation && submission.nil?
|
831
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.delete_submission_comment"
|
832
|
+
end
|
833
|
+
# verify the required parameter 'comment' is set
|
834
|
+
if @api_client.config.client_side_validation && comment.nil?
|
835
|
+
fail ArgumentError, "Missing the required parameter 'comment' when calling ClassApi.delete_submission_comment"
|
594
836
|
end
|
595
837
|
# resource path
|
596
|
-
local_var_path =
|
838
|
+
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))
|
597
839
|
|
598
840
|
# query parameters
|
599
|
-
query_params = {}
|
841
|
+
query_params = opts[:query_params] || {}
|
600
842
|
|
601
843
|
# header parameters
|
602
|
-
header_params = {}
|
844
|
+
header_params = opts[:header_params] || {}
|
603
845
|
# HTTP header 'Accept' (if needed)
|
604
846
|
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'])
|
607
847
|
|
608
848
|
# form parameters
|
609
|
-
form_params = {}
|
849
|
+
form_params = opts[:form_params] || {}
|
610
850
|
|
611
851
|
# http body (model)
|
612
|
-
post_body =
|
613
|
-
|
614
|
-
|
852
|
+
post_body = opts[:debug_body]
|
853
|
+
|
854
|
+
# return_type
|
855
|
+
return_type = opts[:debug_return_type]
|
856
|
+
|
857
|
+
# auth_names
|
858
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
859
|
+
|
860
|
+
new_options = opts.merge(
|
861
|
+
:operation => :"ClassApi.delete_submission_comment",
|
615
862
|
:header_params => header_params,
|
616
863
|
:query_params => query_params,
|
617
864
|
:form_params => form_params,
|
618
865
|
:body => post_body,
|
619
866
|
:auth_names => auth_names,
|
620
|
-
:return_type =>
|
867
|
+
:return_type => return_type
|
868
|
+
)
|
869
|
+
|
870
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
621
871
|
if @api_client.config.debugging
|
622
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
872
|
+
@api_client.config.logger.debug "API called: ClassApi#delete_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
623
873
|
end
|
624
874
|
return data, status_code, headers
|
625
875
|
end
|
626
876
|
|
627
|
-
#
|
628
|
-
#
|
629
|
-
# @param _class Unique identifier of the class
|
877
|
+
# Edit a submission
|
878
|
+
# Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`
|
879
|
+
# @param _class [String] Unique identifier of the class
|
880
|
+
# @param assignment [String] Unique identifier of the assignment
|
881
|
+
# @param submission [String] Unique identifier of the submission
|
882
|
+
# @param body [AssignmentSubmissionUpdate]
|
630
883
|
# @param [Hash] opts the optional parameters
|
631
|
-
# @return [
|
632
|
-
def
|
633
|
-
data, _status_code, _headers =
|
634
|
-
|
884
|
+
# @return [AssignmentSubmission]
|
885
|
+
def edit_submission(_class, assignment, submission, body, opts = {})
|
886
|
+
data, _status_code, _headers = edit_submission_with_http_info(_class, assignment, submission, body, opts)
|
887
|
+
data
|
635
888
|
end
|
636
889
|
|
637
|
-
#
|
638
|
-
#
|
639
|
-
# @param _class Unique identifier of the class
|
890
|
+
# Edit a submission
|
891
|
+
# Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`
|
892
|
+
# @param _class [String] Unique identifier of the class
|
893
|
+
# @param assignment [String] Unique identifier of the assignment
|
894
|
+
# @param submission [String] Unique identifier of the submission
|
895
|
+
# @param body [AssignmentSubmissionUpdate]
|
640
896
|
# @param [Hash] opts the optional parameters
|
641
|
-
# @return [Array<(
|
642
|
-
def
|
897
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
898
|
+
def edit_submission_with_http_info(_class, assignment, submission, body, opts = {})
|
643
899
|
if @api_client.config.debugging
|
644
|
-
@api_client.config.logger.debug
|
900
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.edit_submission ...'
|
645
901
|
end
|
646
902
|
# verify the required parameter '_class' is set
|
647
903
|
if @api_client.config.client_side_validation && _class.nil?
|
648
|
-
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.
|
904
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.edit_submission"
|
905
|
+
end
|
906
|
+
# verify the required parameter 'assignment' is set
|
907
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
908
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.edit_submission"
|
909
|
+
end
|
910
|
+
# verify the required parameter 'submission' is set
|
911
|
+
if @api_client.config.client_side_validation && submission.nil?
|
912
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission"
|
913
|
+
end
|
914
|
+
# verify the required parameter 'body' is set
|
915
|
+
if @api_client.config.client_side_validation && body.nil?
|
916
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission"
|
649
917
|
end
|
650
918
|
# resource path
|
651
|
-
local_var_path =
|
919
|
+
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
920
|
|
653
921
|
# query parameters
|
654
|
-
query_params = {}
|
922
|
+
query_params = opts[:query_params] || {}
|
655
923
|
|
656
924
|
# header parameters
|
657
|
-
header_params = {}
|
925
|
+
header_params = opts[:header_params] || {}
|
658
926
|
# HTTP header 'Accept' (if needed)
|
659
927
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
660
928
|
# HTTP header 'Content-Type'
|
661
|
-
|
929
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
930
|
+
if !content_type.nil?
|
931
|
+
header_params['Content-Type'] = content_type
|
932
|
+
end
|
662
933
|
|
663
934
|
# form parameters
|
664
|
-
form_params = {}
|
935
|
+
form_params = opts[:form_params] || {}
|
665
936
|
|
666
937
|
# http body (model)
|
667
|
-
post_body =
|
668
|
-
|
669
|
-
|
938
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
939
|
+
|
940
|
+
# return_type
|
941
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
942
|
+
|
943
|
+
# auth_names
|
944
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
945
|
+
|
946
|
+
new_options = opts.merge(
|
947
|
+
:operation => :"ClassApi.edit_submission",
|
670
948
|
:header_params => header_params,
|
671
949
|
:query_params => query_params,
|
672
950
|
:form_params => form_params,
|
673
951
|
:body => post_body,
|
674
952
|
:auth_names => auth_names,
|
675
|
-
:return_type =>
|
953
|
+
:return_type => return_type
|
954
|
+
)
|
955
|
+
|
956
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
676
957
|
if @api_client.config.debugging
|
677
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
958
|
+
@api_client.config.logger.debug "API called: ClassApi#edit_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
678
959
|
end
|
679
960
|
return data, status_code, headers
|
680
961
|
end
|
681
962
|
|
682
|
-
#
|
683
|
-
#
|
684
|
-
# @param
|
963
|
+
# Join a class
|
964
|
+
# 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.
|
965
|
+
# @param enrollment_code [String] The enrollment code, available to the teacher in `ClassDetails`
|
685
966
|
# @param [Hash] opts the optional parameters
|
686
|
-
# @return [
|
687
|
-
def
|
688
|
-
data, _status_code, _headers =
|
689
|
-
|
967
|
+
# @return [ClassDetails]
|
968
|
+
def enroll_class(enrollment_code, opts = {})
|
969
|
+
data, _status_code, _headers = enroll_class_with_http_info(enrollment_code, opts)
|
970
|
+
data
|
690
971
|
end
|
691
972
|
|
692
|
-
#
|
693
|
-
#
|
694
|
-
# @param
|
973
|
+
# Join a class
|
974
|
+
# 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.
|
975
|
+
# @param enrollment_code [String] The enrollment code, available to the teacher in `ClassDetails`
|
695
976
|
# @param [Hash] opts the optional parameters
|
696
|
-
# @return [Array<(
|
697
|
-
def
|
977
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
978
|
+
def enroll_class_with_http_info(enrollment_code, opts = {})
|
698
979
|
if @api_client.config.debugging
|
699
|
-
@api_client.config.logger.debug
|
980
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.enroll_class ...'
|
700
981
|
end
|
701
|
-
# verify the required parameter '
|
702
|
-
if @api_client.config.client_side_validation &&
|
703
|
-
fail ArgumentError, "Missing the required parameter '
|
982
|
+
# verify the required parameter 'enrollment_code' is set
|
983
|
+
if @api_client.config.client_side_validation && enrollment_code.nil?
|
984
|
+
fail ArgumentError, "Missing the required parameter 'enrollment_code' when calling ClassApi.enroll_class"
|
704
985
|
end
|
705
986
|
# resource path
|
706
|
-
local_var_path =
|
987
|
+
local_var_path = '/classes/enroll/{enrollmentCode}'.sub('{' + 'enrollmentCode' + '}', CGI.escape(enrollment_code.to_s))
|
707
988
|
|
708
989
|
# query parameters
|
709
|
-
query_params = {}
|
990
|
+
query_params = opts[:query_params] || {}
|
710
991
|
|
711
992
|
# header parameters
|
712
|
-
header_params = {}
|
993
|
+
header_params = opts[:header_params] || {}
|
713
994
|
# HTTP header 'Accept' (if needed)
|
714
995
|
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'])
|
717
996
|
|
718
997
|
# form parameters
|
719
|
-
form_params = {}
|
998
|
+
form_params = opts[:form_params] || {}
|
720
999
|
|
721
1000
|
# http body (model)
|
722
|
-
post_body =
|
723
|
-
|
724
|
-
|
1001
|
+
post_body = opts[:debug_body]
|
1002
|
+
|
1003
|
+
# return_type
|
1004
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
1005
|
+
|
1006
|
+
# auth_names
|
1007
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1008
|
+
|
1009
|
+
new_options = opts.merge(
|
1010
|
+
:operation => :"ClassApi.enroll_class",
|
725
1011
|
:header_params => header_params,
|
726
1012
|
:query_params => query_params,
|
727
1013
|
:form_params => form_params,
|
728
1014
|
:body => post_body,
|
729
1015
|
:auth_names => auth_names,
|
730
|
-
:return_type =>
|
1016
|
+
:return_type => return_type
|
1017
|
+
)
|
1018
|
+
|
1019
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
731
1020
|
if @api_client.config.debugging
|
732
|
-
@api_client.config.logger.debug "API called: ClassApi#
|
1021
|
+
@api_client.config.logger.debug "API called: ClassApi#enroll_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1022
|
+
end
|
1023
|
+
return data, status_code, headers
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# CSV Grades exports
|
1027
|
+
# Export list of submissions grades to a CSV file
|
1028
|
+
# @param _class [String] Unique identifier of the class
|
1029
|
+
# @param assignment [String] Unique identifier of the assignment
|
1030
|
+
# @param [Hash] opts the optional parameters
|
1031
|
+
# @return [File]
|
1032
|
+
def export_submissions_reviews_as_csv(_class, assignment, opts = {})
|
1033
|
+
data, _status_code, _headers = export_submissions_reviews_as_csv_with_http_info(_class, assignment, opts)
|
1034
|
+
data
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
# CSV Grades exports
|
1038
|
+
# Export list of submissions grades to a CSV file
|
1039
|
+
# @param _class [String] Unique identifier of the class
|
1040
|
+
# @param assignment [String] Unique identifier of the assignment
|
1041
|
+
# @param [Hash] opts the optional parameters
|
1042
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
1043
|
+
def export_submissions_reviews_as_csv_with_http_info(_class, assignment, opts = {})
|
1044
|
+
if @api_client.config.debugging
|
1045
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.export_submissions_reviews_as_csv ...'
|
1046
|
+
end
|
1047
|
+
# verify the required parameter '_class' is set
|
1048
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1049
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.export_submissions_reviews_as_csv"
|
1050
|
+
end
|
1051
|
+
# verify the required parameter 'assignment' is set
|
1052
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
1053
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.export_submissions_reviews_as_csv"
|
1054
|
+
end
|
1055
|
+
# resource path
|
1056
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/csv'.sub('{' + 'class' + '}', CGI.escape(_class.to_s)).sub('{' + 'assignment' + '}', CGI.escape(assignment.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(['text/csv'])
|
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] || 'File'
|
1074
|
+
|
1075
|
+
# auth_names
|
1076
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1077
|
+
|
1078
|
+
new_options = opts.merge(
|
1079
|
+
:operation => :"ClassApi.export_submissions_reviews_as_csv",
|
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(:GET, local_var_path, new_options)
|
1089
|
+
if @api_client.config.debugging
|
1090
|
+
@api_client.config.logger.debug "API called: ClassApi#export_submissions_reviews_as_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1091
|
+
end
|
1092
|
+
return data, status_code, headers
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
# Excel Grades exports
|
1096
|
+
# Export list of submissions grades to an Excel 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_excel(_class, assignment, opts = {})
|
1102
|
+
data, _status_code, _headers = export_submissions_reviews_as_excel_with_http_info(_class, assignment, opts)
|
1103
|
+
data
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
# Excel Grades exports
|
1107
|
+
# Export list of submissions grades to an Excel 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_excel_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_excel ...'
|
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_excel"
|
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_excel"
|
1123
|
+
end
|
1124
|
+
# resource path
|
1125
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions/excel'.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(['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
|
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_excel",
|
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_excel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1160
|
+
end
|
1161
|
+
return data, status_code, headers
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Get the details of a single class
|
1165
|
+
# @param _class [String] Unique identifier of the class
|
1166
|
+
# @param [Hash] opts the optional parameters
|
1167
|
+
# @return [ClassDetails]
|
1168
|
+
def get_class(_class, opts = {})
|
1169
|
+
data, _status_code, _headers = get_class_with_http_info(_class, opts)
|
1170
|
+
data
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
# Get the details of a single class
|
1174
|
+
# @param _class [String] Unique identifier of the class
|
1175
|
+
# @param [Hash] opts the optional parameters
|
1176
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
1177
|
+
def get_class_with_http_info(_class, opts = {})
|
1178
|
+
if @api_client.config.debugging
|
1179
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_class ...'
|
1180
|
+
end
|
1181
|
+
# verify the required parameter '_class' is set
|
1182
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1183
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_class"
|
1184
|
+
end
|
1185
|
+
# resource path
|
1186
|
+
local_var_path = '/classes/{class}'.sub('{' + 'class' + '}', CGI.escape(_class.to_s))
|
1187
|
+
|
1188
|
+
# query parameters
|
1189
|
+
query_params = opts[:query_params] || {}
|
1190
|
+
|
1191
|
+
# header parameters
|
1192
|
+
header_params = opts[:header_params] || {}
|
1193
|
+
# HTTP header 'Accept' (if needed)
|
1194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1195
|
+
|
1196
|
+
# form parameters
|
1197
|
+
form_params = opts[:form_params] || {}
|
1198
|
+
|
1199
|
+
# http body (model)
|
1200
|
+
post_body = opts[:debug_body]
|
1201
|
+
|
1202
|
+
# return_type
|
1203
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
1204
|
+
|
1205
|
+
# auth_names
|
1206
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1207
|
+
|
1208
|
+
new_options = opts.merge(
|
1209
|
+
:operation => :"ClassApi.get_class",
|
1210
|
+
:header_params => header_params,
|
1211
|
+
:query_params => query_params,
|
1212
|
+
:form_params => form_params,
|
1213
|
+
:body => post_body,
|
1214
|
+
:auth_names => auth_names,
|
1215
|
+
:return_type => return_type
|
1216
|
+
)
|
1217
|
+
|
1218
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1219
|
+
if @api_client.config.debugging
|
1220
|
+
@api_client.config.logger.debug "API called: ClassApi#get_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1221
|
+
end
|
1222
|
+
return data, status_code, headers
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
# List submissions related to the score
|
1226
|
+
# 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.
|
1227
|
+
# @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`).
|
1228
|
+
# @param [Hash] opts the optional parameters
|
1229
|
+
# @return [Array<AssignmentSubmission>]
|
1230
|
+
def get_score_submissions(score, opts = {})
|
1231
|
+
data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
|
1232
|
+
data
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# List submissions related to the score
|
1236
|
+
# 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.
|
1237
|
+
# @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`).
|
1238
|
+
# @param [Hash] opts the optional parameters
|
1239
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
1240
|
+
def get_score_submissions_with_http_info(score, opts = {})
|
1241
|
+
if @api_client.config.debugging
|
1242
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_score_submissions ...'
|
1243
|
+
end
|
1244
|
+
# verify the required parameter 'score' is set
|
1245
|
+
if @api_client.config.client_side_validation && score.nil?
|
1246
|
+
fail ArgumentError, "Missing the required parameter 'score' when calling ClassApi.get_score_submissions"
|
1247
|
+
end
|
1248
|
+
# resource path
|
1249
|
+
local_var_path = '/scores/{score}/submissions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1250
|
+
|
1251
|
+
# query parameters
|
1252
|
+
query_params = opts[:query_params] || {}
|
1253
|
+
|
1254
|
+
# header parameters
|
1255
|
+
header_params = opts[:header_params] || {}
|
1256
|
+
# HTTP header 'Accept' (if needed)
|
1257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1258
|
+
|
1259
|
+
# form parameters
|
1260
|
+
form_params = opts[:form_params] || {}
|
1261
|
+
|
1262
|
+
# http body (model)
|
1263
|
+
post_body = opts[:debug_body]
|
1264
|
+
|
1265
|
+
# return_type
|
1266
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
1267
|
+
|
1268
|
+
# auth_names
|
1269
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1270
|
+
|
1271
|
+
new_options = opts.merge(
|
1272
|
+
:operation => :"ClassApi.get_score_submissions",
|
1273
|
+
:header_params => header_params,
|
1274
|
+
:query_params => query_params,
|
1275
|
+
:form_params => form_params,
|
1276
|
+
:body => post_body,
|
1277
|
+
:auth_names => auth_names,
|
1278
|
+
:return_type => return_type
|
1279
|
+
)
|
1280
|
+
|
1281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1282
|
+
if @api_client.config.debugging
|
1283
|
+
@api_client.config.logger.debug "API called: ClassApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
733
1284
|
end
|
734
1285
|
return data, status_code, headers
|
735
1286
|
end
|
736
1287
|
|
737
1288
|
# Get a student submission
|
738
|
-
#
|
739
|
-
# @param
|
740
|
-
# @param
|
741
|
-
# @param submission Unique identifier of the submission
|
1289
|
+
# @param _class [String] Unique identifier of the class
|
1290
|
+
# @param assignment [String] Unique identifier of the assignment
|
1291
|
+
# @param submission [String] Unique identifier of the submission
|
742
1292
|
# @param [Hash] opts the optional parameters
|
743
1293
|
# @return [AssignmentSubmission]
|
744
1294
|
def get_submission(_class, assignment, submission, opts = {})
|
745
1295
|
data, _status_code, _headers = get_submission_with_http_info(_class, assignment, submission, opts)
|
746
|
-
|
1296
|
+
data
|
747
1297
|
end
|
748
1298
|
|
749
1299
|
# Get a student submission
|
750
|
-
#
|
751
|
-
# @param
|
752
|
-
# @param
|
753
|
-
# @param submission Unique identifier of the submission
|
1300
|
+
# @param _class [String] Unique identifier of the class
|
1301
|
+
# @param assignment [String] Unique identifier of the assignment
|
1302
|
+
# @param submission [String] Unique identifier of the submission
|
754
1303
|
# @param [Hash] opts the optional parameters
|
755
|
-
# @return [Array<(AssignmentSubmission,
|
1304
|
+
# @return [Array<(AssignmentSubmission, Integer, Hash)>] AssignmentSubmission data, response status code and response headers
|
756
1305
|
def get_submission_with_http_info(_class, assignment, submission, opts = {})
|
757
1306
|
if @api_client.config.debugging
|
758
|
-
@api_client.config.logger.debug
|
1307
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission ...'
|
759
1308
|
end
|
760
1309
|
# verify the required parameter '_class' is set
|
761
1310
|
if @api_client.config.client_side_validation && _class.nil?
|
@@ -770,57 +1319,211 @@ module FlatApi
|
|
770
1319
|
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission"
|
771
1320
|
end
|
772
1321
|
# resource path
|
773
|
-
local_var_path =
|
1322
|
+
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
1323
|
|
775
1324
|
# query parameters
|
776
|
-
query_params = {}
|
1325
|
+
query_params = opts[:query_params] || {}
|
777
1326
|
|
778
1327
|
# header parameters
|
779
|
-
header_params = {}
|
1328
|
+
header_params = opts[:header_params] || {}
|
780
1329
|
# HTTP header 'Accept' (if needed)
|
781
1330
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
782
|
-
# HTTP header 'Content-Type'
|
783
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
784
1331
|
|
785
1332
|
# form parameters
|
786
|
-
form_params = {}
|
1333
|
+
form_params = opts[:form_params] || {}
|
787
1334
|
|
788
1335
|
# http body (model)
|
789
|
-
post_body =
|
790
|
-
|
791
|
-
|
1336
|
+
post_body = opts[:debug_body]
|
1337
|
+
|
1338
|
+
# return_type
|
1339
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmission'
|
1340
|
+
|
1341
|
+
# auth_names
|
1342
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1343
|
+
|
1344
|
+
new_options = opts.merge(
|
1345
|
+
:operation => :"ClassApi.get_submission",
|
792
1346
|
:header_params => header_params,
|
793
1347
|
:query_params => query_params,
|
794
1348
|
:form_params => form_params,
|
795
1349
|
:body => post_body,
|
796
1350
|
:auth_names => auth_names,
|
797
|
-
:return_type =>
|
1351
|
+
:return_type => return_type
|
1352
|
+
)
|
1353
|
+
|
1354
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
798
1355
|
if @api_client.config.debugging
|
799
1356
|
@api_client.config.logger.debug "API called: ClassApi#get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
800
1357
|
end
|
801
1358
|
return data, status_code, headers
|
802
1359
|
end
|
803
1360
|
|
1361
|
+
# List the feedback comments of a submission
|
1362
|
+
# @param _class [String] Unique identifier of the class
|
1363
|
+
# @param assignment [String] Unique identifier of the assignment
|
1364
|
+
# @param submission [String] Unique identifier of the submission
|
1365
|
+
# @param [Hash] opts the optional parameters
|
1366
|
+
# @return [Array<AssignmentSubmissionComment>]
|
1367
|
+
def get_submission_comments(_class, assignment, submission, opts = {})
|
1368
|
+
data, _status_code, _headers = get_submission_comments_with_http_info(_class, assignment, submission, opts)
|
1369
|
+
data
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
# List the feedback comments of a submission
|
1373
|
+
# @param _class [String] Unique identifier of the class
|
1374
|
+
# @param assignment [String] Unique identifier of the assignment
|
1375
|
+
# @param submission [String] Unique identifier of the submission
|
1376
|
+
# @param [Hash] opts the optional parameters
|
1377
|
+
# @return [Array<(Array<AssignmentSubmissionComment>, Integer, Hash)>] Array<AssignmentSubmissionComment> data, response status code and response headers
|
1378
|
+
def get_submission_comments_with_http_info(_class, assignment, submission, opts = {})
|
1379
|
+
if @api_client.config.debugging
|
1380
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission_comments ...'
|
1381
|
+
end
|
1382
|
+
# verify the required parameter '_class' is set
|
1383
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1384
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission_comments"
|
1385
|
+
end
|
1386
|
+
# verify the required parameter 'assignment' is set
|
1387
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
1388
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission_comments"
|
1389
|
+
end
|
1390
|
+
# verify the required parameter 'submission' is set
|
1391
|
+
if @api_client.config.client_side_validation && submission.nil?
|
1392
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission_comments"
|
1393
|
+
end
|
1394
|
+
# resource path
|
1395
|
+
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))
|
1396
|
+
|
1397
|
+
# query parameters
|
1398
|
+
query_params = opts[:query_params] || {}
|
1399
|
+
|
1400
|
+
# header parameters
|
1401
|
+
header_params = opts[:header_params] || {}
|
1402
|
+
# HTTP header 'Accept' (if needed)
|
1403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1404
|
+
|
1405
|
+
# form parameters
|
1406
|
+
form_params = opts[:form_params] || {}
|
1407
|
+
|
1408
|
+
# http body (model)
|
1409
|
+
post_body = opts[:debug_body]
|
1410
|
+
|
1411
|
+
# return_type
|
1412
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmissionComment>'
|
1413
|
+
|
1414
|
+
# auth_names
|
1415
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1416
|
+
|
1417
|
+
new_options = opts.merge(
|
1418
|
+
:operation => :"ClassApi.get_submission_comments",
|
1419
|
+
:header_params => header_params,
|
1420
|
+
:query_params => query_params,
|
1421
|
+
:form_params => form_params,
|
1422
|
+
:body => post_body,
|
1423
|
+
:auth_names => auth_names,
|
1424
|
+
:return_type => return_type
|
1425
|
+
)
|
1426
|
+
|
1427
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1428
|
+
if @api_client.config.debugging
|
1429
|
+
@api_client.config.logger.debug "API called: ClassApi#get_submission_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1430
|
+
end
|
1431
|
+
return data, status_code, headers
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
# Get the history of the submission
|
1435
|
+
# For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.
|
1436
|
+
# @param _class [String] Unique identifier of the class
|
1437
|
+
# @param assignment [String] Unique identifier of the assignment
|
1438
|
+
# @param submission [String] Unique identifier of the submission
|
1439
|
+
# @param [Hash] opts the optional parameters
|
1440
|
+
# @return [Array<AssignmentSubmissionHistory>]
|
1441
|
+
def get_submission_history(_class, assignment, submission, opts = {})
|
1442
|
+
data, _status_code, _headers = get_submission_history_with_http_info(_class, assignment, submission, opts)
|
1443
|
+
data
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
# Get the history of the submission
|
1447
|
+
# For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories.
|
1448
|
+
# @param _class [String] Unique identifier of the class
|
1449
|
+
# @param assignment [String] Unique identifier of the assignment
|
1450
|
+
# @param submission [String] Unique identifier of the submission
|
1451
|
+
# @param [Hash] opts the optional parameters
|
1452
|
+
# @return [Array<(Array<AssignmentSubmissionHistory>, Integer, Hash)>] Array<AssignmentSubmissionHistory> data, response status code and response headers
|
1453
|
+
def get_submission_history_with_http_info(_class, assignment, submission, opts = {})
|
1454
|
+
if @api_client.config.debugging
|
1455
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submission_history ...'
|
1456
|
+
end
|
1457
|
+
# verify the required parameter '_class' is set
|
1458
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1459
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission_history"
|
1460
|
+
end
|
1461
|
+
# verify the required parameter 'assignment' is set
|
1462
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
1463
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission_history"
|
1464
|
+
end
|
1465
|
+
# verify the required parameter 'submission' is set
|
1466
|
+
if @api_client.config.client_side_validation && submission.nil?
|
1467
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission_history"
|
1468
|
+
end
|
1469
|
+
# resource path
|
1470
|
+
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))
|
1471
|
+
|
1472
|
+
# query parameters
|
1473
|
+
query_params = opts[:query_params] || {}
|
1474
|
+
|
1475
|
+
# header parameters
|
1476
|
+
header_params = opts[:header_params] || {}
|
1477
|
+
# HTTP header 'Accept' (if needed)
|
1478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1479
|
+
|
1480
|
+
# form parameters
|
1481
|
+
form_params = opts[:form_params] || {}
|
1482
|
+
|
1483
|
+
# http body (model)
|
1484
|
+
post_body = opts[:debug_body]
|
1485
|
+
|
1486
|
+
# return_type
|
1487
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmissionHistory>'
|
1488
|
+
|
1489
|
+
# auth_names
|
1490
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1491
|
+
|
1492
|
+
new_options = opts.merge(
|
1493
|
+
:operation => :"ClassApi.get_submission_history",
|
1494
|
+
:header_params => header_params,
|
1495
|
+
:query_params => query_params,
|
1496
|
+
:form_params => form_params,
|
1497
|
+
:body => post_body,
|
1498
|
+
:auth_names => auth_names,
|
1499
|
+
:return_type => return_type
|
1500
|
+
)
|
1501
|
+
|
1502
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1503
|
+
if @api_client.config.debugging
|
1504
|
+
@api_client.config.logger.debug "API called: ClassApi#get_submission_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1505
|
+
end
|
1506
|
+
return data, status_code, headers
|
1507
|
+
end
|
1508
|
+
|
804
1509
|
# List the students' submissions
|
805
|
-
#
|
806
|
-
# @param
|
807
|
-
# @param assignment Unique identifier of the assignment
|
1510
|
+
# @param _class [String] Unique identifier of the class
|
1511
|
+
# @param assignment [String] Unique identifier of the assignment
|
808
1512
|
# @param [Hash] opts the optional parameters
|
809
1513
|
# @return [Array<AssignmentSubmission>]
|
810
1514
|
def get_submissions(_class, assignment, opts = {})
|
811
1515
|
data, _status_code, _headers = get_submissions_with_http_info(_class, assignment, opts)
|
812
|
-
|
1516
|
+
data
|
813
1517
|
end
|
814
1518
|
|
815
1519
|
# List the students' submissions
|
816
|
-
#
|
817
|
-
# @param
|
818
|
-
# @param assignment Unique identifier of the assignment
|
1520
|
+
# @param _class [String] Unique identifier of the class
|
1521
|
+
# @param assignment [String] Unique identifier of the assignment
|
819
1522
|
# @param [Hash] opts the optional parameters
|
820
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
1523
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
821
1524
|
def get_submissions_with_http_info(_class, assignment, opts = {})
|
822
1525
|
if @api_client.config.debugging
|
823
|
-
@api_client.config.logger.debug
|
1526
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.get_submissions ...'
|
824
1527
|
end
|
825
1528
|
# verify the required parameter '_class' is set
|
826
1529
|
if @api_client.config.client_side_validation && _class.nil?
|
@@ -831,31 +1534,39 @@ module FlatApi
|
|
831
1534
|
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submissions"
|
832
1535
|
end
|
833
1536
|
# resource path
|
834
|
-
local_var_path =
|
1537
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/submissions'.sub('{' + 'class' + '}', CGI.escape(_class.to_s)).sub('{' + 'assignment' + '}', CGI.escape(assignment.to_s))
|
835
1538
|
|
836
1539
|
# query parameters
|
837
|
-
query_params = {}
|
1540
|
+
query_params = opts[:query_params] || {}
|
838
1541
|
|
839
1542
|
# header parameters
|
840
|
-
header_params = {}
|
1543
|
+
header_params = opts[:header_params] || {}
|
841
1544
|
# HTTP header 'Accept' (if needed)
|
842
1545
|
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'])
|
845
1546
|
|
846
1547
|
# form parameters
|
847
|
-
form_params = {}
|
1548
|
+
form_params = opts[:form_params] || {}
|
848
1549
|
|
849
1550
|
# http body (model)
|
850
|
-
post_body =
|
851
|
-
|
852
|
-
|
1551
|
+
post_body = opts[:debug_body]
|
1552
|
+
|
1553
|
+
# return_type
|
1554
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
1555
|
+
|
1556
|
+
# auth_names
|
1557
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1558
|
+
|
1559
|
+
new_options = opts.merge(
|
1560
|
+
:operation => :"ClassApi.get_submissions",
|
853
1561
|
:header_params => header_params,
|
854
1562
|
:query_params => query_params,
|
855
1563
|
:form_params => form_params,
|
856
1564
|
:body => post_body,
|
857
1565
|
:auth_names => auth_names,
|
858
|
-
:return_type =>
|
1566
|
+
:return_type => return_type
|
1567
|
+
)
|
1568
|
+
|
1569
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
859
1570
|
if @api_client.config.debugging
|
860
1571
|
@api_client.config.logger.debug "API called: ClassApi#get_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
861
1572
|
end
|
@@ -863,54 +1574,60 @@ module FlatApi
|
|
863
1574
|
end
|
864
1575
|
|
865
1576
|
# Assignments listing
|
866
|
-
#
|
867
|
-
# @param _class Unique identifier of the class
|
1577
|
+
# @param _class [String] Unique identifier of the class
|
868
1578
|
# @param [Hash] opts the optional parameters
|
869
|
-
# @return [Array<
|
1579
|
+
# @return [Array<ClassAssignment>]
|
870
1580
|
def list_assignments(_class, opts = {})
|
871
1581
|
data, _status_code, _headers = list_assignments_with_http_info(_class, opts)
|
872
|
-
|
1582
|
+
data
|
873
1583
|
end
|
874
1584
|
|
875
1585
|
# Assignments listing
|
876
|
-
#
|
877
|
-
# @param _class Unique identifier of the class
|
1586
|
+
# @param _class [String] Unique identifier of the class
|
878
1587
|
# @param [Hash] opts the optional parameters
|
879
|
-
# @return [Array<(Array<
|
1588
|
+
# @return [Array<(Array<ClassAssignment>, Integer, Hash)>] Array<ClassAssignment> data, response status code and response headers
|
880
1589
|
def list_assignments_with_http_info(_class, opts = {})
|
881
1590
|
if @api_client.config.debugging
|
882
|
-
@api_client.config.logger.debug
|
1591
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_assignments ...'
|
883
1592
|
end
|
884
1593
|
# verify the required parameter '_class' is set
|
885
1594
|
if @api_client.config.client_side_validation && _class.nil?
|
886
1595
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_assignments"
|
887
1596
|
end
|
888
1597
|
# resource path
|
889
|
-
local_var_path =
|
1598
|
+
local_var_path = '/classes/{class}/assignments'.sub('{' + 'class' + '}', CGI.escape(_class.to_s))
|
890
1599
|
|
891
1600
|
# query parameters
|
892
|
-
query_params = {}
|
1601
|
+
query_params = opts[:query_params] || {}
|
893
1602
|
|
894
1603
|
# header parameters
|
895
|
-
header_params = {}
|
1604
|
+
header_params = opts[:header_params] || {}
|
896
1605
|
# HTTP header 'Accept' (if needed)
|
897
1606
|
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'])
|
900
1607
|
|
901
1608
|
# form parameters
|
902
|
-
form_params = {}
|
1609
|
+
form_params = opts[:form_params] || {}
|
903
1610
|
|
904
1611
|
# http body (model)
|
905
|
-
post_body =
|
906
|
-
|
907
|
-
|
1612
|
+
post_body = opts[:debug_body]
|
1613
|
+
|
1614
|
+
# return_type
|
1615
|
+
return_type = opts[:debug_return_type] || 'Array<ClassAssignment>'
|
1616
|
+
|
1617
|
+
# auth_names
|
1618
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1619
|
+
|
1620
|
+
new_options = opts.merge(
|
1621
|
+
:operation => :"ClassApi.list_assignments",
|
908
1622
|
:header_params => header_params,
|
909
1623
|
:query_params => query_params,
|
910
1624
|
:form_params => form_params,
|
911
1625
|
:body => post_body,
|
912
1626
|
:auth_names => auth_names,
|
913
|
-
:return_type =>
|
1627
|
+
:return_type => return_type
|
1628
|
+
)
|
1629
|
+
|
1630
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
914
1631
|
if @api_client.config.debugging
|
915
1632
|
@api_client.config.logger.debug "API called: ClassApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
916
1633
|
end
|
@@ -919,24 +1636,24 @@ module FlatApi
|
|
919
1636
|
|
920
1637
|
# List the submissions for a student
|
921
1638
|
# 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
|
1639
|
+
# @param _class [String] Unique identifier of the class
|
1640
|
+
# @param user [String] Unique identifier of the user
|
924
1641
|
# @param [Hash] opts the optional parameters
|
925
1642
|
# @return [Array<AssignmentSubmission>]
|
926
1643
|
def list_class_student_submissions(_class, user, opts = {})
|
927
1644
|
data, _status_code, _headers = list_class_student_submissions_with_http_info(_class, user, opts)
|
928
|
-
|
1645
|
+
data
|
929
1646
|
end
|
930
1647
|
|
931
1648
|
# List the submissions for a student
|
932
1649
|
# 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
|
1650
|
+
# @param _class [String] Unique identifier of the class
|
1651
|
+
# @param user [String] Unique identifier of the user
|
935
1652
|
# @param [Hash] opts the optional parameters
|
936
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
1653
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
937
1654
|
def list_class_student_submissions_with_http_info(_class, user, opts = {})
|
938
1655
|
if @api_client.config.debugging
|
939
|
-
@api_client.config.logger.debug
|
1656
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_class_student_submissions ...'
|
940
1657
|
end
|
941
1658
|
# verify the required parameter '_class' is set
|
942
1659
|
if @api_client.config.client_side_validation && _class.nil?
|
@@ -947,31 +1664,39 @@ module FlatApi
|
|
947
1664
|
fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.list_class_student_submissions"
|
948
1665
|
end
|
949
1666
|
# resource path
|
950
|
-
local_var_path =
|
1667
|
+
local_var_path = '/classes/{class}/students/{user}/submissions'.sub('{' + 'class' + '}', CGI.escape(_class.to_s)).sub('{' + 'user' + '}', CGI.escape(user.to_s))
|
951
1668
|
|
952
1669
|
# query parameters
|
953
|
-
query_params = {}
|
1670
|
+
query_params = opts[:query_params] || {}
|
954
1671
|
|
955
1672
|
# header parameters
|
956
|
-
header_params = {}
|
1673
|
+
header_params = opts[:header_params] || {}
|
957
1674
|
# HTTP header 'Accept' (if needed)
|
958
1675
|
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'])
|
961
1676
|
|
962
1677
|
# form parameters
|
963
|
-
form_params = {}
|
1678
|
+
form_params = opts[:form_params] || {}
|
964
1679
|
|
965
1680
|
# http body (model)
|
966
|
-
post_body =
|
967
|
-
|
968
|
-
|
1681
|
+
post_body = opts[:debug_body]
|
1682
|
+
|
1683
|
+
# return_type
|
1684
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
1685
|
+
|
1686
|
+
# auth_names
|
1687
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1688
|
+
|
1689
|
+
new_options = opts.merge(
|
1690
|
+
:operation => :"ClassApi.list_class_student_submissions",
|
969
1691
|
:header_params => header_params,
|
970
1692
|
:query_params => query_params,
|
971
1693
|
:form_params => form_params,
|
972
1694
|
:body => post_body,
|
973
1695
|
:auth_names => auth_names,
|
974
|
-
:return_type =>
|
1696
|
+
:return_type => return_type
|
1697
|
+
)
|
1698
|
+
|
1699
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
975
1700
|
if @api_client.config.debugging
|
976
1701
|
@api_client.config.logger.debug "API called: ClassApi#list_class_student_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
977
1702
|
end
|
@@ -979,109 +1704,277 @@ module FlatApi
|
|
979
1704
|
end
|
980
1705
|
|
981
1706
|
# List the classes available for the current user
|
982
|
-
#
|
983
1707
|
# @param [Hash] opts the optional parameters
|
984
|
-
# @option opts [String] :state Filter the classes by state (default to active)
|
1708
|
+
# @option opts [String] :state Filter the classes by state (default to 'active')
|
985
1709
|
# @return [Array<ClassDetails>]
|
986
1710
|
def list_classes(opts = {})
|
987
1711
|
data, _status_code, _headers = list_classes_with_http_info(opts)
|
988
|
-
|
1712
|
+
data
|
989
1713
|
end
|
990
1714
|
|
991
1715
|
# List the classes available for the current user
|
992
|
-
#
|
993
1716
|
# @param [Hash] opts the optional parameters
|
994
|
-
# @option opts [String] :state Filter the classes by state
|
995
|
-
# @return [Array<(Array<ClassDetails>,
|
1717
|
+
# @option opts [String] :state Filter the classes by state (default to 'active')
|
1718
|
+
# @return [Array<(Array<ClassDetails>, Integer, Hash)>] Array<ClassDetails> data, response status code and response headers
|
996
1719
|
def list_classes_with_http_info(opts = {})
|
997
1720
|
if @api_client.config.debugging
|
998
|
-
@api_client.config.logger.debug
|
1721
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.list_classes ...'
|
999
1722
|
end
|
1000
|
-
|
1001
|
-
|
1723
|
+
allowable_values = ["active", "inactive", "archived"]
|
1724
|
+
if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
|
1725
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
|
1002
1726
|
end
|
1003
1727
|
# resource path
|
1004
|
-
local_var_path =
|
1728
|
+
local_var_path = '/classes'
|
1005
1729
|
|
1006
1730
|
# query parameters
|
1007
|
-
query_params = {}
|
1731
|
+
query_params = opts[:query_params] || {}
|
1008
1732
|
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
1009
1733
|
|
1010
1734
|
# header parameters
|
1011
|
-
header_params = {}
|
1735
|
+
header_params = opts[:header_params] || {}
|
1012
1736
|
# HTTP header 'Accept' (if needed)
|
1013
1737
|
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'])
|
1016
1738
|
|
1017
1739
|
# form parameters
|
1018
|
-
form_params = {}
|
1740
|
+
form_params = opts[:form_params] || {}
|
1019
1741
|
|
1020
1742
|
# http body (model)
|
1021
|
-
post_body =
|
1022
|
-
|
1023
|
-
|
1743
|
+
post_body = opts[:debug_body]
|
1744
|
+
|
1745
|
+
# return_type
|
1746
|
+
return_type = opts[:debug_return_type] || 'Array<ClassDetails>'
|
1747
|
+
|
1748
|
+
# auth_names
|
1749
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1750
|
+
|
1751
|
+
new_options = opts.merge(
|
1752
|
+
:operation => :"ClassApi.list_classes",
|
1024
1753
|
:header_params => header_params,
|
1025
1754
|
:query_params => query_params,
|
1026
1755
|
:form_params => form_params,
|
1027
1756
|
:body => post_body,
|
1028
1757
|
:auth_names => auth_names,
|
1029
|
-
:return_type =>
|
1758
|
+
:return_type => return_type
|
1759
|
+
)
|
1760
|
+
|
1761
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1030
1762
|
if @api_client.config.debugging
|
1031
1763
|
@api_client.config.logger.debug "API called: ClassApi#list_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1032
1764
|
end
|
1033
1765
|
return data, status_code, headers
|
1034
1766
|
end
|
1035
1767
|
|
1768
|
+
# Add a feedback comment to a submission
|
1769
|
+
# @param _class [String] Unique identifier of the class
|
1770
|
+
# @param assignment [String] Unique identifier of the assignment
|
1771
|
+
# @param submission [String] Unique identifier of the submission
|
1772
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
1773
|
+
# @param [Hash] opts the optional parameters
|
1774
|
+
# @return [AssignmentSubmissionComment]
|
1775
|
+
def post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, opts = {})
|
1776
|
+
data, _status_code, _headers = post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, opts)
|
1777
|
+
data
|
1778
|
+
end
|
1779
|
+
|
1780
|
+
# Add a feedback comment to a submission
|
1781
|
+
# @param _class [String] Unique identifier of the class
|
1782
|
+
# @param assignment [String] Unique identifier of the assignment
|
1783
|
+
# @param submission [String] Unique identifier of the submission
|
1784
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
1785
|
+
# @param [Hash] opts the optional parameters
|
1786
|
+
# @return [Array<(AssignmentSubmissionComment, Integer, Hash)>] AssignmentSubmissionComment data, response status code and response headers
|
1787
|
+
def post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, opts = {})
|
1788
|
+
if @api_client.config.debugging
|
1789
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.post_submission_comment ...'
|
1790
|
+
end
|
1791
|
+
# verify the required parameter '_class' is set
|
1792
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1793
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.post_submission_comment"
|
1794
|
+
end
|
1795
|
+
# verify the required parameter 'assignment' is set
|
1796
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
1797
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.post_submission_comment"
|
1798
|
+
end
|
1799
|
+
# verify the required parameter 'submission' is set
|
1800
|
+
if @api_client.config.client_side_validation && submission.nil?
|
1801
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.post_submission_comment"
|
1802
|
+
end
|
1803
|
+
# verify the required parameter 'assignment_submission_comment_creation' is set
|
1804
|
+
if @api_client.config.client_side_validation && assignment_submission_comment_creation.nil?
|
1805
|
+
fail ArgumentError, "Missing the required parameter 'assignment_submission_comment_creation' when calling ClassApi.post_submission_comment"
|
1806
|
+
end
|
1807
|
+
# resource path
|
1808
|
+
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))
|
1809
|
+
|
1810
|
+
# query parameters
|
1811
|
+
query_params = opts[:query_params] || {}
|
1812
|
+
|
1813
|
+
# header parameters
|
1814
|
+
header_params = opts[:header_params] || {}
|
1815
|
+
# HTTP header 'Accept' (if needed)
|
1816
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1817
|
+
# HTTP header 'Content-Type'
|
1818
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1819
|
+
if !content_type.nil?
|
1820
|
+
header_params['Content-Type'] = content_type
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# form parameters
|
1824
|
+
form_params = opts[:form_params] || {}
|
1825
|
+
|
1826
|
+
# http body (model)
|
1827
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assignment_submission_comment_creation)
|
1828
|
+
|
1829
|
+
# return_type
|
1830
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmissionComment'
|
1831
|
+
|
1832
|
+
# auth_names
|
1833
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1834
|
+
|
1835
|
+
new_options = opts.merge(
|
1836
|
+
:operation => :"ClassApi.post_submission_comment",
|
1837
|
+
:header_params => header_params,
|
1838
|
+
:query_params => query_params,
|
1839
|
+
:form_params => form_params,
|
1840
|
+
:body => post_body,
|
1841
|
+
:auth_names => auth_names,
|
1842
|
+
:return_type => return_type
|
1843
|
+
)
|
1844
|
+
|
1845
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1846
|
+
if @api_client.config.debugging
|
1847
|
+
@api_client.config.logger.debug "API called: ClassApi#post_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1848
|
+
end
|
1849
|
+
return data, status_code, headers
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
# Unarchive the assignment.
|
1853
|
+
# Mark the assignment as `active`.
|
1854
|
+
# @param _class [String] Unique identifier of the class
|
1855
|
+
# @param assignment [String] Unique identifier of the assignment
|
1856
|
+
# @param [Hash] opts the optional parameters
|
1857
|
+
# @return [Assignment]
|
1858
|
+
def unarchive_assignment(_class, assignment, opts = {})
|
1859
|
+
data, _status_code, _headers = unarchive_assignment_with_http_info(_class, assignment, opts)
|
1860
|
+
data
|
1861
|
+
end
|
1862
|
+
|
1863
|
+
# Unarchive the assignment.
|
1864
|
+
# Mark the assignment as `active`.
|
1865
|
+
# @param _class [String] Unique identifier of the class
|
1866
|
+
# @param assignment [String] Unique identifier of the assignment
|
1867
|
+
# @param [Hash] opts the optional parameters
|
1868
|
+
# @return [Array<(Assignment, Integer, Hash)>] Assignment data, response status code and response headers
|
1869
|
+
def unarchive_assignment_with_http_info(_class, assignment, opts = {})
|
1870
|
+
if @api_client.config.debugging
|
1871
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.unarchive_assignment ...'
|
1872
|
+
end
|
1873
|
+
# verify the required parameter '_class' is set
|
1874
|
+
if @api_client.config.client_side_validation && _class.nil?
|
1875
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_assignment"
|
1876
|
+
end
|
1877
|
+
# verify the required parameter 'assignment' is set
|
1878
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
1879
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.unarchive_assignment"
|
1880
|
+
end
|
1881
|
+
# resource path
|
1882
|
+
local_var_path = '/classes/{class}/assignments/{assignment}/archive'.sub('{' + 'class' + '}', CGI.escape(_class.to_s)).sub('{' + 'assignment' + '}', CGI.escape(assignment.to_s))
|
1883
|
+
|
1884
|
+
# query parameters
|
1885
|
+
query_params = opts[:query_params] || {}
|
1886
|
+
|
1887
|
+
# header parameters
|
1888
|
+
header_params = opts[:header_params] || {}
|
1889
|
+
# HTTP header 'Accept' (if needed)
|
1890
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1891
|
+
|
1892
|
+
# form parameters
|
1893
|
+
form_params = opts[:form_params] || {}
|
1894
|
+
|
1895
|
+
# http body (model)
|
1896
|
+
post_body = opts[:debug_body]
|
1897
|
+
|
1898
|
+
# return_type
|
1899
|
+
return_type = opts[:debug_return_type] || 'Assignment'
|
1900
|
+
|
1901
|
+
# auth_names
|
1902
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1903
|
+
|
1904
|
+
new_options = opts.merge(
|
1905
|
+
:operation => :"ClassApi.unarchive_assignment",
|
1906
|
+
:header_params => header_params,
|
1907
|
+
:query_params => query_params,
|
1908
|
+
:form_params => form_params,
|
1909
|
+
:body => post_body,
|
1910
|
+
:auth_names => auth_names,
|
1911
|
+
:return_type => return_type
|
1912
|
+
)
|
1913
|
+
|
1914
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1915
|
+
if @api_client.config.debugging
|
1916
|
+
@api_client.config.logger.debug "API called: ClassApi#unarchive_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1917
|
+
end
|
1918
|
+
return data, status_code, headers
|
1919
|
+
end
|
1920
|
+
|
1036
1921
|
# Unarchive the class
|
1037
1922
|
# 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
|
1923
|
+
# @param _class [String] Unique identifier of the class
|
1039
1924
|
# @param [Hash] opts the optional parameters
|
1040
1925
|
# @return [ClassDetails]
|
1041
1926
|
def unarchive_class(_class, opts = {})
|
1042
1927
|
data, _status_code, _headers = unarchive_class_with_http_info(_class, opts)
|
1043
|
-
|
1928
|
+
data
|
1044
1929
|
end
|
1045
1930
|
|
1046
1931
|
# Unarchive the class
|
1047
1932
|
# 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
|
1933
|
+
# @param _class [String] Unique identifier of the class
|
1049
1934
|
# @param [Hash] opts the optional parameters
|
1050
|
-
# @return [Array<(ClassDetails,
|
1935
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
1051
1936
|
def unarchive_class_with_http_info(_class, opts = {})
|
1052
1937
|
if @api_client.config.debugging
|
1053
|
-
@api_client.config.logger.debug
|
1938
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.unarchive_class ...'
|
1054
1939
|
end
|
1055
1940
|
# verify the required parameter '_class' is set
|
1056
1941
|
if @api_client.config.client_side_validation && _class.nil?
|
1057
1942
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_class"
|
1058
1943
|
end
|
1059
1944
|
# resource path
|
1060
|
-
local_var_path =
|
1945
|
+
local_var_path = '/classes/{class}/archive'.sub('{' + 'class' + '}', CGI.escape(_class.to_s))
|
1061
1946
|
|
1062
1947
|
# query parameters
|
1063
|
-
query_params = {}
|
1948
|
+
query_params = opts[:query_params] || {}
|
1064
1949
|
|
1065
1950
|
# header parameters
|
1066
|
-
header_params = {}
|
1951
|
+
header_params = opts[:header_params] || {}
|
1067
1952
|
# HTTP header 'Accept' (if needed)
|
1068
1953
|
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'])
|
1071
1954
|
|
1072
1955
|
# form parameters
|
1073
|
-
form_params = {}
|
1956
|
+
form_params = opts[:form_params] || {}
|
1074
1957
|
|
1075
1958
|
# http body (model)
|
1076
|
-
post_body =
|
1077
|
-
|
1078
|
-
|
1959
|
+
post_body = opts[:debug_body]
|
1960
|
+
|
1961
|
+
# return_type
|
1962
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
1963
|
+
|
1964
|
+
# auth_names
|
1965
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1966
|
+
|
1967
|
+
new_options = opts.merge(
|
1968
|
+
:operation => :"ClassApi.unarchive_class",
|
1079
1969
|
:header_params => header_params,
|
1080
1970
|
:query_params => query_params,
|
1081
1971
|
:form_params => form_params,
|
1082
1972
|
:body => post_body,
|
1083
1973
|
:auth_names => auth_names,
|
1084
|
-
:return_type =>
|
1974
|
+
:return_type => return_type
|
1975
|
+
)
|
1976
|
+
|
1977
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1085
1978
|
if @api_client.config.debugging
|
1086
1979
|
@api_client.config.logger.debug "API called: ClassApi#unarchive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1087
1980
|
end
|
@@ -1090,59 +1983,166 @@ module FlatApi
|
|
1090
1983
|
|
1091
1984
|
# Update the class
|
1092
1985
|
# Update the meta information of the class
|
1093
|
-
# @param _class Unique identifier of the class
|
1986
|
+
# @param _class [String] Unique identifier of the class
|
1987
|
+
# @param body [ClassUpdate] Details of the Class
|
1094
1988
|
# @param [Hash] opts the optional parameters
|
1095
|
-
# @option opts [ClassUpdate] :body Details of the Class
|
1096
1989
|
# @return [ClassDetails]
|
1097
|
-
def update_class(_class, opts = {})
|
1098
|
-
data, _status_code, _headers = update_class_with_http_info(_class, opts)
|
1099
|
-
|
1990
|
+
def update_class(_class, body, opts = {})
|
1991
|
+
data, _status_code, _headers = update_class_with_http_info(_class, body, opts)
|
1992
|
+
data
|
1100
1993
|
end
|
1101
1994
|
|
1102
1995
|
# Update the class
|
1103
1996
|
# Update the meta information of the class
|
1104
|
-
# @param _class Unique identifier of the class
|
1997
|
+
# @param _class [String] Unique identifier of the class
|
1998
|
+
# @param body [ClassUpdate] Details of the Class
|
1105
1999
|
# @param [Hash] opts the optional parameters
|
1106
|
-
# @
|
1107
|
-
|
1108
|
-
def update_class_with_http_info(_class, opts = {})
|
2000
|
+
# @return [Array<(ClassDetails, Integer, Hash)>] ClassDetails data, response status code and response headers
|
2001
|
+
def update_class_with_http_info(_class, body, opts = {})
|
1109
2002
|
if @api_client.config.debugging
|
1110
|
-
@api_client.config.logger.debug
|
2003
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.update_class ...'
|
1111
2004
|
end
|
1112
2005
|
# verify the required parameter '_class' is set
|
1113
2006
|
if @api_client.config.client_side_validation && _class.nil?
|
1114
2007
|
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class"
|
1115
2008
|
end
|
2009
|
+
# verify the required parameter 'body' is set
|
2010
|
+
if @api_client.config.client_side_validation && body.nil?
|
2011
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.update_class"
|
2012
|
+
end
|
1116
2013
|
# resource path
|
1117
|
-
local_var_path =
|
2014
|
+
local_var_path = '/classes/{class}'.sub('{' + 'class' + '}', CGI.escape(_class.to_s))
|
1118
2015
|
|
1119
2016
|
# query parameters
|
1120
|
-
query_params = {}
|
2017
|
+
query_params = opts[:query_params] || {}
|
1121
2018
|
|
1122
2019
|
# header parameters
|
1123
|
-
header_params = {}
|
2020
|
+
header_params = opts[:header_params] || {}
|
1124
2021
|
# HTTP header 'Accept' (if needed)
|
1125
2022
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1126
2023
|
# HTTP header 'Content-Type'
|
1127
|
-
|
2024
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2025
|
+
if !content_type.nil?
|
2026
|
+
header_params['Content-Type'] = content_type
|
2027
|
+
end
|
1128
2028
|
|
1129
2029
|
# form parameters
|
1130
|
-
form_params = {}
|
2030
|
+
form_params = opts[:form_params] || {}
|
1131
2031
|
|
1132
2032
|
# http body (model)
|
1133
|
-
post_body = @api_client.object_to_http_body(
|
1134
|
-
|
1135
|
-
|
2033
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
2034
|
+
|
2035
|
+
# return_type
|
2036
|
+
return_type = opts[:debug_return_type] || 'ClassDetails'
|
2037
|
+
|
2038
|
+
# auth_names
|
2039
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
2040
|
+
|
2041
|
+
new_options = opts.merge(
|
2042
|
+
:operation => :"ClassApi.update_class",
|
1136
2043
|
:header_params => header_params,
|
1137
2044
|
:query_params => query_params,
|
1138
2045
|
:form_params => form_params,
|
1139
2046
|
:body => post_body,
|
1140
2047
|
:auth_names => auth_names,
|
1141
|
-
:return_type =>
|
2048
|
+
:return_type => return_type
|
2049
|
+
)
|
2050
|
+
|
2051
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1142
2052
|
if @api_client.config.debugging
|
1143
2053
|
@api_client.config.logger.debug "API called: ClassApi#update_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1144
2054
|
end
|
1145
2055
|
return data, status_code, headers
|
1146
2056
|
end
|
2057
|
+
|
2058
|
+
# Update a feedback comment to a submission
|
2059
|
+
# @param _class [String] Unique identifier of the class
|
2060
|
+
# @param assignment [String] Unique identifier of the assignment
|
2061
|
+
# @param submission [String] Unique identifier of the submission
|
2062
|
+
# @param comment [String] Unique identifier of the comment
|
2063
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
2064
|
+
# @param [Hash] opts the optional parameters
|
2065
|
+
# @return [AssignmentSubmissionComment]
|
2066
|
+
def update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, opts = {})
|
2067
|
+
data, _status_code, _headers = update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, opts)
|
2068
|
+
data
|
2069
|
+
end
|
2070
|
+
|
2071
|
+
# Update a feedback comment to a submission
|
2072
|
+
# @param _class [String] Unique identifier of the class
|
2073
|
+
# @param assignment [String] Unique identifier of the assignment
|
2074
|
+
# @param submission [String] Unique identifier of the submission
|
2075
|
+
# @param comment [String] Unique identifier of the comment
|
2076
|
+
# @param assignment_submission_comment_creation [AssignmentSubmissionCommentCreation]
|
2077
|
+
# @param [Hash] opts the optional parameters
|
2078
|
+
# @return [Array<(AssignmentSubmissionComment, Integer, Hash)>] AssignmentSubmissionComment data, response status code and response headers
|
2079
|
+
def update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, opts = {})
|
2080
|
+
if @api_client.config.debugging
|
2081
|
+
@api_client.config.logger.debug 'Calling API: ClassApi.update_submission_comment ...'
|
2082
|
+
end
|
2083
|
+
# verify the required parameter '_class' is set
|
2084
|
+
if @api_client.config.client_side_validation && _class.nil?
|
2085
|
+
fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_submission_comment"
|
2086
|
+
end
|
2087
|
+
# verify the required parameter 'assignment' is set
|
2088
|
+
if @api_client.config.client_side_validation && assignment.nil?
|
2089
|
+
fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.update_submission_comment"
|
2090
|
+
end
|
2091
|
+
# verify the required parameter 'submission' is set
|
2092
|
+
if @api_client.config.client_side_validation && submission.nil?
|
2093
|
+
fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.update_submission_comment"
|
2094
|
+
end
|
2095
|
+
# verify the required parameter 'comment' is set
|
2096
|
+
if @api_client.config.client_side_validation && comment.nil?
|
2097
|
+
fail ArgumentError, "Missing the required parameter 'comment' when calling ClassApi.update_submission_comment"
|
2098
|
+
end
|
2099
|
+
# verify the required parameter 'assignment_submission_comment_creation' is set
|
2100
|
+
if @api_client.config.client_side_validation && assignment_submission_comment_creation.nil?
|
2101
|
+
fail ArgumentError, "Missing the required parameter 'assignment_submission_comment_creation' when calling ClassApi.update_submission_comment"
|
2102
|
+
end
|
2103
|
+
# resource path
|
2104
|
+
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))
|
2105
|
+
|
2106
|
+
# query parameters
|
2107
|
+
query_params = opts[:query_params] || {}
|
2108
|
+
|
2109
|
+
# header parameters
|
2110
|
+
header_params = opts[:header_params] || {}
|
2111
|
+
# HTTP header 'Accept' (if needed)
|
2112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2113
|
+
# HTTP header 'Content-Type'
|
2114
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2115
|
+
if !content_type.nil?
|
2116
|
+
header_params['Content-Type'] = content_type
|
2117
|
+
end
|
2118
|
+
|
2119
|
+
# form parameters
|
2120
|
+
form_params = opts[:form_params] || {}
|
2121
|
+
|
2122
|
+
# http body (model)
|
2123
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(assignment_submission_comment_creation)
|
2124
|
+
|
2125
|
+
# return_type
|
2126
|
+
return_type = opts[:debug_return_type] || 'AssignmentSubmissionComment'
|
2127
|
+
|
2128
|
+
# auth_names
|
2129
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
2130
|
+
|
2131
|
+
new_options = opts.merge(
|
2132
|
+
:operation => :"ClassApi.update_submission_comment",
|
2133
|
+
:header_params => header_params,
|
2134
|
+
:query_params => query_params,
|
2135
|
+
:form_params => form_params,
|
2136
|
+
:body => post_body,
|
2137
|
+
:auth_names => auth_names,
|
2138
|
+
:return_type => return_type
|
2139
|
+
)
|
2140
|
+
|
2141
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
2142
|
+
if @api_client.config.debugging
|
2143
|
+
@api_client.config.logger.debug "API called: ClassApi#update_submission_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2144
|
+
end
|
2145
|
+
return data, status_code, headers
|
2146
|
+
end
|
1147
2147
|
end
|
1148
2148
|
end
|