flat_api 0.3.5 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +69 -0
- data/LICENSE +201 -0
- data/README.md +92 -0
- data/lib/flat_api/api/account_api.rb +4 -4
- data/lib/flat_api/api/class_api.rb +281 -63
- data/lib/flat_api/api/collection_api.rb +63 -50
- data/lib/flat_api/api/edu_resources_api.rb +38 -26
- data/lib/flat_api/api/group_api.rb +432 -9
- data/lib/flat_api/api/omr_api.rb +894 -0
- data/lib/flat_api/api/organization_api.rb +307 -35
- data/lib/flat_api/api/score_api.rb +129 -80
- data/lib/flat_api/api/task_api.rb +5 -5
- data/lib/flat_api/api/user_api.rb +45 -14
- data/lib/flat_api/api_client.rb +169 -96
- data/lib/flat_api/api_error.rb +3 -3
- data/lib/flat_api/api_model_base.rb +88 -0
- data/lib/flat_api/client.rb +69 -0
- data/lib/flat_api/configuration.rb +124 -25
- data/lib/flat_api/errors.rb +86 -0
- data/lib/flat_api/models/add_group_user200_response.rb +148 -0
- data/lib/flat_api/models/add_group_user_request.rb +165 -0
- data/lib/flat_api/models/api_access_token.rb +13 -80
- data/lib/flat_api/models/app_scopes.rb +6 -4
- data/lib/flat_api/models/assignment.rb +190 -85
- data/lib/flat_api/models/assignment_capabilities.rb +53 -80
- data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +33 -80
- data/lib/flat_api/models/assignment_copy.rb +5 -6
- data/lib/flat_api/models/assignment_copy_response.rb +187 -82
- data/lib/flat_api/models/assignment_copy_to_class.rb +23 -80
- data/lib/flat_api/models/assignment_copy_to_resource_library.rb +23 -80
- data/lib/flat_api/models/assignment_group.rb +232 -0
- data/lib/flat_api/models/assignment_submission.rb +104 -81
- data/lib/flat_api/models/assignment_submission_comment.rb +13 -80
- data/lib/flat_api/models/assignment_submission_comment_creation.rb +23 -80
- data/lib/flat_api/models/assignment_submission_comments.rb +13 -80
- data/lib/flat_api/models/assignment_submission_history.rb +33 -80
- data/lib/flat_api/models/assignment_submission_history_attachment.rb +13 -80
- data/lib/flat_api/models/assignment_submission_history_state.rb +3 -3
- data/lib/flat_api/models/assignment_submission_lti.rb +64 -86
- data/lib/flat_api/models/{assignment_submission_playback_inner.rb → assignment_submission_playback.rb} +36 -83
- data/lib/flat_api/models/assignment_submission_state.rb +3 -3
- data/lib/flat_api/models/assignment_submission_students_mode.rb +40 -0
- data/lib/flat_api/models/assignment_submission_update.rb +25 -81
- data/lib/flat_api/models/assignment_type.rb +5 -4
- data/lib/flat_api/models/assignment_update.rb +218 -87
- data/lib/flat_api/models/class_assignment.rb +219 -82
- data/lib/flat_api/models/class_assignment_all_of_canvas.rb +13 -80
- data/lib/flat_api/models/class_assignment_all_of_lti.rb +13 -80
- data/lib/flat_api/models/class_assignment_all_of_mfc.rb +13 -80
- data/lib/flat_api/models/class_assignment_update.rb +237 -94
- data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +13 -80
- data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +13 -80
- data/lib/flat_api/models/class_attachment_creation.rb +51 -86
- data/lib/flat_api/models/class_creation.rb +13 -80
- data/lib/flat_api/models/class_details.rb +85 -81
- data/lib/flat_api/models/class_details_canvas.rb +13 -80
- data/lib/flat_api/models/class_details_clever.rb +13 -80
- data/lib/flat_api/models/class_details_google_classroom.rb +13 -80
- data/lib/flat_api/models/class_details_google_drive.rb +13 -80
- data/lib/flat_api/models/class_details_issues.rb +13 -80
- data/lib/flat_api/models/class_details_issues_sync_inner.rb +15 -82
- data/lib/flat_api/models/class_details_lti.rb +28 -85
- data/lib/flat_api/models/class_details_mfc.rb +13 -80
- data/lib/flat_api/models/class_details_microsoft_graph.rb +13 -80
- data/lib/flat_api/models/class_grade_level.rb +3 -3
- data/lib/flat_api/models/class_roles.rb +3 -3
- data/lib/flat_api/models/class_state.rb +5 -4
- data/lib/flat_api/models/class_update.rb +13 -80
- data/lib/flat_api/models/collection.rb +182 -81
- data/lib/flat_api/models/collection_app.rb +13 -80
- data/lib/flat_api/models/collection_capabilities.rb +63 -80
- data/lib/flat_api/models/collection_contents.rb +166 -0
- data/lib/flat_api/models/collection_creation.rb +20 -99
- data/lib/flat_api/models/collection_modification.rb +17 -82
- data/lib/flat_api/models/collection_privacy.rb +3 -3
- data/lib/flat_api/models/collection_type.rb +7 -6
- data/lib/flat_api/models/credit_transaction.rb +388 -0
- data/lib/flat_api/models/edu_library.rb +63 -82
- data/lib/flat_api/models/edu_resource.rb +101 -84
- data/lib/flat_api/models/edu_resource_assignment_creation.rb +170 -0
- data/lib/flat_api/models/edu_resource_capabilities.rb +27 -84
- data/lib/flat_api/models/edu_resource_copy.rb +23 -80
- data/lib/flat_api/models/edu_resource_creation.rb +96 -86
- data/lib/flat_api/models/edu_resource_folder.rb +39 -84
- data/lib/flat_api/models/edu_resource_lti_link.rb +23 -80
- data/lib/flat_api/models/edu_resource_move.rb +23 -80
- data/lib/flat_api/models/edu_resource_privacy.rb +3 -3
- data/lib/flat_api/models/edu_resource_resource.rb +5 -6
- data/lib/flat_api/models/edu_resource_type.rb +3 -3
- data/lib/flat_api/models/edu_resource_update.rb +101 -86
- data/lib/flat_api/models/edu_resource_use_in_class.rb +23 -80
- data/lib/flat_api/models/flat_error_response.rb +47 -84
- data/lib/flat_api/models/google_classroom_coursework.rb +13 -80
- data/lib/flat_api/models/google_classroom_submission.rb +43 -80
- data/lib/flat_api/models/grade.rb +51 -0
- data/lib/flat_api/models/group.rb +14 -94
- data/lib/flat_api/models/group_creation.rb +238 -0
- data/lib/flat_api/models/group_details.rb +178 -84
- data/lib/flat_api/models/group_type.rb +6 -4
- data/lib/flat_api/models/license_mode.rb +3 -3
- data/lib/flat_api/models/license_sources.rb +3 -3
- data/lib/flat_api/models/lms_name.rb +3 -3
- data/lib/flat_api/models/lti_configuration.rb +56 -0
- data/lib/flat_api/models/lti_configuration1p1.rb +361 -0
- data/lib/flat_api/models/lti_configuration1p1_all_of_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3.rb +106 -0
- data/lib/flat_api/models/lti_configuration1p3_base.rb +336 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services.rb +166 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_ags.rb +179 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.rb +159 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_nrps.rb +169 -0
- data/lib/flat_api/models/lti_configuration1p3_base_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3_deployment.rb +529 -0
- data/lib/flat_api/models/lti_configuration1p3_dynamic.rb +530 -0
- data/lib/flat_api/models/lti_configuration1p3_manual.rb +489 -0
- data/lib/flat_api/models/lti_configuration_base.rb +306 -0
- data/lib/flat_api/models/lti_configuration_create.rb +60 -0
- data/lib/flat_api/models/lti_configuration_create1p1.rb +210 -0
- data/lib/flat_api/models/lti_configuration_create1p3_deployment.rb +264 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic.rb +209 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.rb +159 -0
- data/lib/flat_api/models/lti_configuration_create1p3_manual.rb +270 -0
- data/lib/flat_api/models/lti_configuration_update.rb +104 -0
- data/lib/flat_api/models/lti_configuration_update_deployment.rb +169 -0
- data/lib/flat_api/models/lti_configuration_update_standalone.rb +219 -0
- data/lib/flat_api/models/lti_credentials.rb +29 -84
- data/lib/flat_api/models/lti_credentials_creation.rb +23 -80
- data/lib/flat_api/models/media_attachment.rb +43 -88
- data/lib/flat_api/models/media_score_sharing_mode.rb +3 -3
- data/lib/flat_api/models/microsoft_graph_assignment.rb +99 -88
- data/lib/flat_api/models/microsoft_graph_submission.rb +33 -80
- data/lib/flat_api/models/omr_capabilities.rb +480 -0
- data/lib/flat_api/models/omr_details_step_data.rb +228 -0
- data/lib/flat_api/models/omr_details_submission.rb +288 -0
- data/lib/flat_api/models/omr_detected_instrument.rb +260 -0
- data/lib/flat_api/models/omr_imported_metadata.rb +181 -0
- data/lib/flat_api/models/omr_instrument_override.rb +311 -0
- data/lib/flat_api/models/omr_job.rb +394 -0
- data/lib/flat_api/models/omr_job_creation.rb +238 -0
- data/lib/flat_api/models/omr_job_file_metadata.rb +199 -0
- data/lib/flat_api/models/omr_job_file_upload.rb +176 -0
- data/lib/flat_api/models/omr_job_file_upload_result.rb +159 -0
- data/lib/flat_api/models/omr_job_input_file.rb +176 -0
- data/lib/flat_api/models/omr_job_output.rb +40 -0
- data/lib/flat_api/models/omr_job_progress.rb +169 -0
- data/lib/flat_api/models/omr_job_result.rb +161 -0
- data/lib/flat_api/models/omr_job_retention.rb +176 -0
- data/lib/flat_api/models/omr_job_status.rb +44 -0
- data/lib/flat_api/models/omr_locale_details.rb +193 -0
- data/lib/flat_api/models/omr_pending_step.rb +213 -0
- data/lib/flat_api/models/omr_step_name.rb +39 -0
- data/lib/flat_api/models/organization_invitation.rb +54 -81
- data/lib/flat_api/models/organization_invitation_creation.rb +15 -82
- data/lib/flat_api/models/organization_roles.rb +5 -5
- data/lib/flat_api/models/organization_user_access_token_creation.rb +23 -80
- data/lib/flat_api/models/rename_group_request.rb +165 -0
- data/lib/flat_api/models/resource_collaborator.rb +43 -85
- data/lib/flat_api/models/resource_collaborator_creation.rb +13 -80
- data/lib/flat_api/models/resource_rights.rb +43 -85
- data/lib/flat_api/models/score_comment.rb +122 -80
- data/lib/flat_api/models/score_comment_context.rb +73 -80
- data/lib/flat_api/models/score_comment_creation.rb +24 -81
- data/lib/flat_api/models/score_comment_moderation.rb +13 -80
- data/lib/flat_api/models/score_comment_update.rb +18 -85
- data/lib/flat_api/models/score_comments_counts.rb +28 -85
- data/lib/flat_api/models/score_creation.rb +5 -6
- data/lib/flat_api/models/score_creation_builder_data.rb +24 -88
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +23 -80
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +13 -80
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +24 -81
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +33 -80
- data/lib/flat_api/models/score_creation_common.rb +14 -81
- data/lib/flat_api/models/score_creation_file_import.rb +39 -86
- data/lib/flat_api/models/score_creation_google_drive_import.rb +24 -81
- data/lib/flat_api/models/score_creation_type.rb +4 -5
- data/lib/flat_api/models/score_details.rb +180 -89
- data/lib/flat_api/models/score_details_all_of_me.rb +193 -0
- data/lib/flat_api/models/score_fork.rb +14 -83
- data/lib/flat_api/models/score_license.rb +4 -5
- data/lib/flat_api/models/score_likes_counts.rb +28 -106
- data/lib/flat_api/models/score_modification.rb +13 -80
- data/lib/flat_api/models/score_plays_counts.rb +28 -85
- data/lib/flat_api/models/score_privacy.rb +3 -3
- data/lib/flat_api/models/score_revision.rb +81 -87
- data/lib/flat_api/models/score_revision_creation.rb +23 -80
- data/lib/flat_api/models/score_revision_statistics.rb +13 -80
- data/lib/flat_api/models/score_source.rb +13 -80
- data/lib/flat_api/models/score_summary.rb +63 -80
- data/lib/flat_api/models/score_track.rb +94 -88
- data/lib/flat_api/models/score_track_creation.rb +13 -80
- data/lib/flat_api/models/score_track_creation_response.rb +165 -0
- data/lib/flat_api/models/score_track_point.rb +23 -80
- data/lib/flat_api/models/score_track_purpose.rb +3 -3
- data/lib/flat_api/models/score_track_state.rb +3 -3
- data/lib/flat_api/models/score_track_type.rb +3 -3
- data/lib/flat_api/models/score_track_update.rb +25 -81
- data/lib/flat_api/models/score_views_counts.rb +28 -85
- data/lib/flat_api/models/task.rb +62 -87
- data/lib/flat_api/models/task_export_options.rb +13 -80
- data/lib/flat_api/models/task_progress.rb +13 -80
- data/lib/flat_api/models/task_result.rb +13 -80
- data/lib/flat_api/models/teaching_theme.rb +47 -0
- data/lib/flat_api/models/tutteo_product.rb +3 -3
- data/lib/flat_api/models/user_admin_update.rb +17 -95
- data/lib/flat_api/models/user_azure_details.rb +13 -80
- data/lib/flat_api/models/user_basics.rb +43 -80
- data/lib/flat_api/models/user_community_profile_links.rb +13 -80
- data/lib/flat_api/models/user_creation.rb +21 -98
- data/lib/flat_api/models/user_details.rb +101 -96
- data/lib/flat_api/models/user_details_admin.rb +72 -85
- data/lib/flat_api/models/user_details_admin_all_of_license.rb +13 -80
- data/lib/flat_api/models/user_public.rb +89 -94
- data/lib/flat_api/models/user_public_summary.rb +58 -81
- data/lib/flat_api/models/user_signin_link.rb +24 -81
- data/lib/flat_api/models/user_signin_link_creation.rb +13 -80
- data/lib/flat_api/oauth.rb +128 -0
- data/lib/flat_api/pagination.rb +88 -0
- data/lib/flat_api/retry.rb +56 -0
- data/lib/flat_api/version.rb +4 -4
- data/lib/flat_api.rb +70 -5
- metadata +98 -330
- data/lib/flat_api/models/flat_locales.rb +0 -56
- data/spec/api/account_api_spec.rb +0 -47
- data/spec/api/class_api_spec.rb +0 -422
- data/spec/api/collection_api_spec.rb +0 -158
- data/spec/api/edu_resources_api_spec.rb +0 -181
- data/spec/api/group_api_spec.rb +0 -71
- data/spec/api/organization_api_spec.rb +0 -201
- data/spec/api/score_api_spec.rb +0 -440
- data/spec/api/task_api_spec.rb +0 -47
- data/spec/api/user_api_spec.rb +0 -75
- data/spec/models/api_access_token_spec.rb +0 -66
- data/spec/models/app_scopes_spec.rb +0 -30
- data/spec/models/assignment_capabilities_can_publish_in_class_error_spec.rb +0 -42
- data/spec/models/assignment_capabilities_spec.rb +0 -60
- data/spec/models/assignment_copy_response_spec.rb +0 -124
- data/spec/models/assignment_copy_spec.rb +0 -32
- data/spec/models/assignment_copy_to_class_spec.rb +0 -48
- data/spec/models/assignment_copy_to_resource_library_spec.rb +0 -42
- data/spec/models/assignment_spec.rb +0 -118
- data/spec/models/assignment_submission_comment_creation_spec.rb +0 -36
- data/spec/models/assignment_submission_comment_spec.rb +0 -72
- data/spec/models/assignment_submission_comments_spec.rb +0 -42
- data/spec/models/assignment_submission_history_attachment_spec.rb +0 -48
- data/spec/models/assignment_submission_history_spec.rb +0 -112
- data/spec/models/assignment_submission_history_state_spec.rb +0 -30
- data/spec/models/assignment_submission_lti_spec.rb +0 -36
- data/spec/models/assignment_submission_playback_inner_spec.rb +0 -42
- data/spec/models/assignment_submission_spec.rb +0 -144
- data/spec/models/assignment_submission_state_spec.rb +0 -30
- data/spec/models/assignment_submission_update_spec.rb +0 -66
- data/spec/models/assignment_type_spec.rb +0 -30
- data/spec/models/assignment_update_spec.rb +0 -100
- data/spec/models/class_assignment_all_of_canvas_spec.rb +0 -42
- data/spec/models/class_assignment_all_of_lti_spec.rb +0 -36
- data/spec/models/class_assignment_all_of_mfc_spec.rb +0 -42
- data/spec/models/class_assignment_spec.rb +0 -216
- data/spec/models/class_assignment_update_all_of_google_classroom_spec.rb +0 -36
- data/spec/models/class_assignment_update_all_of_microsoft_graph_spec.rb +0 -36
- data/spec/models/class_assignment_update_spec.rb +0 -150
- data/spec/models/class_attachment_creation_spec.rb +0 -76
- data/spec/models/class_creation_spec.rb +0 -64
- data/spec/models/class_details_canvas_spec.rb +0 -42
- data/spec/models/class_details_clever_spec.rb +0 -76
- data/spec/models/class_details_google_classroom_spec.rb +0 -42
- data/spec/models/class_details_google_drive_spec.rb +0 -42
- data/spec/models/class_details_issues_spec.rb +0 -36
- data/spec/models/class_details_issues_sync_inner_spec.rb +0 -52
- data/spec/models/class_details_lti_spec.rb +0 -48
- data/spec/models/class_details_mfc_spec.rb +0 -42
- data/spec/models/class_details_microsoft_graph_spec.rb +0 -36
- data/spec/models/class_details_spec.rb +0 -178
- data/spec/models/class_grade_level_spec.rb +0 -30
- data/spec/models/class_roles_spec.rb +0 -30
- data/spec/models/class_state_spec.rb +0 -30
- data/spec/models/class_update_spec.rb +0 -64
- data/spec/models/collection_app_spec.rb +0 -48
- data/spec/models/collection_capabilities_spec.rb +0 -60
- data/spec/models/collection_creation_spec.rb +0 -42
- data/spec/models/collection_modification_spec.rb +0 -42
- data/spec/models/collection_privacy_spec.rb +0 -30
- data/spec/models/collection_spec.rb +0 -114
- data/spec/models/collection_type_spec.rb +0 -30
- data/spec/models/edu_library_spec.rb +0 -62
- data/spec/models/edu_resource_capabilities_spec.rb +0 -48
- data/spec/models/edu_resource_copy_spec.rb +0 -36
- data/spec/models/edu_resource_creation_spec.rb +0 -48
- data/spec/models/edu_resource_folder_spec.rb +0 -36
- data/spec/models/edu_resource_lti_link_spec.rb +0 -36
- data/spec/models/edu_resource_move_spec.rb +0 -36
- data/spec/models/edu_resource_privacy_spec.rb +0 -30
- data/spec/models/edu_resource_resource_spec.rb +0 -32
- data/spec/models/edu_resource_spec.rb +0 -96
- data/spec/models/edu_resource_type_spec.rb +0 -30
- data/spec/models/edu_resource_update_spec.rb +0 -42
- data/spec/models/edu_resource_use_in_class_spec.rb +0 -42
- data/spec/models/flat_error_response_spec.rb +0 -54
- data/spec/models/flat_locales_spec.rb +0 -30
- data/spec/models/google_classroom_coursework_spec.rb +0 -54
- data/spec/models/google_classroom_submission_spec.rb +0 -48
- data/spec/models/group_details_spec.rb +0 -72
- data/spec/models/group_spec.rb +0 -76
- data/spec/models/group_type_spec.rb +0 -30
- data/spec/models/license_mode_spec.rb +0 -30
- data/spec/models/license_sources_spec.rb +0 -30
- data/spec/models/lms_name_spec.rb +0 -30
- data/spec/models/lti_credentials_creation_spec.rb +0 -42
- data/spec/models/lti_credentials_spec.rb +0 -84
- data/spec/models/media_attachment_spec.rb +0 -166
- data/spec/models/media_score_sharing_mode_spec.rb +0 -30
- data/spec/models/microsoft_graph_assignment_spec.rb +0 -54
- data/spec/models/microsoft_graph_submission_spec.rb +0 -42
- data/spec/models/organization_invitation_creation_spec.rb +0 -46
- data/spec/models/organization_invitation_spec.rb +0 -84
- data/spec/models/organization_roles_spec.rb +0 -30
- data/spec/models/organization_user_access_token_creation_spec.rb +0 -36
- data/spec/models/resource_collaborator_creation_spec.rb +0 -72
- data/spec/models/resource_collaborator_spec.rb +0 -112
- data/spec/models/resource_rights_spec.rb +0 -64
- data/spec/models/score_comment_context_spec.rb +0 -78
- data/spec/models/score_comment_creation_spec.rb +0 -66
- data/spec/models/score_comment_moderation_spec.rb +0 -46
- data/spec/models/score_comment_spec.rb +0 -130
- data/spec/models/score_comment_update_spec.rb +0 -54
- data/spec/models/score_comments_counts_spec.rb +0 -54
- data/spec/models/score_creation_builder_data_all_of_builder_data_layout_data_spec.rb +0 -82
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_instruments_spec.rb +0 -60
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_spec.rb +0 -66
- data/spec/models/score_creation_builder_data_all_of_builder_data_spec.rb +0 -42
- data/spec/models/score_creation_builder_data_spec.rb +0 -60
- data/spec/models/score_creation_common_spec.rb +0 -54
- data/spec/models/score_creation_file_import_spec.rb +0 -76
- data/spec/models/score_creation_google_drive_import_spec.rb +0 -60
- data/spec/models/score_creation_spec.rb +0 -32
- data/spec/models/score_creation_type_spec.rb +0 -30
- data/spec/models/score_details_spec.rb +0 -240
- data/spec/models/score_fork_spec.rb +0 -48
- data/spec/models/score_license_spec.rb +0 -30
- data/spec/models/score_likes_counts_spec.rb +0 -48
- data/spec/models/score_modification_spec.rb +0 -102
- data/spec/models/score_plays_counts_spec.rb +0 -48
- data/spec/models/score_privacy_spec.rb +0 -30
- data/spec/models/score_revision_creation_spec.rb +0 -58
- data/spec/models/score_revision_spec.rb +0 -78
- data/spec/models/score_revision_statistics_spec.rb +0 -54
- data/spec/models/score_source_spec.rb +0 -36
- data/spec/models/score_summary_spec.rb +0 -66
- data/spec/models/score_track_creation_spec.rb +0 -66
- data/spec/models/score_track_point_spec.rb +0 -52
- data/spec/models/score_track_purpose_spec.rb +0 -30
- data/spec/models/score_track_spec.rb +0 -108
- data/spec/models/score_track_state_spec.rb +0 -30
- data/spec/models/score_track_type_spec.rb +0 -30
- data/spec/models/score_track_update_spec.rb +0 -54
- data/spec/models/score_views_counts_spec.rb +0 -48
- data/spec/models/task_export_options_spec.rb +0 -36
- data/spec/models/task_progress_spec.rb +0 -42
- data/spec/models/task_result_spec.rb +0 -42
- data/spec/models/task_spec.rb +0 -100
- data/spec/models/tutteo_product_spec.rb +0 -30
- data/spec/models/user_admin_update_spec.rb +0 -66
- data/spec/models/user_azure_details_spec.rb +0 -48
- data/spec/models/user_basics_spec.rb +0 -94
- data/spec/models/user_community_profile_links_spec.rb +0 -66
- data/spec/models/user_creation_spec.rb +0 -76
- data/spec/models/user_details_admin_all_of_license_spec.rb +0 -60
- data/spec/models/user_details_admin_spec.rb +0 -142
- data/spec/models/user_details_spec.rb +0 -214
- data/spec/models/user_public_spec.rb +0 -178
- data/spec/models/user_public_summary_spec.rb +0 -118
- data/spec/models/user_signin_link_creation_spec.rb +0 -36
- data/spec/models/user_signin_link_spec.rb +0 -42
- data/spec/spec_helper.rb +0 -111
|
@@ -1,12 +1,12 @@
|
|
|
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, MIDI, Guitar Pro
|
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.26.1
|
|
7
7
|
Contact: developers@flat.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module FlatApi
|
|
17
17
|
# Assignment details
|
|
18
|
-
class Assignment
|
|
18
|
+
class Assignment < ApiModelBase
|
|
19
19
|
# Unique identifier of the assignment
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
@@ -26,15 +26,25 @@ module FlatApi
|
|
|
26
26
|
# Title of the assignment
|
|
27
27
|
attr_accessor :title
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# Student instructions and content of the assignment (plain text)
|
|
30
30
|
attr_accessor :description
|
|
31
31
|
|
|
32
|
+
# HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs.
|
|
33
|
+
attr_accessor :description_html
|
|
34
|
+
|
|
35
|
+
# Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility.
|
|
36
|
+
attr_accessor :teacher_instructions
|
|
37
|
+
|
|
38
|
+
# HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs.
|
|
39
|
+
attr_accessor :teacher_instructions_html
|
|
40
|
+
|
|
32
41
|
# The URL of the cover to display
|
|
33
42
|
attr_accessor :cover
|
|
34
43
|
|
|
35
44
|
# The id of the cover to display
|
|
36
45
|
attr_accessor :cover_file
|
|
37
46
|
|
|
47
|
+
# Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of.
|
|
38
48
|
attr_accessor :attachments
|
|
39
49
|
|
|
40
50
|
# For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments.
|
|
@@ -55,6 +65,29 @@ module FlatApi
|
|
|
55
65
|
# The number of playback authorized on the scores of the assignment.
|
|
56
66
|
attr_accessor :nb_playback_authorized
|
|
57
67
|
|
|
68
|
+
# Restrict the ability to get an audio feedback every time a student adds or selects a note.
|
|
69
|
+
attr_accessor :restrict_play_note
|
|
70
|
+
|
|
71
|
+
# Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.
|
|
72
|
+
attr_accessor :restrict_to_audio_tracks
|
|
73
|
+
|
|
74
|
+
attr_accessor :submission_students_mode
|
|
75
|
+
|
|
76
|
+
# For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'.
|
|
77
|
+
attr_accessor :recording_type
|
|
78
|
+
|
|
79
|
+
# For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'.
|
|
80
|
+
attr_accessor :allow_metronome
|
|
81
|
+
|
|
82
|
+
# For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'.
|
|
83
|
+
attr_accessor :allow_backing_track
|
|
84
|
+
|
|
85
|
+
# For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'.
|
|
86
|
+
attr_accessor :allow_speed_change
|
|
87
|
+
|
|
88
|
+
# For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'.
|
|
89
|
+
attr_accessor :free_record
|
|
90
|
+
|
|
58
91
|
class EnumAttributeValidator
|
|
59
92
|
attr_reader :datatype
|
|
60
93
|
attr_reader :allowable_values
|
|
@@ -85,6 +118,9 @@ module FlatApi
|
|
|
85
118
|
:'capabilities' => :'capabilities',
|
|
86
119
|
:'title' => :'title',
|
|
87
120
|
:'description' => :'description',
|
|
121
|
+
:'description_html' => :'descriptionHtml',
|
|
122
|
+
:'teacher_instructions' => :'teacherInstructions',
|
|
123
|
+
:'teacher_instructions_html' => :'teacherInstructionsHtml',
|
|
88
124
|
:'cover' => :'cover',
|
|
89
125
|
:'cover_file' => :'coverFile',
|
|
90
126
|
:'attachments' => :'attachments',
|
|
@@ -93,13 +129,26 @@ module FlatApi
|
|
|
93
129
|
:'release_grades' => :'releaseGrades',
|
|
94
130
|
:'shuffle_exercises' => :'shuffleExercises',
|
|
95
131
|
:'toolset' => :'toolset',
|
|
96
|
-
:'nb_playback_authorized' => :'nbPlaybackAuthorized'
|
|
132
|
+
:'nb_playback_authorized' => :'nbPlaybackAuthorized',
|
|
133
|
+
:'restrict_play_note' => :'restrictPlayNote',
|
|
134
|
+
:'restrict_to_audio_tracks' => :'restrictToAudioTracks',
|
|
135
|
+
:'submission_students_mode' => :'submissionStudentsMode',
|
|
136
|
+
:'recording_type' => :'recordingType',
|
|
137
|
+
:'allow_metronome' => :'allowMetronome',
|
|
138
|
+
:'allow_backing_track' => :'allowBackingTrack',
|
|
139
|
+
:'allow_speed_change' => :'allowSpeedChange',
|
|
140
|
+
:'free_record' => :'freeRecord'
|
|
97
141
|
}
|
|
98
142
|
end
|
|
99
143
|
|
|
144
|
+
# Returns attribute mapping this model knows about
|
|
145
|
+
def self.acceptable_attribute_map
|
|
146
|
+
attribute_map
|
|
147
|
+
end
|
|
148
|
+
|
|
100
149
|
# Returns all the JSON keys this model knows about
|
|
101
150
|
def self.acceptable_attributes
|
|
102
|
-
|
|
151
|
+
acceptable_attribute_map.values
|
|
103
152
|
end
|
|
104
153
|
|
|
105
154
|
# Attribute type mapping.
|
|
@@ -110,6 +159,9 @@ module FlatApi
|
|
|
110
159
|
:'capabilities' => :'AssignmentCapabilities',
|
|
111
160
|
:'title' => :'String',
|
|
112
161
|
:'description' => :'String',
|
|
162
|
+
:'description_html' => :'String',
|
|
163
|
+
:'teacher_instructions' => :'String',
|
|
164
|
+
:'teacher_instructions_html' => :'String',
|
|
113
165
|
:'cover' => :'String',
|
|
114
166
|
:'cover_file' => :'String',
|
|
115
167
|
:'attachments' => :'Array<MediaAttachment>',
|
|
@@ -118,7 +170,15 @@ module FlatApi
|
|
|
118
170
|
:'release_grades' => :'String',
|
|
119
171
|
:'shuffle_exercises' => :'Boolean',
|
|
120
172
|
:'toolset' => :'String',
|
|
121
|
-
:'nb_playback_authorized' => :'Float'
|
|
173
|
+
:'nb_playback_authorized' => :'Float',
|
|
174
|
+
:'restrict_play_note' => :'Boolean',
|
|
175
|
+
:'restrict_to_audio_tracks' => :'Boolean',
|
|
176
|
+
:'submission_students_mode' => :'AssignmentSubmissionStudentsMode',
|
|
177
|
+
:'recording_type' => :'String',
|
|
178
|
+
:'allow_metronome' => :'Boolean',
|
|
179
|
+
:'allow_backing_track' => :'Boolean',
|
|
180
|
+
:'allow_speed_change' => :'Boolean',
|
|
181
|
+
:'free_record' => :'Boolean'
|
|
122
182
|
}
|
|
123
183
|
end
|
|
124
184
|
|
|
@@ -136,9 +196,10 @@ module FlatApi
|
|
|
136
196
|
end
|
|
137
197
|
|
|
138
198
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
199
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
139
200
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
140
|
-
if (!
|
|
141
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::Assignment`. Please check the name to make sure it's valid. List of attributes: " +
|
|
201
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
202
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::Assignment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
142
203
|
end
|
|
143
204
|
h[k.to_sym] = v
|
|
144
205
|
}
|
|
@@ -171,6 +232,18 @@ module FlatApi
|
|
|
171
232
|
self.description = attributes[:'description']
|
|
172
233
|
end
|
|
173
234
|
|
|
235
|
+
if attributes.key?(:'description_html')
|
|
236
|
+
self.description_html = attributes[:'description_html']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'teacher_instructions')
|
|
240
|
+
self.teacher_instructions = attributes[:'teacher_instructions']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'teacher_instructions_html')
|
|
244
|
+
self.teacher_instructions_html = attributes[:'teacher_instructions_html']
|
|
245
|
+
end
|
|
246
|
+
|
|
174
247
|
if attributes.key?(:'cover')
|
|
175
248
|
self.cover = attributes[:'cover']
|
|
176
249
|
end
|
|
@@ -210,6 +283,38 @@ module FlatApi
|
|
|
210
283
|
if attributes.key?(:'nb_playback_authorized')
|
|
211
284
|
self.nb_playback_authorized = attributes[:'nb_playback_authorized']
|
|
212
285
|
end
|
|
286
|
+
|
|
287
|
+
if attributes.key?(:'restrict_play_note')
|
|
288
|
+
self.restrict_play_note = attributes[:'restrict_play_note']
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'restrict_to_audio_tracks')
|
|
292
|
+
self.restrict_to_audio_tracks = attributes[:'restrict_to_audio_tracks']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if attributes.key?(:'submission_students_mode')
|
|
296
|
+
self.submission_students_mode = attributes[:'submission_students_mode']
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if attributes.key?(:'recording_type')
|
|
300
|
+
self.recording_type = attributes[:'recording_type']
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'allow_metronome')
|
|
304
|
+
self.allow_metronome = attributes[:'allow_metronome']
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
if attributes.key?(:'allow_backing_track')
|
|
308
|
+
self.allow_backing_track = attributes[:'allow_backing_track']
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if attributes.key?(:'allow_speed_change')
|
|
312
|
+
self.allow_speed_change = attributes[:'allow_speed_change']
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'free_record')
|
|
316
|
+
self.free_record = attributes[:'free_record']
|
|
317
|
+
end
|
|
213
318
|
end
|
|
214
319
|
|
|
215
320
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -251,9 +356,61 @@ module FlatApi
|
|
|
251
356
|
return false if @attachments.nil?
|
|
252
357
|
release_grades_validator = EnumAttributeValidator.new('String', ["auto", "manual"])
|
|
253
358
|
return false unless release_grades_validator.valid?(@release_grades)
|
|
359
|
+
recording_type_validator = EnumAttributeValidator.new('String', ["audio", "video"])
|
|
360
|
+
return false unless recording_type_validator.valid?(@recording_type)
|
|
254
361
|
true
|
|
255
362
|
end
|
|
256
363
|
|
|
364
|
+
# Custom attribute writer method with validation
|
|
365
|
+
# @param [Object] id Value to be assigned
|
|
366
|
+
def id=(id)
|
|
367
|
+
if id.nil?
|
|
368
|
+
fail ArgumentError, 'id cannot be nil'
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
@id = id
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Custom attribute writer method with validation
|
|
375
|
+
# @param [Object] type Value to be assigned
|
|
376
|
+
def type=(type)
|
|
377
|
+
if type.nil?
|
|
378
|
+
fail ArgumentError, 'type cannot be nil'
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
@type = type
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Custom attribute writer method with validation
|
|
385
|
+
# @param [Object] capabilities Value to be assigned
|
|
386
|
+
def capabilities=(capabilities)
|
|
387
|
+
if capabilities.nil?
|
|
388
|
+
fail ArgumentError, 'capabilities cannot be nil'
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
@capabilities = capabilities
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Custom attribute writer method with validation
|
|
395
|
+
# @param [Object] title Value to be assigned
|
|
396
|
+
def title=(title)
|
|
397
|
+
if title.nil?
|
|
398
|
+
fail ArgumentError, 'title cannot be nil'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
@title = title
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Custom attribute writer method with validation
|
|
405
|
+
# @param [Object] attachments Value to be assigned
|
|
406
|
+
def attachments=(attachments)
|
|
407
|
+
if attachments.nil?
|
|
408
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
@attachments = attachments
|
|
412
|
+
end
|
|
413
|
+
|
|
257
414
|
# Custom attribute writer method checking allowed values (enum).
|
|
258
415
|
# @param [Object] release_grades Object to be assigned
|
|
259
416
|
def release_grades=(release_grades)
|
|
@@ -264,6 +421,16 @@ module FlatApi
|
|
|
264
421
|
@release_grades = release_grades
|
|
265
422
|
end
|
|
266
423
|
|
|
424
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
425
|
+
# @param [Object] recording_type Object to be assigned
|
|
426
|
+
def recording_type=(recording_type)
|
|
427
|
+
validator = EnumAttributeValidator.new('String', ["audio", "video"])
|
|
428
|
+
unless validator.valid?(recording_type)
|
|
429
|
+
fail ArgumentError, "invalid value for \"recording_type\", must be one of #{validator.allowable_values}."
|
|
430
|
+
end
|
|
431
|
+
@recording_type = recording_type
|
|
432
|
+
end
|
|
433
|
+
|
|
267
434
|
# Checks equality by comparing each attribute.
|
|
268
435
|
# @param [Object] Object to be compared
|
|
269
436
|
def ==(o)
|
|
@@ -274,6 +441,9 @@ module FlatApi
|
|
|
274
441
|
capabilities == o.capabilities &&
|
|
275
442
|
title == o.title &&
|
|
276
443
|
description == o.description &&
|
|
444
|
+
description_html == o.description_html &&
|
|
445
|
+
teacher_instructions == o.teacher_instructions &&
|
|
446
|
+
teacher_instructions_html == o.teacher_instructions_html &&
|
|
277
447
|
cover == o.cover &&
|
|
278
448
|
cover_file == o.cover_file &&
|
|
279
449
|
attachments == o.attachments &&
|
|
@@ -282,7 +452,15 @@ module FlatApi
|
|
|
282
452
|
release_grades == o.release_grades &&
|
|
283
453
|
shuffle_exercises == o.shuffle_exercises &&
|
|
284
454
|
toolset == o.toolset &&
|
|
285
|
-
nb_playback_authorized == o.nb_playback_authorized
|
|
455
|
+
nb_playback_authorized == o.nb_playback_authorized &&
|
|
456
|
+
restrict_play_note == o.restrict_play_note &&
|
|
457
|
+
restrict_to_audio_tracks == o.restrict_to_audio_tracks &&
|
|
458
|
+
submission_students_mode == o.submission_students_mode &&
|
|
459
|
+
recording_type == o.recording_type &&
|
|
460
|
+
allow_metronome == o.allow_metronome &&
|
|
461
|
+
allow_backing_track == o.allow_backing_track &&
|
|
462
|
+
allow_speed_change == o.allow_speed_change &&
|
|
463
|
+
free_record == o.free_record
|
|
286
464
|
end
|
|
287
465
|
|
|
288
466
|
# @see the `==` method
|
|
@@ -294,7 +472,7 @@ module FlatApi
|
|
|
294
472
|
# Calculates hash code according to all attributes.
|
|
295
473
|
# @return [Integer] Hash code
|
|
296
474
|
def hash
|
|
297
|
-
[id, type, capabilities, title, description, cover, cover_file, attachments, use_dedicated_attachments, max_points, release_grades, shuffle_exercises, toolset, nb_playback_authorized].hash
|
|
475
|
+
[id, type, capabilities, title, description, description_html, teacher_instructions, teacher_instructions_html, cover, cover_file, attachments, use_dedicated_attachments, max_points, release_grades, shuffle_exercises, toolset, nb_playback_authorized, restrict_play_note, restrict_to_audio_tracks, submission_students_mode, recording_type, allow_metronome, allow_backing_track, allow_speed_change, free_record].hash
|
|
298
476
|
end
|
|
299
477
|
|
|
300
478
|
# Builds the object from hash
|
|
@@ -320,61 +498,6 @@ module FlatApi
|
|
|
320
498
|
new(transformed_hash)
|
|
321
499
|
end
|
|
322
500
|
|
|
323
|
-
# Deserializes the data based on type
|
|
324
|
-
# @param string type Data type
|
|
325
|
-
# @param string value Value to be deserialized
|
|
326
|
-
# @return [Object] Deserialized data
|
|
327
|
-
def self._deserialize(type, value)
|
|
328
|
-
case type.to_sym
|
|
329
|
-
when :Time
|
|
330
|
-
Time.parse(value)
|
|
331
|
-
when :Date
|
|
332
|
-
Date.parse(value)
|
|
333
|
-
when :String
|
|
334
|
-
value.to_s
|
|
335
|
-
when :Integer
|
|
336
|
-
value.to_i
|
|
337
|
-
when :Float
|
|
338
|
-
value.to_f
|
|
339
|
-
when :Boolean
|
|
340
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
341
|
-
true
|
|
342
|
-
else
|
|
343
|
-
false
|
|
344
|
-
end
|
|
345
|
-
when :Object
|
|
346
|
-
# generic object (usually a Hash), return directly
|
|
347
|
-
value
|
|
348
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
349
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
350
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
351
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
352
|
-
k_type = Regexp.last_match[:k_type]
|
|
353
|
-
v_type = Regexp.last_match[:v_type]
|
|
354
|
-
{}.tap do |hash|
|
|
355
|
-
value.each do |k, v|
|
|
356
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
357
|
-
end
|
|
358
|
-
end
|
|
359
|
-
else # model
|
|
360
|
-
# models (e.g. Pet) or oneOf
|
|
361
|
-
klass = FlatApi.const_get(type)
|
|
362
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
363
|
-
end
|
|
364
|
-
end
|
|
365
|
-
|
|
366
|
-
# Returns the string representation of the object
|
|
367
|
-
# @return [String] String presentation of the object
|
|
368
|
-
def to_s
|
|
369
|
-
to_hash.to_s
|
|
370
|
-
end
|
|
371
|
-
|
|
372
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
373
|
-
# @return [Hash] Returns the object in the form of hash
|
|
374
|
-
def to_body
|
|
375
|
-
to_hash
|
|
376
|
-
end
|
|
377
|
-
|
|
378
501
|
# Returns the object in the form of hash
|
|
379
502
|
# @return [Hash] Returns the object in the form of hash
|
|
380
503
|
def to_hash
|
|
@@ -391,24 +514,6 @@ module FlatApi
|
|
|
391
514
|
hash
|
|
392
515
|
end
|
|
393
516
|
|
|
394
|
-
# Outputs non-array value in the form of hash
|
|
395
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
396
|
-
# @param [Object] value Any valid value
|
|
397
|
-
# @return [Hash] Returns the value in the form of hash
|
|
398
|
-
def _to_hash(value)
|
|
399
|
-
if value.is_a?(Array)
|
|
400
|
-
value.compact.map { |v| _to_hash(v) }
|
|
401
|
-
elsif value.is_a?(Hash)
|
|
402
|
-
{}.tap do |hash|
|
|
403
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
404
|
-
end
|
|
405
|
-
elsif value.respond_to? :to_hash
|
|
406
|
-
value.to_hash
|
|
407
|
-
else
|
|
408
|
-
value
|
|
409
|
-
end
|
|
410
|
-
end
|
|
411
|
-
|
|
412
517
|
end
|
|
413
518
|
|
|
414
519
|
end
|
|
@@ -1,12 +1,12 @@
|
|
|
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, MIDI, Guitar Pro
|
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.
|
|
6
|
+
The version of the OpenAPI document: 2.26.1
|
|
7
7
|
Contact: developers@flat.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module FlatApi
|
|
17
17
|
# Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take.
|
|
18
|
-
class AssignmentCapabilities
|
|
18
|
+
class AssignmentCapabilities < ApiModelBase
|
|
19
19
|
# Whether the current user can edit the assignment
|
|
20
20
|
attr_accessor :can_edit
|
|
21
21
|
|
|
@@ -41,9 +41,14 @@ module FlatApi
|
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
44
49
|
# Returns all the JSON keys this model knows about
|
|
45
50
|
def self.acceptable_attributes
|
|
46
|
-
|
|
51
|
+
acceptable_attribute_map.values
|
|
47
52
|
end
|
|
48
53
|
|
|
49
54
|
# Attribute type mapping.
|
|
@@ -71,9 +76,10 @@ module FlatApi
|
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
-
if (!
|
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::AssignmentCapabilities`. Please check the name to make sure it's valid. List of attributes: " +
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::AssignmentCapabilities`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
83
|
end
|
|
78
84
|
h[k.to_sym] = v
|
|
79
85
|
}
|
|
@@ -142,6 +148,46 @@ module FlatApi
|
|
|
142
148
|
true
|
|
143
149
|
end
|
|
144
150
|
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] can_edit Value to be assigned
|
|
153
|
+
def can_edit=(can_edit)
|
|
154
|
+
if can_edit.nil?
|
|
155
|
+
fail ArgumentError, 'can_edit cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@can_edit = can_edit
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] can_publish_in_class Value to be assigned
|
|
163
|
+
def can_publish_in_class=(can_publish_in_class)
|
|
164
|
+
if can_publish_in_class.nil?
|
|
165
|
+
fail ArgumentError, 'can_publish_in_class cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@can_publish_in_class = can_publish_in_class
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] can_archive Value to be assigned
|
|
173
|
+
def can_archive=(can_archive)
|
|
174
|
+
if can_archive.nil?
|
|
175
|
+
fail ArgumentError, 'can_archive cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@can_archive = can_archive
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] can_unarchive Value to be assigned
|
|
183
|
+
def can_unarchive=(can_unarchive)
|
|
184
|
+
if can_unarchive.nil?
|
|
185
|
+
fail ArgumentError, 'can_unarchive cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@can_unarchive = can_unarchive
|
|
189
|
+
end
|
|
190
|
+
|
|
145
191
|
# Checks equality by comparing each attribute.
|
|
146
192
|
# @param [Object] Object to be compared
|
|
147
193
|
def ==(o)
|
|
@@ -189,61 +235,6 @@ module FlatApi
|
|
|
189
235
|
new(transformed_hash)
|
|
190
236
|
end
|
|
191
237
|
|
|
192
|
-
# Deserializes the data based on type
|
|
193
|
-
# @param string type Data type
|
|
194
|
-
# @param string value Value to be deserialized
|
|
195
|
-
# @return [Object] Deserialized data
|
|
196
|
-
def self._deserialize(type, value)
|
|
197
|
-
case type.to_sym
|
|
198
|
-
when :Time
|
|
199
|
-
Time.parse(value)
|
|
200
|
-
when :Date
|
|
201
|
-
Date.parse(value)
|
|
202
|
-
when :String
|
|
203
|
-
value.to_s
|
|
204
|
-
when :Integer
|
|
205
|
-
value.to_i
|
|
206
|
-
when :Float
|
|
207
|
-
value.to_f
|
|
208
|
-
when :Boolean
|
|
209
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
210
|
-
true
|
|
211
|
-
else
|
|
212
|
-
false
|
|
213
|
-
end
|
|
214
|
-
when :Object
|
|
215
|
-
# generic object (usually a Hash), return directly
|
|
216
|
-
value
|
|
217
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
218
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
219
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
220
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
221
|
-
k_type = Regexp.last_match[:k_type]
|
|
222
|
-
v_type = Regexp.last_match[:v_type]
|
|
223
|
-
{}.tap do |hash|
|
|
224
|
-
value.each do |k, v|
|
|
225
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
else # model
|
|
229
|
-
# models (e.g. Pet) or oneOf
|
|
230
|
-
klass = FlatApi.const_get(type)
|
|
231
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
232
|
-
end
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
# Returns the string representation of the object
|
|
236
|
-
# @return [String] String presentation of the object
|
|
237
|
-
def to_s
|
|
238
|
-
to_hash.to_s
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
242
|
-
# @return [Hash] Returns the object in the form of hash
|
|
243
|
-
def to_body
|
|
244
|
-
to_hash
|
|
245
|
-
end
|
|
246
|
-
|
|
247
238
|
# Returns the object in the form of hash
|
|
248
239
|
# @return [Hash] Returns the object in the form of hash
|
|
249
240
|
def to_hash
|
|
@@ -260,24 +251,6 @@ module FlatApi
|
|
|
260
251
|
hash
|
|
261
252
|
end
|
|
262
253
|
|
|
263
|
-
# Outputs non-array value in the form of hash
|
|
264
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
265
|
-
# @param [Object] value Any valid value
|
|
266
|
-
# @return [Hash] Returns the value in the form of hash
|
|
267
|
-
def _to_hash(value)
|
|
268
|
-
if value.is_a?(Array)
|
|
269
|
-
value.compact.map { |v| _to_hash(v) }
|
|
270
|
-
elsif value.is_a?(Hash)
|
|
271
|
-
{}.tap do |hash|
|
|
272
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
273
|
-
end
|
|
274
|
-
elsif value.respond_to? :to_hash
|
|
275
|
-
value.to_hash
|
|
276
|
-
else
|
|
277
|
-
value
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
254
|
end
|
|
282
255
|
|
|
283
256
|
end
|