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
|
|
|
@@ -49,7 +49,7 @@ module FlatApi
|
|
|
49
49
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_collaborator"
|
|
50
50
|
end
|
|
51
51
|
# resource path
|
|
52
|
-
local_var_path = '/scores/{score}/collaborators'.sub('{
|
|
52
|
+
local_var_path = '/scores/{score}/collaborators'.sub('{score}', CGI.escape(score.to_s))
|
|
53
53
|
|
|
54
54
|
# query parameters
|
|
55
55
|
query_params = opts[:query_params] || {}
|
|
@@ -57,7 +57,7 @@ module FlatApi
|
|
|
57
57
|
# header parameters
|
|
58
58
|
header_params = opts[:header_params] || {}
|
|
59
59
|
# HTTP header 'Accept' (if needed)
|
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
61
|
# HTTP header 'Content-Type'
|
|
62
62
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
63
|
if !content_type.nil?
|
|
@@ -98,7 +98,7 @@ module FlatApi
|
|
|
98
98
|
# @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`).
|
|
99
99
|
# @param body [ScoreTrackCreation]
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
101
|
-
# @return [
|
|
101
|
+
# @return [ScoreTrackCreationResponse]
|
|
102
102
|
def add_score_track(score, body, opts = {})
|
|
103
103
|
data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
|
|
104
104
|
data
|
|
@@ -109,7 +109,7 @@ module FlatApi
|
|
|
109
109
|
# @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`).
|
|
110
110
|
# @param body [ScoreTrackCreation]
|
|
111
111
|
# @param [Hash] opts the optional parameters
|
|
112
|
-
# @return [Array<(
|
|
112
|
+
# @return [Array<(ScoreTrackCreationResponse, Integer, Hash)>] ScoreTrackCreationResponse data, response status code and response headers
|
|
113
113
|
def add_score_track_with_http_info(score, body, opts = {})
|
|
114
114
|
if @api_client.config.debugging
|
|
115
115
|
@api_client.config.logger.debug 'Calling API: ScoreApi.add_score_track ...'
|
|
@@ -123,7 +123,7 @@ module FlatApi
|
|
|
123
123
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_track"
|
|
124
124
|
end
|
|
125
125
|
# resource path
|
|
126
|
-
local_var_path = '/scores/{score}/tracks'.sub('{
|
|
126
|
+
local_var_path = '/scores/{score}/tracks'.sub('{score}', CGI.escape(score.to_s))
|
|
127
127
|
|
|
128
128
|
# query parameters
|
|
129
129
|
query_params = opts[:query_params] || {}
|
|
@@ -131,7 +131,7 @@ module FlatApi
|
|
|
131
131
|
# header parameters
|
|
132
132
|
header_params = opts[:header_params] || {}
|
|
133
133
|
# HTTP header 'Accept' (if needed)
|
|
134
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
135
135
|
# HTTP header 'Content-Type'
|
|
136
136
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
137
137
|
if !content_type.nil?
|
|
@@ -145,7 +145,7 @@ module FlatApi
|
|
|
145
145
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
146
146
|
|
|
147
147
|
# return_type
|
|
148
|
-
return_type = opts[:debug_return_type] || '
|
|
148
|
+
return_type = opts[:debug_return_type] || 'ScoreTrackCreationResponse'
|
|
149
149
|
|
|
150
150
|
# auth_names
|
|
151
151
|
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
@@ -212,7 +212,7 @@ module FlatApi
|
|
|
212
212
|
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
213
213
|
end
|
|
214
214
|
# resource path
|
|
215
|
-
local_var_path = '/scores/{score}/revisions/{revision}/{format}/task'.sub('{
|
|
215
|
+
local_var_path = '/scores/{score}/revisions/{revision}/{format}/task'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s)).sub('{format}', CGI.escape(format.to_s))
|
|
216
216
|
|
|
217
217
|
# query parameters
|
|
218
218
|
query_params = opts[:query_params] || {}
|
|
@@ -221,7 +221,7 @@ module FlatApi
|
|
|
221
221
|
# header parameters
|
|
222
222
|
header_params = opts[:header_params] || {}
|
|
223
223
|
# HTTP header 'Accept' (if needed)
|
|
224
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
225
225
|
# HTTP header 'Content-Type'
|
|
226
226
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
227
227
|
if !content_type.nil?
|
|
@@ -258,7 +258,7 @@ module FlatApi
|
|
|
258
258
|
end
|
|
259
259
|
|
|
260
260
|
# Create a new score
|
|
261
|
-
# Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import
|
|
261
|
+
# Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import a file to create the new Flat document. **Preferred formats**: * **MusicXML**: `.xml`, `.musicxml`, `.mxl` (compressed) — MIME: `vnd.recordare.musicxml+xml`, `vnd.recordare.musicxml`. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * **MIDI**: `.mid`, `.midi` — MIME: `audio/midi`. Only preserves pitch, timing, and instrument data; notation details are lost. **Also supported** (converted to MusicXML on import, some notation details may be lost): * **Guitar Pro**: `.gp`, `.gp3`, `.gp4`, `.gp5`, `.gpx`, `.gtp` * **MuseScore**: `.mscz`, `.mscx` * **Finale**: `.musx` * **ABC notation**: `.abc` — MIME: `text/vnd.abc` * **PowerTab**: `.ptb` * **Capella**: `.cap`, `.capx` * **MEI**: `.mei` * **Overture**: `.ove` * **TablEdit**: `.tef` * **Band-in-a-Box**: `.mgu`, `.sgu` * **Karaoke MIDI**: `.kar` * **MuseData**: `.md` * **Score Writer**: `.scw` * **Bagpipe Music Writer**: `.bmw`, `.bww` * **Encore**: `.enc` **Scanned music** (requires `supportsTasks`, runs our music recognition and spends credits): * **PDF**: `.pdf` * **Images**: `.jpg`, `.png`, `.webp`, `.tiff`, `.gif`, `.avif`, `.heic`, `.heif` The file is identified by its own content, so its extension and any declared type do not have to match. **One file per request**: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need `createOmrJob`, which takes many inputs in one job and bills them as a single document. Its live limits are served by `getOmrCapabilities`. * `ScoreCreationGoogleDriveImport`: Import an existing Google Drive file from the connected Google Drive account. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions/{revision}`). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). If no `collection` is specified, the API will create the score in the most appropriate collection. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (`/v2/collections/app`). If a `collection` is specified and this one has more public privacy settings than the score (e.g. `public` vs `private` for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score `privacy`, and optionally adjust these settings if needed using `PUT /scores/{score}`.
|
|
262
262
|
# @param body [ScoreCreation]
|
|
263
263
|
# @param [Hash] opts the optional parameters
|
|
264
264
|
# @return [ScoreDetails]
|
|
@@ -268,7 +268,7 @@ module FlatApi
|
|
|
268
268
|
end
|
|
269
269
|
|
|
270
270
|
# Create a new score
|
|
271
|
-
# Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import
|
|
271
|
+
# Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import a file to create the new Flat document. **Preferred formats**: * **MusicXML**: `.xml`, `.musicxml`, `.mxl` (compressed) — MIME: `vnd.recordare.musicxml+xml`, `vnd.recordare.musicxml`. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * **MIDI**: `.mid`, `.midi` — MIME: `audio/midi`. Only preserves pitch, timing, and instrument data; notation details are lost. **Also supported** (converted to MusicXML on import, some notation details may be lost): * **Guitar Pro**: `.gp`, `.gp3`, `.gp4`, `.gp5`, `.gpx`, `.gtp` * **MuseScore**: `.mscz`, `.mscx` * **Finale**: `.musx` * **ABC notation**: `.abc` — MIME: `text/vnd.abc` * **PowerTab**: `.ptb` * **Capella**: `.cap`, `.capx` * **MEI**: `.mei` * **Overture**: `.ove` * **TablEdit**: `.tef` * **Band-in-a-Box**: `.mgu`, `.sgu` * **Karaoke MIDI**: `.kar` * **MuseData**: `.md` * **Score Writer**: `.scw` * **Bagpipe Music Writer**: `.bmw`, `.bww` * **Encore**: `.enc` **Scanned music** (requires `supportsTasks`, runs our music recognition and spends credits): * **PDF**: `.pdf` * **Images**: `.jpg`, `.png`, `.webp`, `.tiff`, `.gif`, `.avif`, `.heic`, `.heif` The file is identified by its own content, so its extension and any declared type do not have to match. **One file per request**: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need `createOmrJob`, which takes many inputs in one job and bills them as a single document. Its live limits are served by `getOmrCapabilities`. * `ScoreCreationGoogleDriveImport`: Import an existing Google Drive file from the connected Google Drive account. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions/{revision}`). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). If no `collection` is specified, the API will create the score in the most appropriate collection. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (`/v2/collections/app`). If a `collection` is specified and this one has more public privacy settings than the score (e.g. `public` vs `private` for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score `privacy`, and optionally adjust these settings if needed using `PUT /scores/{score}`.
|
|
272
272
|
# @param body [ScoreCreation]
|
|
273
273
|
# @param [Hash] opts the optional parameters
|
|
274
274
|
# @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
|
|
@@ -289,7 +289,7 @@ module FlatApi
|
|
|
289
289
|
# header parameters
|
|
290
290
|
header_params = opts[:header_params] || {}
|
|
291
291
|
# HTTP header 'Accept' (if needed)
|
|
292
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
293
293
|
# HTTP header 'Content-Type'
|
|
294
294
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
295
295
|
if !content_type.nil?
|
|
@@ -355,7 +355,7 @@ module FlatApi
|
|
|
355
355
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score_revision"
|
|
356
356
|
end
|
|
357
357
|
# resource path
|
|
358
|
-
local_var_path = '/scores/{score}/revisions'.sub('{
|
|
358
|
+
local_var_path = '/scores/{score}/revisions'.sub('{score}', CGI.escape(score.to_s))
|
|
359
359
|
|
|
360
360
|
# query parameters
|
|
361
361
|
query_params = opts[:query_params] || {}
|
|
@@ -363,7 +363,7 @@ module FlatApi
|
|
|
363
363
|
# header parameters
|
|
364
364
|
header_params = opts[:header_params] || {}
|
|
365
365
|
# HTTP header 'Accept' (if needed)
|
|
366
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
367
367
|
# HTTP header 'Content-Type'
|
|
368
368
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
369
369
|
if !content_type.nil?
|
|
@@ -400,7 +400,7 @@ module FlatApi
|
|
|
400
400
|
end
|
|
401
401
|
|
|
402
402
|
# Delete a score
|
|
403
|
-
# This method can be used by
|
|
403
|
+
# This method can be used by anyone that has at least read access to the document: - When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. - When called by a collaborator, the score will be unshared (i.e. removed from the account & own collections). - When called by another user that has the score in its collections, the score will be removed from all the user collections.
|
|
404
404
|
# @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`).
|
|
405
405
|
# @param [Hash] opts the optional parameters
|
|
406
406
|
# @option opts [Boolean] :now If `true`, the score deletion will be scheduled to be done ASAP (default to false)
|
|
@@ -411,7 +411,7 @@ module FlatApi
|
|
|
411
411
|
end
|
|
412
412
|
|
|
413
413
|
# Delete a score
|
|
414
|
-
# This method can be used by
|
|
414
|
+
# This method can be used by anyone that has at least read access to the document: - When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. - When called by a collaborator, the score will be unshared (i.e. removed from the account & own collections). - When called by another user that has the score in its collections, the score will be removed from all the user collections.
|
|
415
415
|
# @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`).
|
|
416
416
|
# @param [Hash] opts the optional parameters
|
|
417
417
|
# @option opts [Boolean] :now If `true`, the score deletion will be scheduled to be done ASAP (default to false)
|
|
@@ -425,7 +425,7 @@ module FlatApi
|
|
|
425
425
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score"
|
|
426
426
|
end
|
|
427
427
|
# resource path
|
|
428
|
-
local_var_path = '/scores/{score}'.sub('{
|
|
428
|
+
local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s))
|
|
429
429
|
|
|
430
430
|
# query parameters
|
|
431
431
|
query_params = opts[:query_params] || {}
|
|
@@ -434,7 +434,7 @@ module FlatApi
|
|
|
434
434
|
# header parameters
|
|
435
435
|
header_params = opts[:header_params] || {}
|
|
436
436
|
# HTTP header 'Accept' (if needed)
|
|
437
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
438
438
|
|
|
439
439
|
# form parameters
|
|
440
440
|
form_params = opts[:form_params] || {}
|
|
@@ -469,6 +469,7 @@ module FlatApi
|
|
|
469
469
|
# @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`).
|
|
470
470
|
# @param comment [String] Unique identifier of a sheet music comment
|
|
471
471
|
# @param [Hash] opts the optional parameters
|
|
472
|
+
# @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}`
|
|
472
473
|
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
473
474
|
# @return [nil]
|
|
474
475
|
def delete_score_comment(score, comment, opts = {})
|
|
@@ -480,6 +481,7 @@ module FlatApi
|
|
|
480
481
|
# @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`).
|
|
481
482
|
# @param comment [String] Unique identifier of a sheet music comment
|
|
482
483
|
# @param [Hash] opts the optional parameters
|
|
484
|
+
# @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}`
|
|
483
485
|
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
484
486
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
485
487
|
def delete_score_comment_with_http_info(score, comment, opts = {})
|
|
@@ -495,16 +497,22 @@ module FlatApi
|
|
|
495
497
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
|
|
496
498
|
end
|
|
497
499
|
# resource path
|
|
498
|
-
local_var_path = '/scores/{score}/comments/{comment}'.sub('{
|
|
500
|
+
local_var_path = '/scores/{score}/comments/{comment}'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
499
501
|
|
|
500
502
|
# query parameters
|
|
501
503
|
query_params = opts[:query_params] || {}
|
|
504
|
+
query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil?
|
|
502
505
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
|
503
506
|
|
|
504
507
|
# header parameters
|
|
505
508
|
header_params = opts[:header_params] || {}
|
|
506
509
|
# HTTP header 'Accept' (if needed)
|
|
507
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
510
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
511
|
+
# HTTP header 'Content-Type'
|
|
512
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
513
|
+
if !content_type.nil?
|
|
514
|
+
header_params['Content-Type'] = content_type
|
|
515
|
+
end
|
|
508
516
|
|
|
509
517
|
# form parameters
|
|
510
518
|
form_params = opts[:form_params] || {}
|
|
@@ -563,7 +571,7 @@ module FlatApi
|
|
|
563
571
|
fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
|
|
564
572
|
end
|
|
565
573
|
# resource path
|
|
566
|
-
local_var_path = '/scores/{score}/tracks/{track}'.sub('{
|
|
574
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
|
|
567
575
|
|
|
568
576
|
# query parameters
|
|
569
577
|
query_params = opts[:query_params] || {}
|
|
@@ -571,7 +579,7 @@ module FlatApi
|
|
|
571
579
|
# header parameters
|
|
572
580
|
header_params = opts[:header_params] || {}
|
|
573
581
|
# HTTP header 'Accept' (if needed)
|
|
574
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
582
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
575
583
|
|
|
576
584
|
# form parameters
|
|
577
585
|
form_params = opts[:form_params] || {}
|
|
@@ -632,7 +640,7 @@ module FlatApi
|
|
|
632
640
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.edit_score"
|
|
633
641
|
end
|
|
634
642
|
# resource path
|
|
635
|
-
local_var_path = '/scores/{score}'.sub('{
|
|
643
|
+
local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s))
|
|
636
644
|
|
|
637
645
|
# query parameters
|
|
638
646
|
query_params = opts[:query_params] || {}
|
|
@@ -640,7 +648,7 @@ module FlatApi
|
|
|
640
648
|
# header parameters
|
|
641
649
|
header_params = opts[:header_params] || {}
|
|
642
650
|
# HTTP header 'Accept' (if needed)
|
|
643
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
644
652
|
# HTTP header 'Content-Type'
|
|
645
653
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
646
654
|
if !content_type.nil?
|
|
@@ -708,7 +716,7 @@ module FlatApi
|
|
|
708
716
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
|
|
709
717
|
end
|
|
710
718
|
# resource path
|
|
711
|
-
local_var_path = '/scores/{score}/fork'.sub('{
|
|
719
|
+
local_var_path = '/scores/{score}/fork'.sub('{score}', CGI.escape(score.to_s))
|
|
712
720
|
|
|
713
721
|
# query parameters
|
|
714
722
|
query_params = opts[:query_params] || {}
|
|
@@ -717,7 +725,7 @@ module FlatApi
|
|
|
717
725
|
# header parameters
|
|
718
726
|
header_params = opts[:header_params] || {}
|
|
719
727
|
# HTTP header 'Accept' (if needed)
|
|
720
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
728
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
721
729
|
# HTTP header 'Content-Type'
|
|
722
730
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
723
731
|
if !content_type.nil?
|
|
@@ -779,7 +787,7 @@ module FlatApi
|
|
|
779
787
|
fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
|
|
780
788
|
end
|
|
781
789
|
# resource path
|
|
782
|
-
local_var_path = '/groups/{group}/scores'.sub('{
|
|
790
|
+
local_var_path = '/groups/{group}/scores'.sub('{group}', CGI.escape(group.to_s))
|
|
783
791
|
|
|
784
792
|
# query parameters
|
|
785
793
|
query_params = opts[:query_params] || {}
|
|
@@ -788,7 +796,7 @@ module FlatApi
|
|
|
788
796
|
# header parameters
|
|
789
797
|
header_params = opts[:header_params] || {}
|
|
790
798
|
# HTTP header 'Accept' (if needed)
|
|
791
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
799
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
792
800
|
|
|
793
801
|
# form parameters
|
|
794
802
|
form_params = opts[:form_params] || {}
|
|
@@ -845,7 +853,7 @@ module FlatApi
|
|
|
845
853
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
|
|
846
854
|
end
|
|
847
855
|
# resource path
|
|
848
|
-
local_var_path = '/scores/{score}'.sub('{
|
|
856
|
+
local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s))
|
|
849
857
|
|
|
850
858
|
# query parameters
|
|
851
859
|
query_params = opts[:query_params] || {}
|
|
@@ -854,7 +862,7 @@ module FlatApi
|
|
|
854
862
|
# header parameters
|
|
855
863
|
header_params = opts[:header_params] || {}
|
|
856
864
|
# HTTP header 'Accept' (if needed)
|
|
857
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
865
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
858
866
|
|
|
859
867
|
# form parameters
|
|
860
868
|
form_params = opts[:form_params] || {}
|
|
@@ -917,7 +925,7 @@ module FlatApi
|
|
|
917
925
|
fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
|
|
918
926
|
end
|
|
919
927
|
# resource path
|
|
920
|
-
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{
|
|
928
|
+
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{score}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s))
|
|
921
929
|
|
|
922
930
|
# query parameters
|
|
923
931
|
query_params = opts[:query_params] || {}
|
|
@@ -926,7 +934,7 @@ module FlatApi
|
|
|
926
934
|
# header parameters
|
|
927
935
|
header_params = opts[:header_params] || {}
|
|
928
936
|
# HTTP header 'Accept' (if needed)
|
|
929
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
937
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
930
938
|
|
|
931
939
|
# form parameters
|
|
932
940
|
form_params = opts[:form_params] || {}
|
|
@@ -983,7 +991,7 @@ module FlatApi
|
|
|
983
991
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
|
|
984
992
|
end
|
|
985
993
|
# resource path
|
|
986
|
-
local_var_path = '/scores/{score}/collaborators'.sub('{
|
|
994
|
+
local_var_path = '/scores/{score}/collaborators'.sub('{score}', CGI.escape(score.to_s))
|
|
987
995
|
|
|
988
996
|
# query parameters
|
|
989
997
|
query_params = opts[:query_params] || {}
|
|
@@ -992,7 +1000,7 @@ module FlatApi
|
|
|
992
1000
|
# header parameters
|
|
993
1001
|
header_params = opts[:header_params] || {}
|
|
994
1002
|
# HTTP header 'Accept' (if needed)
|
|
995
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1003
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
996
1004
|
|
|
997
1005
|
# form parameters
|
|
998
1006
|
form_params = opts[:form_params] || {}
|
|
@@ -1027,10 +1035,10 @@ module FlatApi
|
|
|
1027
1035
|
# This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
|
|
1028
1036
|
# @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`).
|
|
1029
1037
|
# @param [Hash] opts the optional parameters
|
|
1030
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
1031
1038
|
# @option opts [String] :type Filter the comments by type
|
|
1032
1039
|
# @option opts [String] :sort Sort
|
|
1033
1040
|
# @option opts [String] :direction Sort direction
|
|
1041
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
1034
1042
|
# @return [Array<ScoreComment>]
|
|
1035
1043
|
def get_score_comments(score, opts = {})
|
|
1036
1044
|
data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
|
|
@@ -1041,10 +1049,10 @@ module FlatApi
|
|
|
1041
1049
|
# This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
|
|
1042
1050
|
# @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`).
|
|
1043
1051
|
# @param [Hash] opts the optional parameters
|
|
1044
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
1045
1052
|
# @option opts [String] :type Filter the comments by type
|
|
1046
1053
|
# @option opts [String] :sort Sort
|
|
1047
1054
|
# @option opts [String] :direction Sort direction
|
|
1055
|
+
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
1048
1056
|
# @return [Array<(Array<ScoreComment>, Integer, Hash)>] Array<ScoreComment> data, response status code and response headers
|
|
1049
1057
|
def get_score_comments_with_http_info(score, opts = {})
|
|
1050
1058
|
if @api_client.config.debugging
|
|
@@ -1067,19 +1075,19 @@ module FlatApi
|
|
|
1067
1075
|
fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
|
|
1068
1076
|
end
|
|
1069
1077
|
# resource path
|
|
1070
|
-
local_var_path = '/scores/{score}/comments'.sub('{
|
|
1078
|
+
local_var_path = '/scores/{score}/comments'.sub('{score}', CGI.escape(score.to_s))
|
|
1071
1079
|
|
|
1072
1080
|
# query parameters
|
|
1073
1081
|
query_params = opts[:query_params] || {}
|
|
1074
|
-
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
|
1075
1082
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
1076
1083
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1077
1084
|
query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
|
|
1085
|
+
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
|
1078
1086
|
|
|
1079
1087
|
# header parameters
|
|
1080
1088
|
header_params = opts[:header_params] || {}
|
|
1081
1089
|
# HTTP header 'Accept' (if needed)
|
|
1082
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1090
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1083
1091
|
|
|
1084
1092
|
# form parameters
|
|
1085
1093
|
form_params = opts[:form_params] || {}
|
|
@@ -1142,7 +1150,7 @@ module FlatApi
|
|
|
1142
1150
|
fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
|
|
1143
1151
|
end
|
|
1144
1152
|
# resource path
|
|
1145
|
-
local_var_path = '/scores/{score}/revisions/{revision}'.sub('{
|
|
1153
|
+
local_var_path = '/scores/{score}/revisions/{revision}'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s))
|
|
1146
1154
|
|
|
1147
1155
|
# query parameters
|
|
1148
1156
|
query_params = opts[:query_params] || {}
|
|
@@ -1151,7 +1159,7 @@ module FlatApi
|
|
|
1151
1159
|
# header parameters
|
|
1152
1160
|
header_params = opts[:header_params] || {}
|
|
1153
1161
|
# HTTP header 'Accept' (if needed)
|
|
1154
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1155
1163
|
|
|
1156
1164
|
# form parameters
|
|
1157
1165
|
form_params = opts[:form_params] || {}
|
|
@@ -1183,7 +1191,7 @@ module FlatApi
|
|
|
1183
1191
|
end
|
|
1184
1192
|
|
|
1185
1193
|
# Get a score revision data
|
|
1186
|
-
# Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`.
|
|
1194
|
+
# Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
|
|
1187
1195
|
# @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`).
|
|
1188
1196
|
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
|
1189
1197
|
# @param format [String] The format of the file you will retrieve
|
|
@@ -1199,7 +1207,7 @@ module FlatApi
|
|
|
1199
1207
|
end
|
|
1200
1208
|
|
|
1201
1209
|
# Get a score revision data
|
|
1202
|
-
# Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`.
|
|
1210
|
+
# Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
|
|
1203
1211
|
# @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`).
|
|
1204
1212
|
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
|
1205
1213
|
# @param format [String] The format of the file you will retrieve
|
|
@@ -1226,12 +1234,12 @@ module FlatApi
|
|
|
1226
1234
|
fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
|
|
1227
1235
|
end
|
|
1228
1236
|
# verify enum value
|
|
1229
|
-
allowable_values = ["json", "mxl", "xml", "mp3", "wav", "midi", "thumbnail.png", "synchronizationPoints"]
|
|
1237
|
+
allowable_values = ["json", "mxl", "xml", "abc", "mp3", "wav", "midi", "flat", "thumbnail.png", "synchronizationPoints"]
|
|
1230
1238
|
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
|
1231
1239
|
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
1232
1240
|
end
|
|
1233
1241
|
# resource path
|
|
1234
|
-
local_var_path = '/scores/{score}/revisions/{revision}/{format}'.sub('{
|
|
1242
|
+
local_var_path = '/scores/{score}/revisions/{revision}/{format}'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s)).sub('{format}', CGI.escape(format.to_s))
|
|
1235
1243
|
|
|
1236
1244
|
# query parameters
|
|
1237
1245
|
query_params = opts[:query_params] || {}
|
|
@@ -1243,7 +1251,7 @@ module FlatApi
|
|
|
1243
1251
|
# header parameters
|
|
1244
1252
|
header_params = opts[:header_params] || {}
|
|
1245
1253
|
# HTTP header 'Accept' (if needed)
|
|
1246
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png'])
|
|
1254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png', 'application/octet-stream']) unless header_params['Accept']
|
|
1247
1255
|
|
|
1248
1256
|
# form parameters
|
|
1249
1257
|
form_params = opts[:form_params] || {}
|
|
@@ -1300,7 +1308,7 @@ module FlatApi
|
|
|
1300
1308
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
|
|
1301
1309
|
end
|
|
1302
1310
|
# resource path
|
|
1303
|
-
local_var_path = '/scores/{score}/revisions'.sub('{
|
|
1311
|
+
local_var_path = '/scores/{score}/revisions'.sub('{score}', CGI.escape(score.to_s))
|
|
1304
1312
|
|
|
1305
1313
|
# query parameters
|
|
1306
1314
|
query_params = opts[:query_params] || {}
|
|
@@ -1309,7 +1317,7 @@ module FlatApi
|
|
|
1309
1317
|
# header parameters
|
|
1310
1318
|
header_params = opts[:header_params] || {}
|
|
1311
1319
|
# HTTP header 'Accept' (if needed)
|
|
1312
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1320
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1313
1321
|
|
|
1314
1322
|
# form parameters
|
|
1315
1323
|
form_params = opts[:form_params] || {}
|
|
@@ -1364,7 +1372,7 @@ module FlatApi
|
|
|
1364
1372
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
|
|
1365
1373
|
end
|
|
1366
1374
|
# resource path
|
|
1367
|
-
local_var_path = '/scores/{score}/submissions'.sub('{
|
|
1375
|
+
local_var_path = '/scores/{score}/submissions'.sub('{score}', CGI.escape(score.to_s))
|
|
1368
1376
|
|
|
1369
1377
|
# query parameters
|
|
1370
1378
|
query_params = opts[:query_params] || {}
|
|
@@ -1372,7 +1380,7 @@ module FlatApi
|
|
|
1372
1380
|
# header parameters
|
|
1373
1381
|
header_params = opts[:header_params] || {}
|
|
1374
1382
|
# HTTP header 'Accept' (if needed)
|
|
1375
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1383
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1376
1384
|
|
|
1377
1385
|
# form parameters
|
|
1378
1386
|
form_params = opts[:form_params] || {}
|
|
@@ -1433,7 +1441,7 @@ module FlatApi
|
|
|
1433
1441
|
fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
|
|
1434
1442
|
end
|
|
1435
1443
|
# resource path
|
|
1436
|
-
local_var_path = '/scores/{score}/tracks/{track}'.sub('{
|
|
1444
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
|
|
1437
1445
|
|
|
1438
1446
|
# query parameters
|
|
1439
1447
|
query_params = opts[:query_params] || {}
|
|
@@ -1442,7 +1450,7 @@ module FlatApi
|
|
|
1442
1450
|
# header parameters
|
|
1443
1451
|
header_params = opts[:header_params] || {}
|
|
1444
1452
|
# HTTP header 'Accept' (if needed)
|
|
1445
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1453
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1446
1454
|
|
|
1447
1455
|
# form parameters
|
|
1448
1456
|
form_params = opts[:form_params] || {}
|
|
@@ -1511,7 +1519,7 @@ module FlatApi
|
|
|
1511
1519
|
end
|
|
1512
1520
|
|
|
1513
1521
|
# resource path
|
|
1514
|
-
local_var_path = '/users/{user}/likes'.sub('{
|
|
1522
|
+
local_var_path = '/users/{user}/likes'.sub('{user}', CGI.escape(user.to_s))
|
|
1515
1523
|
|
|
1516
1524
|
# query parameters
|
|
1517
1525
|
query_params = opts[:query_params] || {}
|
|
@@ -1523,7 +1531,7 @@ module FlatApi
|
|
|
1523
1531
|
# header parameters
|
|
1524
1532
|
header_params = opts[:header_params] || {}
|
|
1525
1533
|
# HTTP header 'Accept' (if needed)
|
|
1526
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1527
1535
|
|
|
1528
1536
|
# form parameters
|
|
1529
1537
|
form_params = opts[:form_params] || {}
|
|
@@ -1555,10 +1563,15 @@ module FlatApi
|
|
|
1555
1563
|
end
|
|
1556
1564
|
|
|
1557
1565
|
# List user's scores
|
|
1558
|
-
# Get the list of public scores owned by a User.
|
|
1566
|
+
# Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores.
|
|
1559
1567
|
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
|
1560
1568
|
# @param [Hash] opts the optional parameters
|
|
1561
|
-
# @option opts [
|
|
1569
|
+
# @option opts [Boolean] :paginate When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (default to false)
|
|
1570
|
+
# @option opts [String] :sort Sort
|
|
1571
|
+
# @option opts [String] :direction Sort direction
|
|
1572
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
|
|
1573
|
+
# @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.
|
|
1574
|
+
# @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.
|
|
1562
1575
|
# @return [Array<ScoreDetails>]
|
|
1563
1576
|
def get_user_scores(user, opts = {})
|
|
1564
1577
|
data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
|
|
@@ -1566,10 +1579,15 @@ module FlatApi
|
|
|
1566
1579
|
end
|
|
1567
1580
|
|
|
1568
1581
|
# List user's scores
|
|
1569
|
-
# Get the list of public scores owned by a User.
|
|
1582
|
+
# Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores.
|
|
1570
1583
|
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
|
1571
1584
|
# @param [Hash] opts the optional parameters
|
|
1572
|
-
# @option opts [
|
|
1585
|
+
# @option opts [Boolean] :paginate When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (default to false)
|
|
1586
|
+
# @option opts [String] :sort Sort
|
|
1587
|
+
# @option opts [String] :direction Sort direction
|
|
1588
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
|
|
1589
|
+
# @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.
|
|
1590
|
+
# @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data.
|
|
1573
1591
|
# @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
|
1574
1592
|
def get_user_scores_with_http_info(user, opts = {})
|
|
1575
1593
|
if @api_client.config.debugging
|
|
@@ -1579,17 +1597,38 @@ module FlatApi
|
|
|
1579
1597
|
if @api_client.config.client_side_validation && user.nil?
|
|
1580
1598
|
fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
|
|
1581
1599
|
end
|
|
1600
|
+
allowable_values = ["creationDate", "modificationDate", "title"]
|
|
1601
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1602
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1603
|
+
end
|
|
1604
|
+
allowable_values = ["asc", "desc"]
|
|
1605
|
+
if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
|
|
1606
|
+
fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
|
|
1607
|
+
end
|
|
1608
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1609
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be smaller than or equal to 100.'
|
|
1610
|
+
end
|
|
1611
|
+
|
|
1612
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1613
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be greater than or equal to 1.'
|
|
1614
|
+
end
|
|
1615
|
+
|
|
1582
1616
|
# resource path
|
|
1583
|
-
local_var_path = '/users/{user}/scores'.sub('{
|
|
1617
|
+
local_var_path = '/users/{user}/scores'.sub('{user}', CGI.escape(user.to_s))
|
|
1584
1618
|
|
|
1585
1619
|
# query parameters
|
|
1586
1620
|
query_params = opts[:query_params] || {}
|
|
1587
|
-
query_params[:'
|
|
1621
|
+
query_params[:'paginate'] = opts[:'paginate'] if !opts[:'paginate'].nil?
|
|
1622
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1623
|
+
query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
|
|
1624
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1625
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
|
1626
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
|
1588
1627
|
|
|
1589
1628
|
# header parameters
|
|
1590
1629
|
header_params = opts[:header_params] || {}
|
|
1591
1630
|
# HTTP header 'Accept' (if needed)
|
|
1592
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1631
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1593
1632
|
|
|
1594
1633
|
# form parameters
|
|
1595
1634
|
form_params = opts[:form_params] || {}
|
|
@@ -1621,6 +1660,7 @@ module FlatApi
|
|
|
1621
1660
|
end
|
|
1622
1661
|
|
|
1623
1662
|
# List the audio or video tracks linked to a score
|
|
1663
|
+
# List all audio or video tracks linked to a score. **Access Control for Performance Submission Tracks:** Tracks with `purpose: 'performanceSubmission'` are filtered based on user role: * **Students**: Can only see their own performance submission tracks, plus all non-performance tracks * **Teachers and score admins**: Can see all tracks from all students The `assignment` query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
|
|
1624
1664
|
# @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`).
|
|
1625
1665
|
# @param [Hash] opts the optional parameters
|
|
1626
1666
|
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
@@ -1633,6 +1673,7 @@ module FlatApi
|
|
|
1633
1673
|
end
|
|
1634
1674
|
|
|
1635
1675
|
# List the audio or video tracks linked to a score
|
|
1676
|
+
# List all audio or video tracks linked to a score. **Access Control for Performance Submission Tracks:** Tracks with `purpose: 'performanceSubmission'` are filtered based on user role: * **Students**: Can only see their own performance submission tracks, plus all non-performance tracks * **Teachers and score admins**: Can see all tracks from all students The `assignment` query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
|
|
1636
1677
|
# @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`).
|
|
1637
1678
|
# @param [Hash] opts the optional parameters
|
|
1638
1679
|
# @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
|
@@ -1648,7 +1689,7 @@ module FlatApi
|
|
|
1648
1689
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
|
|
1649
1690
|
end
|
|
1650
1691
|
# resource path
|
|
1651
|
-
local_var_path = '/scores/{score}/tracks'.sub('{
|
|
1692
|
+
local_var_path = '/scores/{score}/tracks'.sub('{score}', CGI.escape(score.to_s))
|
|
1652
1693
|
|
|
1653
1694
|
# query parameters
|
|
1654
1695
|
query_params = opts[:query_params] || {}
|
|
@@ -1659,7 +1700,7 @@ module FlatApi
|
|
|
1659
1700
|
# header parameters
|
|
1660
1701
|
header_params = opts[:header_params] || {}
|
|
1661
1702
|
# HTTP header 'Accept' (if needed)
|
|
1662
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1703
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1663
1704
|
|
|
1664
1705
|
# form parameters
|
|
1665
1706
|
form_params = opts[:form_params] || {}
|
|
@@ -1720,7 +1761,7 @@ module FlatApi
|
|
|
1720
1761
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
|
|
1721
1762
|
end
|
|
1722
1763
|
# resource path
|
|
1723
|
-
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{
|
|
1764
|
+
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
1724
1765
|
|
|
1725
1766
|
# query parameters
|
|
1726
1767
|
query_params = opts[:query_params] || {}
|
|
@@ -1729,7 +1770,7 @@ module FlatApi
|
|
|
1729
1770
|
# header parameters
|
|
1730
1771
|
header_params = opts[:header_params] || {}
|
|
1731
1772
|
# HTTP header 'Accept' (if needed)
|
|
1732
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1773
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1733
1774
|
|
|
1734
1775
|
# form parameters
|
|
1735
1776
|
form_params = opts[:form_params] || {}
|
|
@@ -1790,7 +1831,7 @@ module FlatApi
|
|
|
1790
1831
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
|
|
1791
1832
|
end
|
|
1792
1833
|
# resource path
|
|
1793
|
-
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{
|
|
1834
|
+
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
1794
1835
|
|
|
1795
1836
|
# query parameters
|
|
1796
1837
|
query_params = opts[:query_params] || {}
|
|
@@ -1799,7 +1840,7 @@ module FlatApi
|
|
|
1799
1840
|
# header parameters
|
|
1800
1841
|
header_params = opts[:header_params] || {}
|
|
1801
1842
|
# HTTP header 'Accept' (if needed)
|
|
1802
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1843
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1803
1844
|
|
|
1804
1845
|
# form parameters
|
|
1805
1846
|
form_params = opts[:form_params] || {}
|
|
@@ -1862,7 +1903,7 @@ module FlatApi
|
|
|
1862
1903
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
|
|
1863
1904
|
end
|
|
1864
1905
|
# resource path
|
|
1865
|
-
local_var_path = '/scores/{score}/comments'.sub('{
|
|
1906
|
+
local_var_path = '/scores/{score}/comments'.sub('{score}', CGI.escape(score.to_s))
|
|
1866
1907
|
|
|
1867
1908
|
# query parameters
|
|
1868
1909
|
query_params = opts[:query_params] || {}
|
|
@@ -1871,7 +1912,7 @@ module FlatApi
|
|
|
1871
1912
|
# header parameters
|
|
1872
1913
|
header_params = opts[:header_params] || {}
|
|
1873
1914
|
# HTTP header 'Accept' (if needed)
|
|
1874
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1915
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1875
1916
|
# HTTP header 'Content-Type'
|
|
1876
1917
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1877
1918
|
if !content_type.nil?
|
|
@@ -1912,6 +1953,7 @@ module FlatApi
|
|
|
1912
1953
|
# @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`).
|
|
1913
1954
|
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
|
1914
1955
|
# @param [Hash] opts the optional parameters
|
|
1956
|
+
# @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}`
|
|
1915
1957
|
# @return [nil]
|
|
1916
1958
|
def remove_score_collaborator(score, collaborator, opts = {})
|
|
1917
1959
|
remove_score_collaborator_with_http_info(score, collaborator, opts)
|
|
@@ -1923,6 +1965,7 @@ module FlatApi
|
|
|
1923
1965
|
# @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`).
|
|
1924
1966
|
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
|
1925
1967
|
# @param [Hash] opts the optional parameters
|
|
1968
|
+
# @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}`
|
|
1926
1969
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1927
1970
|
def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
|
|
1928
1971
|
if @api_client.config.debugging
|
|
@@ -1937,15 +1980,21 @@ module FlatApi
|
|
|
1937
1980
|
fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
|
|
1938
1981
|
end
|
|
1939
1982
|
# resource path
|
|
1940
|
-
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{
|
|
1983
|
+
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{score}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s))
|
|
1941
1984
|
|
|
1942
1985
|
# query parameters
|
|
1943
1986
|
query_params = opts[:query_params] || {}
|
|
1987
|
+
query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil?
|
|
1944
1988
|
|
|
1945
1989
|
# header parameters
|
|
1946
1990
|
header_params = opts[:header_params] || {}
|
|
1947
1991
|
# HTTP header 'Accept' (if needed)
|
|
1948
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1992
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1993
|
+
# HTTP header 'Content-Type'
|
|
1994
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
1995
|
+
if !content_type.nil?
|
|
1996
|
+
header_params['Content-Type'] = content_type
|
|
1997
|
+
end
|
|
1949
1998
|
|
|
1950
1999
|
# form parameters
|
|
1951
2000
|
form_params = opts[:form_params] || {}
|
|
@@ -2000,7 +2049,7 @@ module FlatApi
|
|
|
2000
2049
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
|
|
2001
2050
|
end
|
|
2002
2051
|
# resource path
|
|
2003
|
-
local_var_path = '/scores/{score}/untrash'.sub('{
|
|
2052
|
+
local_var_path = '/scores/{score}/untrash'.sub('{score}', CGI.escape(score.to_s))
|
|
2004
2053
|
|
|
2005
2054
|
# query parameters
|
|
2006
2055
|
query_params = opts[:query_params] || {}
|
|
@@ -2008,7 +2057,7 @@ module FlatApi
|
|
|
2008
2057
|
# header parameters
|
|
2009
2058
|
header_params = opts[:header_params] || {}
|
|
2010
2059
|
# HTTP header 'Accept' (if needed)
|
|
2011
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2060
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2012
2061
|
|
|
2013
2062
|
# form parameters
|
|
2014
2063
|
form_params = opts[:form_params] || {}
|
|
@@ -2075,7 +2124,7 @@ module FlatApi
|
|
|
2075
2124
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
|
|
2076
2125
|
end
|
|
2077
2126
|
# resource path
|
|
2078
|
-
local_var_path = '/scores/{score}/comments/{comment}'.sub('{
|
|
2127
|
+
local_var_path = '/scores/{score}/comments/{comment}'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
|
|
2079
2128
|
|
|
2080
2129
|
# query parameters
|
|
2081
2130
|
query_params = opts[:query_params] || {}
|
|
@@ -2084,7 +2133,7 @@ module FlatApi
|
|
|
2084
2133
|
# header parameters
|
|
2085
2134
|
header_params = opts[:header_params] || {}
|
|
2086
2135
|
# HTTP header 'Accept' (if needed)
|
|
2087
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2136
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2088
2137
|
# HTTP header 'Content-Type'
|
|
2089
2138
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2090
2139
|
if !content_type.nil?
|
|
@@ -2154,7 +2203,7 @@ module FlatApi
|
|
|
2154
2203
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
|
|
2155
2204
|
end
|
|
2156
2205
|
# resource path
|
|
2157
|
-
local_var_path = '/scores/{score}/tracks/{track}'.sub('{
|
|
2206
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
|
|
2158
2207
|
|
|
2159
2208
|
# query parameters
|
|
2160
2209
|
query_params = opts[:query_params] || {}
|
|
@@ -2162,7 +2211,7 @@ module FlatApi
|
|
|
2162
2211
|
# header parameters
|
|
2163
2212
|
header_params = opts[:header_params] || {}
|
|
2164
2213
|
# HTTP header 'Accept' (if needed)
|
|
2165
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2166
2215
|
# HTTP header 'Content-Type'
|
|
2167
2216
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2168
2217
|
if !content_type.nil?
|