flat_api 0.1.2 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/flat_api/api/account_api.rb +31 -21
- data/lib/flat_api/api/class_api.rb +1405 -405
- data/lib/flat_api/api/collection_api.rb +684 -0
- data/lib/flat_api/api/edu_resources_api.rb +851 -0
- data/lib/flat_api/api/group_api.rb +81 -55
- data/lib/flat_api/api/organization_api.rb +524 -180
- data/lib/flat_api/api/score_api.rb +1034 -570
- data/lib/flat_api/api/task_api.rb +85 -0
- data/lib/flat_api/api/user_api.rb +114 -76
- data/lib/flat_api/api_client.rb +112 -107
- data/lib/flat_api/api_error.rb +24 -4
- data/lib/flat_api/configuration.rb +105 -16
- data/lib/flat_api/models/api_access_token.rb +268 -0
- data/lib/flat_api/models/app_scopes.rb +59 -0
- data/lib/flat_api/models/assignment.rb +192 -101
- data/lib/flat_api/models/assignment_capabilities.rb +283 -0
- data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +240 -0
- data/lib/flat_api/models/assignment_copy.rb +80 -169
- data/lib/flat_api/models/assignment_copy_response.rb +430 -0
- data/lib/flat_api/models/assignment_copy_to_class.rb +243 -0
- data/lib/flat_api/models/assignment_copy_to_resource_library.rb +233 -0
- data/lib/flat_api/models/assignment_submission.rb +249 -66
- data/lib/flat_api/models/assignment_submission_comment.rb +276 -0
- data/lib/flat_api/models/assignment_submission_comment_creation.rb +223 -0
- data/lib/flat_api/models/assignment_submission_comments.rb +225 -0
- data/lib/flat_api/models/assignment_submission_history.rb +384 -0
- data/lib/flat_api/models/assignment_submission_history_attachment.rb +235 -0
- data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
- data/lib/flat_api/models/assignment_submission_lti.rb +222 -0
- data/lib/flat_api/models/assignment_submission_playback_inner.rb +240 -0
- data/lib/flat_api/models/assignment_submission_state.rb +42 -0
- data/lib/flat_api/models/assignment_submission_update.rb +150 -50
- data/lib/flat_api/models/assignment_type.rb +44 -0
- data/lib/flat_api/models/assignment_update.rb +407 -0
- data/lib/flat_api/models/class_assignment.rb +613 -0
- data/lib/flat_api/models/class_assignment_all_of_canvas.rb +226 -0
- data/lib/flat_api/models/class_assignment_all_of_lti.rb +216 -0
- data/lib/flat_api/models/class_assignment_all_of_mfc.rb +226 -0
- data/lib/flat_api/models/class_assignment_update.rb +509 -0
- data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +217 -0
- data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +219 -0
- data/lib/flat_api/models/class_attachment_creation.rb +110 -41
- data/lib/flat_api/models/class_creation.rb +144 -43
- data/lib/flat_api/models/class_details.rb +175 -60
- data/lib/flat_api/models/class_details_canvas.rb +61 -34
- data/lib/flat_api/models/class_details_clever.rb +76 -48
- data/lib/flat_api/models/class_details_google_classroom.rb +66 -59
- data/lib/flat_api/models/class_details_google_drive.rb +63 -36
- data/lib/flat_api/models/class_details_issues.rb +218 -0
- data/lib/flat_api/models/class_details_issues_sync_inner.rb +270 -0
- data/lib/flat_api/models/class_details_lti.rb +65 -38
- data/lib/flat_api/models/class_details_mfc.rb +226 -0
- data/lib/flat_api/models/class_details_microsoft_graph.rb +215 -0
- data/lib/flat_api/models/class_grade_level.rb +43 -0
- data/lib/flat_api/models/class_roles.rb +18 -9
- data/lib/flat_api/models/class_state.rb +18 -9
- data/lib/flat_api/models/class_update.rb +144 -42
- data/lib/flat_api/models/collection.rb +373 -0
- data/lib/flat_api/models/collection_app.rb +236 -0
- data/lib/flat_api/models/collection_capabilities.rb +291 -0
- data/lib/flat_api/models/collection_creation.rb +288 -0
- data/lib/flat_api/models/collection_modification.rb +275 -0
- data/lib/flat_api/models/collection_privacy.rb +39 -0
- data/lib/flat_api/models/collection_type.rb +44 -0
- data/lib/flat_api/models/edu_library.rb +292 -0
- data/lib/flat_api/models/edu_resource.rb +366 -0
- data/lib/flat_api/models/edu_resource_capabilities.rb +236 -0
- data/lib/flat_api/models/edu_resource_copy.rb +223 -0
- data/lib/flat_api/models/edu_resource_creation.rb +301 -0
- data/lib/flat_api/models/edu_resource_folder.rb +216 -0
- data/lib/flat_api/models/edu_resource_lti_link.rb +223 -0
- data/lib/flat_api/models/edu_resource_move.rb +223 -0
- data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
- data/lib/flat_api/models/edu_resource_resource.rb +105 -0
- data/lib/flat_api/models/edu_resource_type.rb +40 -0
- data/lib/flat_api/models/edu_resource_update.rb +277 -0
- data/lib/flat_api/models/edu_resource_use_in_class.rb +233 -0
- data/lib/flat_api/models/flat_error_response.rb +79 -38
- data/lib/flat_api/models/flat_locales.rb +30 -10
- data/lib/flat_api/models/google_classroom_coursework.rb +76 -38
- data/lib/flat_api/models/google_classroom_submission.rb +84 -36
- data/lib/flat_api/models/group.rb +72 -44
- data/lib/flat_api/models/group_details.rb +92 -43
- data/lib/flat_api/models/group_type.rb +18 -9
- data/lib/flat_api/models/license_mode.rb +18 -9
- data/lib/flat_api/models/license_sources.rb +21 -9
- data/lib/flat_api/models/lms_name.rb +19 -9
- data/lib/flat_api/models/lti_credentials.rb +95 -46
- data/lib/flat_api/models/lti_credentials_creation.rb +91 -38
- data/lib/flat_api/models/media_attachment.rb +167 -70
- data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
- data/lib/flat_api/models/microsoft_graph_assignment.rb +248 -0
- data/lib/flat_api/models/microsoft_graph_submission.rb +240 -0
- data/lib/flat_api/models/organization_invitation.rb +139 -44
- data/lib/flat_api/models/organization_invitation_creation.rb +99 -35
- data/lib/flat_api/models/organization_roles.rb +18 -9
- data/lib/flat_api/models/organization_user_access_token_creation.rb +225 -0
- data/lib/flat_api/models/resource_collaborator.rb +403 -0
- data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +85 -48
- data/lib/flat_api/models/resource_rights.rb +318 -0
- data/lib/flat_api/models/score_comment.rb +93 -56
- data/lib/flat_api/models/score_comment_context.rb +103 -59
- data/lib/flat_api/models/score_comment_creation.rb +70 -41
- data/lib/flat_api/models/score_comment_moderation.rb +260 -0
- data/lib/flat_api/models/score_comment_update.rb +82 -49
- data/lib/flat_api/models/score_comments_counts.rb +67 -40
- data/lib/flat_api/models/score_creation.rb +81 -215
- data/lib/flat_api/models/score_creation_builder_data.rb +298 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +230 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +322 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +274 -0
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +269 -0
- data/lib/flat_api/models/score_creation_common.rb +268 -0
- data/lib/flat_api/models/score_creation_file_import.rb +324 -0
- data/lib/flat_api/models/score_creation_google_drive_import.rb +291 -0
- data/lib/flat_api/models/score_creation_type.rb +19 -9
- data/lib/flat_api/models/score_details.rb +274 -83
- data/lib/flat_api/models/score_fork.rb +94 -32
- data/lib/flat_api/models/score_license.rb +19 -9
- data/lib/flat_api/models/score_likes_counts.rb +83 -35
- data/lib/flat_api/models/score_modification.rb +175 -52
- data/lib/flat_api/models/score_plays_counts.rb +236 -0
- data/lib/flat_api/models/score_privacy.rb +18 -9
- data/lib/flat_api/models/score_revision.rb +80 -43
- data/lib/flat_api/models/score_revision_creation.rb +105 -40
- data/lib/flat_api/models/score_revision_statistics.rb +83 -36
- data/lib/flat_api/models/score_source.rb +61 -35
- data/lib/flat_api/models/score_summary.rb +124 -40
- data/lib/flat_api/models/score_track.rb +172 -51
- data/lib/flat_api/models/score_track_creation.rb +101 -39
- data/lib/flat_api/models/score_track_point.rb +70 -38
- data/lib/flat_api/models/score_track_purpose.rb +40 -0
- data/lib/flat_api/models/score_track_state.rb +18 -9
- data/lib/flat_api/models/score_track_type.rb +18 -9
- data/lib/flat_api/models/score_track_update.rb +88 -37
- data/lib/flat_api/models/score_views_counts.rb +62 -35
- data/lib/flat_api/models/task.rb +364 -0
- data/lib/flat_api/models/task_export_options.rb +218 -0
- data/lib/flat_api/models/task_progress.rb +226 -0
- data/lib/flat_api/models/task_result.rb +226 -0
- data/lib/flat_api/models/tutteo_product.rb +42 -0
- data/lib/flat_api/models/user_admin_update.rb +219 -41
- data/lib/flat_api/models/user_azure_details.rb +235 -0
- data/lib/flat_api/models/user_basics.rb +187 -55
- data/lib/flat_api/models/user_community_profile_links.rb +272 -0
- data/lib/flat_api/models/user_creation.rb +215 -49
- data/lib/flat_api/models/user_details.rb +258 -93
- data/lib/flat_api/models/user_details_admin.rb +220 -68
- data/lib/flat_api/models/user_details_admin_all_of_license.rb +278 -0
- data/lib/flat_api/models/user_public.rb +242 -79
- data/lib/flat_api/models/user_public_summary.rb +201 -61
- data/lib/flat_api/models/user_signin_link.rb +225 -0
- data/lib/flat_api/models/user_signin_link_creation.rb +217 -0
- data/lib/flat_api/version.rb +5 -5
- data/lib/flat_api.rb +87 -15
- data/spec/api/account_api_spec.rb +11 -10
- data/spec/api/class_api_spec.rb +212 -68
- data/spec/api/collection_api_spec.rb +158 -0
- data/spec/api/edu_resources_api_spec.rb +181 -0
- data/spec/api/group_api_spec.rb +14 -15
- data/spec/api/organization_api_spec.rb +78 -39
- data/spec/api/score_api_spec.rb +139 -110
- data/spec/api/task_api_spec.rb +47 -0
- data/spec/api/user_api_spec.rb +28 -26
- data/spec/models/api_access_token_spec.rb +66 -0
- data/spec/models/app_scopes_spec.rb +30 -0
- data/spec/models/assignment_capabilities_can_publish_in_class_error_spec.rb +42 -0
- data/spec/models/assignment_capabilities_spec.rb +60 -0
- data/spec/models/assignment_copy_response_spec.rb +124 -0
- data/spec/models/assignment_copy_spec.rb +13 -23
- data/spec/models/assignment_copy_to_class_spec.rb +48 -0
- data/spec/models/assignment_copy_to_resource_library_spec.rb +42 -0
- data/spec/models/assignment_spec.rb +51 -39
- data/spec/models/assignment_submission_comment_creation_spec.rb +36 -0
- data/spec/models/assignment_submission_comment_spec.rb +72 -0
- data/spec/models/assignment_submission_comments_spec.rb +42 -0
- data/spec/models/assignment_submission_history_attachment_spec.rb +48 -0
- data/spec/models/assignment_submission_history_spec.rb +112 -0
- data/spec/models/assignment_submission_history_state_spec.rb +30 -0
- data/spec/models/assignment_submission_lti_spec.rb +36 -0
- data/spec/models/assignment_submission_playback_inner_spec.rb +42 -0
- data/spec/models/assignment_submission_spec.rb +68 -32
- data/spec/models/assignment_submission_state_spec.rb +30 -0
- data/spec/models/assignment_submission_update_spec.rb +29 -23
- data/spec/models/assignment_type_spec.rb +30 -0
- data/spec/models/assignment_update_spec.rb +100 -0
- data/spec/models/class_assignment_all_of_canvas_spec.rb +42 -0
- data/spec/models/class_assignment_all_of_lti_spec.rb +36 -0
- data/spec/models/class_assignment_all_of_mfc_spec.rb +42 -0
- data/spec/models/class_assignment_spec.rb +216 -0
- data/spec/models/class_assignment_update_all_of_google_classroom_spec.rb +36 -0
- data/spec/models/class_assignment_update_all_of_microsoft_graph_spec.rb +36 -0
- data/spec/models/class_assignment_update_spec.rb +150 -0
- data/spec/models/class_attachment_creation_spec.rb +41 -23
- data/spec/models/class_creation_spec.rb +34 -18
- data/spec/models/class_details_canvas_spec.rb +12 -18
- data/spec/models/class_details_clever_spec.rb +21 -27
- data/spec/models/class_details_google_classroom_spec.rb +12 -30
- data/spec/models/class_details_google_drive_spec.rb +12 -18
- data/spec/models/class_details_issues_spec.rb +36 -0
- data/spec/models/class_details_issues_sync_inner_spec.rb +52 -0
- data/spec/models/class_details_lti_spec.rb +13 -19
- data/spec/models/class_details_mfc_spec.rb +42 -0
- data/spec/models/class_details_microsoft_graph_spec.rb +36 -0
- data/spec/models/class_details_spec.rb +68 -34
- data/spec/models/class_grade_level_spec.rb +30 -0
- data/spec/models/class_roles_spec.rb +10 -16
- data/spec/models/class_state_spec.rb +10 -16
- data/spec/models/class_update_spec.rb +34 -18
- data/spec/models/collection_app_spec.rb +48 -0
- data/spec/models/collection_capabilities_spec.rb +60 -0
- data/spec/models/collection_creation_spec.rb +42 -0
- data/spec/models/collection_modification_spec.rb +42 -0
- data/spec/models/collection_privacy_spec.rb +30 -0
- data/spec/models/collection_spec.rb +114 -0
- data/spec/models/collection_type_spec.rb +30 -0
- data/spec/models/edu_library_spec.rb +62 -0
- data/spec/models/edu_resource_capabilities_spec.rb +48 -0
- data/spec/models/edu_resource_copy_spec.rb +36 -0
- data/spec/models/edu_resource_creation_spec.rb +48 -0
- data/spec/models/edu_resource_folder_spec.rb +36 -0
- data/spec/models/edu_resource_lti_link_spec.rb +36 -0
- data/spec/models/edu_resource_move_spec.rb +36 -0
- data/spec/models/edu_resource_privacy_spec.rb +30 -0
- data/spec/models/edu_resource_resource_spec.rb +32 -0
- data/spec/models/edu_resource_spec.rb +96 -0
- data/spec/models/edu_resource_type_spec.rb +30 -0
- data/spec/models/edu_resource_update_spec.rb +42 -0
- data/spec/models/edu_resource_use_in_class_spec.rb +42 -0
- data/spec/models/flat_error_response_spec.rb +14 -20
- data/spec/models/flat_locales_spec.rb +10 -16
- data/spec/models/google_classroom_coursework_spec.rb +19 -19
- data/spec/models/google_classroom_submission_spec.rb +13 -19
- data/spec/models/group_details_spec.rb +17 -23
- data/spec/models/group_spec.rb +21 -27
- data/spec/models/group_type_spec.rb +10 -16
- data/spec/models/license_mode_spec.rb +10 -16
- data/spec/models/license_sources_spec.rb +10 -16
- data/spec/models/lms_name_spec.rb +10 -16
- data/spec/models/lti_credentials_creation_spec.rb +12 -18
- data/spec/models/lti_credentials_spec.rb +19 -25
- data/spec/models/media_attachment_spec.rb +67 -37
- data/spec/models/media_score_sharing_mode_spec.rb +10 -16
- data/spec/models/microsoft_graph_assignment_spec.rb +54 -0
- data/spec/models/microsoft_graph_submission_spec.rb +42 -0
- data/spec/models/organization_invitation_creation_spec.rb +16 -18
- data/spec/models/organization_invitation_spec.rb +29 -23
- data/spec/models/organization_roles_spec.rb +10 -16
- data/spec/models/organization_user_access_token_creation_spec.rb +36 -0
- data/spec/models/resource_collaborator_creation_spec.rb +72 -0
- data/spec/models/resource_collaborator_spec.rb +112 -0
- data/spec/models/resource_rights_spec.rb +64 -0
- data/spec/models/score_comment_context_spec.rb +23 -23
- data/spec/models/score_comment_creation_spec.rb +16 -22
- data/spec/models/score_comment_moderation_spec.rb +46 -0
- data/spec/models/score_comment_spec.rb +35 -35
- data/spec/models/score_comment_update_spec.rb +14 -20
- data/spec/models/score_comments_counts_spec.rb +14 -20
- data/spec/models/score_creation_builder_data_all_of_builder_data_layout_data_spec.rb +82 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_instruments_spec.rb +60 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_spec.rb +66 -0
- data/spec/models/score_creation_builder_data_all_of_builder_data_spec.rb +42 -0
- data/spec/models/score_creation_builder_data_spec.rb +60 -0
- data/spec/models/score_creation_common_spec.rb +54 -0
- data/spec/models/score_creation_file_import_spec.rb +76 -0
- data/spec/models/score_creation_google_drive_import_spec.rb +60 -0
- data/spec/models/score_creation_spec.rb +12 -52
- data/spec/models/score_creation_type_spec.rb +10 -16
- data/spec/models/score_details_spec.rb +75 -45
- data/spec/models/score_fork_spec.rb +27 -15
- data/spec/models/score_license_spec.rb +10 -16
- data/spec/models/score_likes_counts_spec.rb +13 -19
- data/spec/models/score_modification_spec.rb +51 -21
- data/spec/models/score_plays_counts_spec.rb +48 -0
- data/spec/models/score_privacy_spec.rb +10 -16
- data/spec/models/score_revision_creation_spec.rb +18 -20
- data/spec/models/score_revision_spec.rb +23 -23
- data/spec/models/score_revision_statistics_spec.rb +24 -18
- data/spec/models/score_source_spec.rb +11 -17
- data/spec/models/score_summary_spec.rb +16 -22
- data/spec/models/score_track_creation_spec.rb +21 -21
- data/spec/models/score_track_point_spec.rb +17 -23
- data/spec/models/score_track_purpose_spec.rb +30 -0
- data/spec/models/score_track_spec.rb +28 -28
- data/spec/models/score_track_state_spec.rb +10 -16
- data/spec/models/score_track_type_spec.rb +10 -16
- data/spec/models/score_track_update_spec.rb +14 -20
- data/spec/models/score_views_counts_spec.rb +13 -19
- data/spec/models/task_export_options_spec.rb +36 -0
- data/spec/models/task_progress_spec.rb +42 -0
- data/spec/models/task_result_spec.rb +42 -0
- data/spec/models/task_spec.rb +100 -0
- data/spec/models/tutteo_product_spec.rb +30 -0
- data/spec/models/user_admin_update_spec.rb +36 -18
- data/spec/models/user_azure_details_spec.rb +48 -0
- data/spec/models/user_basics_spec.rb +47 -25
- data/spec/models/user_community_profile_links_spec.rb +66 -0
- data/spec/models/user_creation_spec.rb +36 -20
- data/spec/models/user_details_admin_all_of_license_spec.rb +60 -0
- data/spec/models/user_details_admin_spec.rb +60 -32
- data/spec/models/user_details_spec.rb +93 -45
- data/spec/models/user_public_spec.rb +71 -37
- data/spec/models/user_public_summary_spec.rb +51 -29
- data/spec/models/user_signin_link_creation_spec.rb +36 -0
- data/spec/models/user_signin_link_spec.rb +42 -0
- data/spec/spec_helper.rb +4 -4
- metadata +299 -312
- data/CHANGELOG.md +0 -13
- data/Gemfile +0 -7
- data/README.md +0 -249
- data/Rakefile +0 -8
- data/docs/AccountApi.md +0 -55
- data/docs/Assignment.md +0 -18
- data/docs/AssignmentCopy.md +0 -8
- data/docs/AssignmentCreation.md +0 -12
- data/docs/AssignmentSubmission.md +0 -19
- data/docs/AssignmentSubmissionUpdate.md +0 -11
- data/docs/ClassApi.md +0 -1051
- data/docs/ClassAttachmentCreation.md +0 -10
- data/docs/ClassCreation.md +0 -9
- data/docs/ClassDetails.md +0 -25
- data/docs/ClassDetailsCanvas.md +0 -9
- data/docs/ClassDetailsClever.md +0 -14
- data/docs/ClassDetailsGoogleClassroom.md +0 -11
- data/docs/ClassDetailsGoogleDrive.md +0 -9
- data/docs/ClassDetailsLti.md +0 -10
- data/docs/ClassRoles.md +0 -7
- data/docs/ClassState.md +0 -7
- data/docs/ClassUpdate.md +0 -9
- data/docs/FlatErrorResponse.md +0 -11
- data/docs/FlatLocales.md +0 -7
- data/docs/GoogleClassroomCoursework.md +0 -10
- data/docs/GoogleClassroomSubmission.md +0 -10
- data/docs/Group.md +0 -14
- data/docs/GroupApi.md +0 -167
- data/docs/GroupDetails.md +0 -14
- data/docs/GroupType.md +0 -7
- data/docs/LicenseMode.md +0 -7
- data/docs/LicenseSources.md +0 -7
- data/docs/LmsName.md +0 -7
- data/docs/LtiCredentials.md +0 -16
- data/docs/LtiCredentialsCreation.md +0 -9
- data/docs/MediaAttachment.md +0 -23
- data/docs/MediaScoreSharingMode.md +0 -7
- data/docs/OrganizationApi.md +0 -538
- data/docs/OrganizationInvitation.md +0 -14
- data/docs/OrganizationInvitationCreation.md +0 -9
- data/docs/OrganizationRoles.md +0 -7
- data/docs/ScoreApi.md +0 -1605
- data/docs/ScoreCollaborator.md +0 -15
- data/docs/ScoreCollaboratorCreation.md +0 -13
- data/docs/ScoreComment.md +0 -22
- data/docs/ScoreCommentContext.md +0 -14
- data/docs/ScoreCommentCreation.md +0 -13
- data/docs/ScoreCommentUpdate.md +0 -11
- data/docs/ScoreCommentsCounts.md +0 -11
- data/docs/ScoreCreation.md +0 -13
- data/docs/ScoreCreationType.md +0 -7
- data/docs/ScoreData.md +0 -7
- data/docs/ScoreDataEncoding.md +0 -7
- data/docs/ScoreDetails.md +0 -36
- data/docs/ScoreFork.md +0 -7
- data/docs/ScoreLicense.md +0 -7
- data/docs/ScoreLikesCounts.md +0 -10
- data/docs/ScoreModification.md +0 -13
- data/docs/ScorePrivacy.md +0 -7
- data/docs/ScoreRevision.md +0 -14
- data/docs/ScoreRevisionCreation.md +0 -11
- data/docs/ScoreRevisionStatistics.md +0 -9
- data/docs/ScoreRights.md +0 -10
- data/docs/ScoreSource.md +0 -8
- data/docs/ScoreSummary.md +0 -13
- data/docs/ScoreTrack.md +0 -19
- data/docs/ScoreTrackCreation.md +0 -12
- data/docs/ScoreTrackPoint.md +0 -10
- data/docs/ScoreTrackState.md +0 -7
- data/docs/ScoreTrackType.md +0 -7
- data/docs/ScoreTrackUpdate.md +0 -11
- data/docs/ScoreViewsCounts.md +0 -10
- data/docs/UserAdminUpdate.md +0 -9
- data/docs/UserApi.md +0 -173
- data/docs/UserBasics.md +0 -13
- data/docs/UserCreation.md +0 -11
- data/docs/UserDetails.md +0 -28
- data/docs/UserDetailsAdmin.md +0 -20
- data/docs/UserDetailsAdminLicense.md +0 -12
- data/docs/UserInstruments.md +0 -7
- data/docs/UserPublic.md +0 -25
- data/docs/UserPublicSummary.md +0 -17
- data/flat_api.gemspec +0 -48
- data/git_push.sh +0 -55
- data/lib/flat_api/models/assignment_creation.rb +0 -230
- data/lib/flat_api/models/score_collaborator.rb +0 -263
- data/lib/flat_api/models/score_data.rb +0 -179
- data/lib/flat_api/models/score_data_encoding.rb +0 -30
- data/lib/flat_api/models/score_rights.rb +0 -215
- data/lib/flat_api/models/user_details_admin_license.rb +0 -227
- data/lib/flat_api/models/user_instruments.rb +0 -179
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/assignment_creation_spec.rb +0 -66
- data/spec/models/score_collaborator_creation_spec.rb +0 -72
- data/spec/models/score_collaborator_spec.rb +0 -84
- data/spec/models/score_data_encoding_spec.rb +0 -36
- data/spec/models/score_data_spec.rb +0 -36
- data/spec/models/score_rights_spec.rb +0 -48
- data/spec/models/user_details_admin_license_spec.rb +0 -66
- data/spec/models/user_instruments_spec.rb +0 -36
@@ -1,16 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#Flat API
|
3
3
|
|
4
|
-
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.20.0
|
7
7
|
Contact: developers@flat.io
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'cgi'
|
14
14
|
|
15
15
|
module FlatApi
|
16
16
|
class ScoreApi
|
@@ -19,27 +19,26 @@ module FlatApi
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Add a new collaborator
|
24
|
-
# Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a
|
25
|
-
# @param score 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`).
|
26
|
-
# @param body
|
23
|
+
# Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
|
24
|
+
# @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`).
|
25
|
+
# @param body [ResourceCollaboratorCreation]
|
27
26
|
# @param [Hash] opts the optional parameters
|
28
|
-
# @return [
|
27
|
+
# @return [ResourceCollaborator]
|
29
28
|
def add_score_collaborator(score, body, opts = {})
|
30
29
|
data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
|
31
|
-
|
30
|
+
data
|
32
31
|
end
|
33
32
|
|
34
33
|
# Add a new collaborator
|
35
|
-
# Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a
|
36
|
-
# @param score 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`).
|
37
|
-
# @param body
|
34
|
+
# Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
|
35
|
+
# @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`).
|
36
|
+
# @param body [ResourceCollaboratorCreation]
|
38
37
|
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [Array<(
|
38
|
+
# @return [Array<(ResourceCollaborator, Integer, Hash)>] ResourceCollaborator data, response status code and response headers
|
40
39
|
def add_score_collaborator_with_http_info(score, body, opts = {})
|
41
40
|
if @api_client.config.debugging
|
42
|
-
@api_client.config.logger.debug
|
41
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.add_score_collaborator ...'
|
43
42
|
end
|
44
43
|
# verify the required parameter 'score' is set
|
45
44
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -50,31 +49,44 @@ module FlatApi
|
|
50
49
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_collaborator"
|
51
50
|
end
|
52
51
|
# resource path
|
53
|
-
local_var_path =
|
52
|
+
local_var_path = '/scores/{score}/collaborators'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
54
53
|
|
55
54
|
# query parameters
|
56
|
-
query_params = {}
|
55
|
+
query_params = opts[:query_params] || {}
|
57
56
|
|
58
57
|
# header parameters
|
59
|
-
header_params = {}
|
58
|
+
header_params = opts[:header_params] || {}
|
60
59
|
# HTTP header 'Accept' (if needed)
|
61
60
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
61
|
# HTTP header 'Content-Type'
|
63
|
-
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
63
|
+
if !content_type.nil?
|
64
|
+
header_params['Content-Type'] = content_type
|
65
|
+
end
|
64
66
|
|
65
67
|
# form parameters
|
66
|
-
form_params = {}
|
68
|
+
form_params = opts[:form_params] || {}
|
67
69
|
|
68
70
|
# http body (model)
|
69
|
-
post_body = @api_client.object_to_http_body(body)
|
70
|
-
|
71
|
-
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
72
|
+
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:debug_return_type] || 'ResourceCollaborator'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"ScoreApi.add_score_collaborator",
|
72
81
|
:header_params => header_params,
|
73
82
|
:query_params => query_params,
|
74
83
|
:form_params => form_params,
|
75
84
|
:body => post_body,
|
76
85
|
:auth_names => auth_names,
|
77
|
-
:return_type =>
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
90
|
if @api_client.config.debugging
|
79
91
|
@api_client.config.logger.debug "API called: ScoreApi#add_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
92
|
end
|
@@ -83,24 +95,24 @@ module FlatApi
|
|
83
95
|
|
84
96
|
# Add a new video or audio track to the score
|
85
97
|
# Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
|
86
|
-
# @param score 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`).
|
87
|
-
# @param body
|
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
|
+
# @param body [ScoreTrackCreation]
|
88
100
|
# @param [Hash] opts the optional parameters
|
89
101
|
# @return [ScoreTrack]
|
90
102
|
def add_score_track(score, body, opts = {})
|
91
103
|
data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
|
92
|
-
|
104
|
+
data
|
93
105
|
end
|
94
106
|
|
95
107
|
# Add a new video or audio track to the score
|
96
108
|
# Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
|
97
|
-
# @param score 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`).
|
98
|
-
# @param body
|
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
|
+
# @param body [ScoreTrackCreation]
|
99
111
|
# @param [Hash] opts the optional parameters
|
100
|
-
# @return [Array<(ScoreTrack,
|
112
|
+
# @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
|
101
113
|
def add_score_track_with_http_info(score, body, opts = {})
|
102
114
|
if @api_client.config.debugging
|
103
|
-
@api_client.config.logger.debug
|
115
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.add_score_track ...'
|
104
116
|
end
|
105
117
|
# verify the required parameter 'score' is set
|
106
118
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -111,86 +123,202 @@ module FlatApi
|
|
111
123
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_track"
|
112
124
|
end
|
113
125
|
# resource path
|
114
|
-
local_var_path =
|
126
|
+
local_var_path = '/scores/{score}/tracks'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
115
127
|
|
116
128
|
# query parameters
|
117
|
-
query_params = {}
|
129
|
+
query_params = opts[:query_params] || {}
|
118
130
|
|
119
131
|
# header parameters
|
120
|
-
header_params = {}
|
132
|
+
header_params = opts[:header_params] || {}
|
121
133
|
# HTTP header 'Accept' (if needed)
|
122
134
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
135
|
# HTTP header 'Content-Type'
|
124
|
-
|
136
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
137
|
+
if !content_type.nil?
|
138
|
+
header_params['Content-Type'] = content_type
|
139
|
+
end
|
125
140
|
|
126
141
|
# form parameters
|
127
|
-
form_params = {}
|
142
|
+
form_params = opts[:form_params] || {}
|
128
143
|
|
129
144
|
# http body (model)
|
130
|
-
post_body = @api_client.object_to_http_body(body)
|
131
|
-
|
132
|
-
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
146
|
+
|
147
|
+
# return_type
|
148
|
+
return_type = opts[:debug_return_type] || 'ScoreTrack'
|
149
|
+
|
150
|
+
# auth_names
|
151
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
152
|
+
|
153
|
+
new_options = opts.merge(
|
154
|
+
:operation => :"ScoreApi.add_score_track",
|
133
155
|
:header_params => header_params,
|
134
156
|
:query_params => query_params,
|
135
157
|
:form_params => form_params,
|
136
158
|
:body => post_body,
|
137
159
|
:auth_names => auth_names,
|
138
|
-
:return_type =>
|
160
|
+
:return_type => return_type
|
161
|
+
)
|
162
|
+
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
139
164
|
if @api_client.config.debugging
|
140
165
|
@api_client.config.logger.debug "API called: ScoreApi#add_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
166
|
end
|
142
167
|
return data, status_code, headers
|
143
168
|
end
|
144
169
|
|
170
|
+
# Create a new score export task
|
171
|
+
# Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
|
172
|
+
# @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`).
|
173
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
174
|
+
# @param format [String] The format of the file that will be generated or the target service name where the file will be exported
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @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.
|
177
|
+
# @option opts [TaskExportOptions] :body
|
178
|
+
# @return [Task]
|
179
|
+
def create_export_task(score, revision, format, opts = {})
|
180
|
+
data, _status_code, _headers = create_export_task_with_http_info(score, revision, format, opts)
|
181
|
+
data
|
182
|
+
end
|
183
|
+
|
184
|
+
# Create a new score export task
|
185
|
+
# Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
|
186
|
+
# @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`).
|
187
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
188
|
+
# @param format [String] The format of the file that will be generated or the target service name where the file will be exported
|
189
|
+
# @param [Hash] opts the optional parameters
|
190
|
+
# @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.
|
191
|
+
# @option opts [TaskExportOptions] :body
|
192
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
193
|
+
def create_export_task_with_http_info(score, revision, format, opts = {})
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.create_export_task ...'
|
196
|
+
end
|
197
|
+
# verify the required parameter 'score' is set
|
198
|
+
if @api_client.config.client_side_validation && score.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.create_export_task"
|
200
|
+
end
|
201
|
+
# verify the required parameter 'revision' is set
|
202
|
+
if @api_client.config.client_side_validation && revision.nil?
|
203
|
+
fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.create_export_task"
|
204
|
+
end
|
205
|
+
# verify the required parameter 'format' is set
|
206
|
+
if @api_client.config.client_side_validation && format.nil?
|
207
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.create_export_task"
|
208
|
+
end
|
209
|
+
# verify enum value
|
210
|
+
allowable_values = ["mp3", "wav", "practicefirst"]
|
211
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
212
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
213
|
+
end
|
214
|
+
# resource path
|
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
|
+
|
217
|
+
# query parameters
|
218
|
+
query_params = opts[:query_params] || {}
|
219
|
+
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
220
|
+
|
221
|
+
# header parameters
|
222
|
+
header_params = opts[:header_params] || {}
|
223
|
+
# HTTP header 'Accept' (if needed)
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
225
|
+
# HTTP header 'Content-Type'
|
226
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
227
|
+
if !content_type.nil?
|
228
|
+
header_params['Content-Type'] = content_type
|
229
|
+
end
|
230
|
+
|
231
|
+
# form parameters
|
232
|
+
form_params = opts[:form_params] || {}
|
233
|
+
|
234
|
+
# http body (model)
|
235
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
236
|
+
|
237
|
+
# return_type
|
238
|
+
return_type = opts[:debug_return_type] || 'Task'
|
239
|
+
|
240
|
+
# auth_names
|
241
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
242
|
+
|
243
|
+
new_options = opts.merge(
|
244
|
+
:operation => :"ScoreApi.create_export_task",
|
245
|
+
:header_params => header_params,
|
246
|
+
:query_params => query_params,
|
247
|
+
:form_params => form_params,
|
248
|
+
:body => post_body,
|
249
|
+
:auth_names => auth_names,
|
250
|
+
:return_type => return_type
|
251
|
+
)
|
252
|
+
|
253
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug "API called: ScoreApi#create_export_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
256
|
+
end
|
257
|
+
return data, status_code, headers
|
258
|
+
end
|
259
|
+
|
145
260
|
# Create a new score
|
146
|
-
# Use this API method to **create a new music score in the current User account**.
|
147
|
-
# @param body
|
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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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
|
+
# @param body [ScoreCreation]
|
148
263
|
# @param [Hash] opts the optional parameters
|
149
264
|
# @return [ScoreDetails]
|
150
265
|
def create_score(body, opts = {})
|
151
266
|
data, _status_code, _headers = create_score_with_http_info(body, opts)
|
152
|
-
|
267
|
+
data
|
153
268
|
end
|
154
269
|
|
155
270
|
# Create a new score
|
156
|
-
# Use this API method to **create a new music score in the current User account**.
|
157
|
-
# @param body
|
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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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
|
+
# @param body [ScoreCreation]
|
158
273
|
# @param [Hash] opts the optional parameters
|
159
|
-
# @return [Array<(ScoreDetails,
|
274
|
+
# @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
|
160
275
|
def create_score_with_http_info(body, opts = {})
|
161
276
|
if @api_client.config.debugging
|
162
|
-
@api_client.config.logger.debug
|
277
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.create_score ...'
|
163
278
|
end
|
164
279
|
# verify the required parameter 'body' is set
|
165
280
|
if @api_client.config.client_side_validation && body.nil?
|
166
281
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score"
|
167
282
|
end
|
168
283
|
# resource path
|
169
|
-
local_var_path =
|
284
|
+
local_var_path = '/scores'
|
170
285
|
|
171
286
|
# query parameters
|
172
|
-
query_params = {}
|
287
|
+
query_params = opts[:query_params] || {}
|
173
288
|
|
174
289
|
# header parameters
|
175
|
-
header_params = {}
|
290
|
+
header_params = opts[:header_params] || {}
|
176
291
|
# HTTP header 'Accept' (if needed)
|
177
292
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
293
|
# HTTP header 'Content-Type'
|
179
|
-
|
294
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
295
|
+
if !content_type.nil?
|
296
|
+
header_params['Content-Type'] = content_type
|
297
|
+
end
|
180
298
|
|
181
299
|
# form parameters
|
182
|
-
form_params = {}
|
300
|
+
form_params = opts[:form_params] || {}
|
183
301
|
|
184
302
|
# http body (model)
|
185
|
-
post_body = @api_client.object_to_http_body(body)
|
186
|
-
|
187
|
-
|
303
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
304
|
+
|
305
|
+
# return_type
|
306
|
+
return_type = opts[:debug_return_type] || 'ScoreDetails'
|
307
|
+
|
308
|
+
# auth_names
|
309
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
310
|
+
|
311
|
+
new_options = opts.merge(
|
312
|
+
:operation => :"ScoreApi.create_score",
|
188
313
|
:header_params => header_params,
|
189
314
|
:query_params => query_params,
|
190
315
|
:form_params => form_params,
|
191
316
|
:body => post_body,
|
192
317
|
:auth_names => auth_names,
|
193
|
-
:return_type =>
|
318
|
+
:return_type => return_type
|
319
|
+
)
|
320
|
+
|
321
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
194
322
|
if @api_client.config.debugging
|
195
323
|
@api_client.config.logger.debug "API called: ScoreApi#create_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
196
324
|
end
|
@@ -199,24 +327,24 @@ module FlatApi
|
|
199
327
|
|
200
328
|
# Create a new revision
|
201
329
|
# Update a score by uploading a new revision for this one.
|
202
|
-
# @param score 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`).
|
203
|
-
# @param body
|
330
|
+
# @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`).
|
331
|
+
# @param body [ScoreRevisionCreation]
|
204
332
|
# @param [Hash] opts the optional parameters
|
205
333
|
# @return [ScoreRevision]
|
206
334
|
def create_score_revision(score, body, opts = {})
|
207
335
|
data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts)
|
208
|
-
|
336
|
+
data
|
209
337
|
end
|
210
338
|
|
211
339
|
# Create a new revision
|
212
340
|
# Update a score by uploading a new revision for this one.
|
213
|
-
# @param score 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`).
|
214
|
-
# @param body
|
341
|
+
# @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`).
|
342
|
+
# @param body [ScoreRevisionCreation]
|
215
343
|
# @param [Hash] opts the optional parameters
|
216
|
-
# @return [Array<(ScoreRevision,
|
344
|
+
# @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
|
217
345
|
def create_score_revision_with_http_info(score, body, opts = {})
|
218
346
|
if @api_client.config.debugging
|
219
|
-
@api_client.config.logger.debug
|
347
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.create_score_revision ...'
|
220
348
|
end
|
221
349
|
# verify the required parameter 'score' is set
|
222
350
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -227,31 +355,44 @@ module FlatApi
|
|
227
355
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score_revision"
|
228
356
|
end
|
229
357
|
# resource path
|
230
|
-
local_var_path =
|
358
|
+
local_var_path = '/scores/{score}/revisions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
231
359
|
|
232
360
|
# query parameters
|
233
|
-
query_params = {}
|
361
|
+
query_params = opts[:query_params] || {}
|
234
362
|
|
235
363
|
# header parameters
|
236
|
-
header_params = {}
|
364
|
+
header_params = opts[:header_params] || {}
|
237
365
|
# HTTP header 'Accept' (if needed)
|
238
366
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
367
|
# HTTP header 'Content-Type'
|
240
|
-
|
368
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
369
|
+
if !content_type.nil?
|
370
|
+
header_params['Content-Type'] = content_type
|
371
|
+
end
|
241
372
|
|
242
373
|
# form parameters
|
243
|
-
form_params = {}
|
374
|
+
form_params = opts[:form_params] || {}
|
244
375
|
|
245
376
|
# http body (model)
|
246
|
-
post_body = @api_client.object_to_http_body(body)
|
247
|
-
|
248
|
-
|
377
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
378
|
+
|
379
|
+
# return_type
|
380
|
+
return_type = opts[:debug_return_type] || 'ScoreRevision'
|
381
|
+
|
382
|
+
# auth_names
|
383
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
384
|
+
|
385
|
+
new_options = opts.merge(
|
386
|
+
:operation => :"ScoreApi.create_score_revision",
|
249
387
|
:header_params => header_params,
|
250
388
|
:query_params => query_params,
|
251
389
|
:form_params => form_params,
|
252
390
|
:body => post_body,
|
253
391
|
:auth_names => auth_names,
|
254
|
-
:return_type =>
|
392
|
+
:return_type => return_type
|
393
|
+
)
|
394
|
+
|
395
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
255
396
|
if @api_client.config.debugging
|
256
397
|
@api_client.config.logger.debug "API called: ScoreApi#create_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
257
398
|
end
|
@@ -259,53 +400,65 @@ module FlatApi
|
|
259
400
|
end
|
260
401
|
|
261
402
|
# Delete a score
|
262
|
-
# This
|
263
|
-
# @param score 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`).
|
403
|
+
# This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. 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 regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections).
|
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`).
|
264
405
|
# @param [Hash] opts the optional parameters
|
406
|
+
# @option opts [Boolean] :now If `true`, the score deletion will be scheduled to be done ASAP (default to false)
|
265
407
|
# @return [nil]
|
266
408
|
def delete_score(score, opts = {})
|
267
409
|
delete_score_with_http_info(score, opts)
|
268
|
-
|
410
|
+
nil
|
269
411
|
end
|
270
412
|
|
271
413
|
# Delete a score
|
272
|
-
# This
|
273
|
-
# @param score 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`).
|
414
|
+
# This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. 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 regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections).
|
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`).
|
274
416
|
# @param [Hash] opts the optional parameters
|
275
|
-
# @
|
417
|
+
# @option opts [Boolean] :now If `true`, the score deletion will be scheduled to be done ASAP (default to false)
|
418
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
276
419
|
def delete_score_with_http_info(score, opts = {})
|
277
420
|
if @api_client.config.debugging
|
278
|
-
@api_client.config.logger.debug
|
421
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.delete_score ...'
|
279
422
|
end
|
280
423
|
# verify the required parameter 'score' is set
|
281
424
|
if @api_client.config.client_side_validation && score.nil?
|
282
425
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score"
|
283
426
|
end
|
284
427
|
# resource path
|
285
|
-
local_var_path =
|
428
|
+
local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
286
429
|
|
287
430
|
# query parameters
|
288
|
-
query_params = {}
|
431
|
+
query_params = opts[:query_params] || {}
|
432
|
+
query_params[:'now'] = opts[:'now'] if !opts[:'now'].nil?
|
289
433
|
|
290
434
|
# header parameters
|
291
|
-
header_params = {}
|
435
|
+
header_params = opts[:header_params] || {}
|
292
436
|
# HTTP header 'Accept' (if needed)
|
293
437
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
294
|
-
# HTTP header 'Content-Type'
|
295
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
296
438
|
|
297
439
|
# form parameters
|
298
|
-
form_params = {}
|
440
|
+
form_params = opts[:form_params] || {}
|
299
441
|
|
300
442
|
# http body (model)
|
301
|
-
post_body =
|
302
|
-
|
303
|
-
|
443
|
+
post_body = opts[:debug_body]
|
444
|
+
|
445
|
+
# return_type
|
446
|
+
return_type = opts[:debug_return_type]
|
447
|
+
|
448
|
+
# auth_names
|
449
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
450
|
+
|
451
|
+
new_options = opts.merge(
|
452
|
+
:operation => :"ScoreApi.delete_score",
|
304
453
|
:header_params => header_params,
|
305
454
|
:query_params => query_params,
|
306
455
|
:form_params => form_params,
|
307
456
|
:body => post_body,
|
308
|
-
:auth_names => auth_names
|
457
|
+
:auth_names => auth_names,
|
458
|
+
:return_type => return_type
|
459
|
+
)
|
460
|
+
|
461
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
309
462
|
if @api_client.config.debugging
|
310
463
|
@api_client.config.logger.debug "API called: ScoreApi#delete_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
311
464
|
end
|
@@ -313,27 +466,25 @@ module FlatApi
|
|
313
466
|
end
|
314
467
|
|
315
468
|
# Delete a comment
|
316
|
-
#
|
317
|
-
# @param
|
318
|
-
# @param comment Unique identifier of a sheet music comment
|
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
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
319
471
|
# @param [Hash] opts the optional parameters
|
320
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
472
|
+
# @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.
|
321
473
|
# @return [nil]
|
322
474
|
def delete_score_comment(score, comment, opts = {})
|
323
475
|
delete_score_comment_with_http_info(score, comment, opts)
|
324
|
-
|
476
|
+
nil
|
325
477
|
end
|
326
478
|
|
327
479
|
# Delete a comment
|
328
|
-
#
|
329
|
-
# @param
|
330
|
-
# @param comment Unique identifier of a sheet music comment
|
480
|
+
# @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
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
331
482
|
# @param [Hash] opts the optional parameters
|
332
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
333
|
-
# @return [Array<(nil,
|
483
|
+
# @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
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
334
485
|
def delete_score_comment_with_http_info(score, comment, opts = {})
|
335
486
|
if @api_client.config.debugging
|
336
|
-
@api_client.config.logger.debug
|
487
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_comment ...'
|
337
488
|
end
|
338
489
|
# verify the required parameter 'score' is set
|
339
490
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -344,31 +495,40 @@ module FlatApi
|
|
344
495
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
|
345
496
|
end
|
346
497
|
# resource path
|
347
|
-
local_var_path =
|
498
|
+
local_var_path = '/scores/{score}/comments/{comment}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
|
348
499
|
|
349
500
|
# query parameters
|
350
|
-
query_params = {}
|
501
|
+
query_params = opts[:query_params] || {}
|
351
502
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
352
503
|
|
353
504
|
# header parameters
|
354
|
-
header_params = {}
|
505
|
+
header_params = opts[:header_params] || {}
|
355
506
|
# HTTP header 'Accept' (if needed)
|
356
507
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
357
|
-
# HTTP header 'Content-Type'
|
358
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
359
508
|
|
360
509
|
# form parameters
|
361
|
-
form_params = {}
|
510
|
+
form_params = opts[:form_params] || {}
|
362
511
|
|
363
512
|
# http body (model)
|
364
|
-
post_body =
|
365
|
-
|
366
|
-
|
513
|
+
post_body = opts[:debug_body]
|
514
|
+
|
515
|
+
# return_type
|
516
|
+
return_type = opts[:debug_return_type]
|
517
|
+
|
518
|
+
# auth_names
|
519
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
520
|
+
|
521
|
+
new_options = opts.merge(
|
522
|
+
:operation => :"ScoreApi.delete_score_comment",
|
367
523
|
:header_params => header_params,
|
368
524
|
:query_params => query_params,
|
369
525
|
:form_params => form_params,
|
370
526
|
:body => post_body,
|
371
|
-
:auth_names => auth_names
|
527
|
+
:auth_names => auth_names,
|
528
|
+
:return_type => return_type
|
529
|
+
)
|
530
|
+
|
531
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
372
532
|
if @api_client.config.debugging
|
373
533
|
@api_client.config.logger.debug "API called: ScoreApi#delete_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
534
|
end
|
@@ -376,25 +536,23 @@ module FlatApi
|
|
376
536
|
end
|
377
537
|
|
378
538
|
# Remove an audio or video track linked to the score
|
379
|
-
#
|
380
|
-
# @param
|
381
|
-
# @param track Unique identifier of a score audio track
|
539
|
+
# @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`).
|
540
|
+
# @param track [String] Unique identifier of a score audio track
|
382
541
|
# @param [Hash] opts the optional parameters
|
383
542
|
# @return [nil]
|
384
543
|
def delete_score_track(score, track, opts = {})
|
385
544
|
delete_score_track_with_http_info(score, track, opts)
|
386
|
-
|
545
|
+
nil
|
387
546
|
end
|
388
547
|
|
389
548
|
# Remove an audio or video track linked to the score
|
390
|
-
#
|
391
|
-
# @param
|
392
|
-
# @param track Unique identifier of a score audio track
|
549
|
+
# @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`).
|
550
|
+
# @param track [String] Unique identifier of a score audio track
|
393
551
|
# @param [Hash] opts the optional parameters
|
394
|
-
# @return [Array<(nil,
|
552
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
395
553
|
def delete_score_track_with_http_info(score, track, opts = {})
|
396
554
|
if @api_client.config.debugging
|
397
|
-
@api_client.config.logger.debug
|
555
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_track ...'
|
398
556
|
end
|
399
557
|
# verify the required parameter 'score' is set
|
400
558
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -405,30 +563,39 @@ module FlatApi
|
|
405
563
|
fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
|
406
564
|
end
|
407
565
|
# resource path
|
408
|
-
local_var_path =
|
566
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
|
409
567
|
|
410
568
|
# query parameters
|
411
|
-
query_params = {}
|
569
|
+
query_params = opts[:query_params] || {}
|
412
570
|
|
413
571
|
# header parameters
|
414
|
-
header_params = {}
|
572
|
+
header_params = opts[:header_params] || {}
|
415
573
|
# HTTP header 'Accept' (if needed)
|
416
574
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
417
|
-
# HTTP header 'Content-Type'
|
418
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
419
575
|
|
420
576
|
# form parameters
|
421
|
-
form_params = {}
|
577
|
+
form_params = opts[:form_params] || {}
|
422
578
|
|
423
579
|
# http body (model)
|
424
|
-
post_body =
|
425
|
-
|
426
|
-
|
580
|
+
post_body = opts[:debug_body]
|
581
|
+
|
582
|
+
# return_type
|
583
|
+
return_type = opts[:debug_return_type]
|
584
|
+
|
585
|
+
# auth_names
|
586
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
587
|
+
|
588
|
+
new_options = opts.merge(
|
589
|
+
:operation => :"ScoreApi.delete_score_track",
|
427
590
|
:header_params => header_params,
|
428
591
|
:query_params => query_params,
|
429
592
|
:form_params => form_params,
|
430
593
|
:body => post_body,
|
431
|
-
:auth_names => auth_names
|
594
|
+
:auth_names => auth_names,
|
595
|
+
:return_type => return_type
|
596
|
+
)
|
597
|
+
|
598
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
432
599
|
if @api_client.config.debugging
|
433
600
|
@api_client.config.logger.debug "API called: ScoreApi#delete_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
434
601
|
end
|
@@ -436,56 +603,73 @@ module FlatApi
|
|
436
603
|
end
|
437
604
|
|
438
605
|
# Edit a score's metadata
|
439
|
-
# This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`).
|
440
|
-
# @param score 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`).
|
606
|
+
# This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
|
607
|
+
# @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`).
|
608
|
+
# @param body [ScoreModification]
|
441
609
|
# @param [Hash] opts the optional parameters
|
442
|
-
# @option opts [ScoreModification] :body
|
443
610
|
# @return [ScoreDetails]
|
444
|
-
def edit_score(score, opts = {})
|
445
|
-
data, _status_code, _headers = edit_score_with_http_info(score, opts)
|
446
|
-
|
611
|
+
def edit_score(score, body, opts = {})
|
612
|
+
data, _status_code, _headers = edit_score_with_http_info(score, body, opts)
|
613
|
+
data
|
447
614
|
end
|
448
615
|
|
449
616
|
# Edit a score's metadata
|
450
|
-
# This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`).
|
451
|
-
# @param score 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`).
|
617
|
+
# This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
|
618
|
+
# @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`).
|
619
|
+
# @param body [ScoreModification]
|
452
620
|
# @param [Hash] opts the optional parameters
|
453
|
-
# @
|
454
|
-
|
455
|
-
def edit_score_with_http_info(score, opts = {})
|
621
|
+
# @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
|
622
|
+
def edit_score_with_http_info(score, body, opts = {})
|
456
623
|
if @api_client.config.debugging
|
457
|
-
@api_client.config.logger.debug
|
624
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.edit_score ...'
|
458
625
|
end
|
459
626
|
# verify the required parameter 'score' is set
|
460
627
|
if @api_client.config.client_side_validation && score.nil?
|
461
628
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.edit_score"
|
462
629
|
end
|
630
|
+
# verify the required parameter 'body' is set
|
631
|
+
if @api_client.config.client_side_validation && body.nil?
|
632
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.edit_score"
|
633
|
+
end
|
463
634
|
# resource path
|
464
|
-
local_var_path =
|
635
|
+
local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
465
636
|
|
466
637
|
# query parameters
|
467
|
-
query_params = {}
|
638
|
+
query_params = opts[:query_params] || {}
|
468
639
|
|
469
640
|
# header parameters
|
470
|
-
header_params = {}
|
641
|
+
header_params = opts[:header_params] || {}
|
471
642
|
# HTTP header 'Accept' (if needed)
|
472
643
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
473
644
|
# HTTP header 'Content-Type'
|
474
|
-
|
645
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
646
|
+
if !content_type.nil?
|
647
|
+
header_params['Content-Type'] = content_type
|
648
|
+
end
|
475
649
|
|
476
650
|
# form parameters
|
477
|
-
form_params = {}
|
651
|
+
form_params = opts[:form_params] || {}
|
478
652
|
|
479
653
|
# http body (model)
|
480
|
-
post_body = @api_client.object_to_http_body(
|
481
|
-
|
482
|
-
|
654
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
655
|
+
|
656
|
+
# return_type
|
657
|
+
return_type = opts[:debug_return_type] || 'ScoreDetails'
|
658
|
+
|
659
|
+
# auth_names
|
660
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
661
|
+
|
662
|
+
new_options = opts.merge(
|
663
|
+
:operation => :"ScoreApi.edit_score",
|
483
664
|
:header_params => header_params,
|
484
665
|
:query_params => query_params,
|
485
666
|
:form_params => form_params,
|
486
667
|
:body => post_body,
|
487
668
|
:auth_names => auth_names,
|
488
|
-
:return_type =>
|
669
|
+
:return_type => return_type
|
670
|
+
)
|
671
|
+
|
672
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
489
673
|
if @api_client.config.debugging
|
490
674
|
@api_client.config.logger.debug "API called: ScoreApi#edit_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
491
675
|
end
|
@@ -494,26 +678,26 @@ module FlatApi
|
|
494
678
|
|
495
679
|
# Fork a score
|
496
680
|
# This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to `private`. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
|
497
|
-
# @param score 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`).
|
498
|
-
# @param body
|
681
|
+
# @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`).
|
682
|
+
# @param body [ScoreFork]
|
499
683
|
# @param [Hash] opts the optional parameters
|
500
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
684
|
+
# @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.
|
501
685
|
# @return [ScoreDetails]
|
502
686
|
def fork_score(score, body, opts = {})
|
503
687
|
data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
|
504
|
-
|
688
|
+
data
|
505
689
|
end
|
506
690
|
|
507
691
|
# Fork a score
|
508
692
|
# This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to `private`. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
|
509
|
-
# @param score 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`).
|
510
|
-
# @param body
|
693
|
+
# @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`).
|
694
|
+
# @param body [ScoreFork]
|
511
695
|
# @param [Hash] opts the optional parameters
|
512
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
513
|
-
# @return [Array<(ScoreDetails,
|
696
|
+
# @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.
|
697
|
+
# @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
|
514
698
|
def fork_score_with_http_info(score, body, opts = {})
|
515
699
|
if @api_client.config.debugging
|
516
|
-
@api_client.config.logger.debug
|
700
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.fork_score ...'
|
517
701
|
end
|
518
702
|
# verify the required parameter 'score' is set
|
519
703
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -524,148 +708,111 @@ module FlatApi
|
|
524
708
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
|
525
709
|
end
|
526
710
|
# resource path
|
527
|
-
local_var_path =
|
711
|
+
local_var_path = '/scores/{score}/fork'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
528
712
|
|
529
713
|
# query parameters
|
530
|
-
query_params = {}
|
714
|
+
query_params = opts[:query_params] || {}
|
531
715
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
532
716
|
|
533
717
|
# header parameters
|
534
|
-
header_params = {}
|
718
|
+
header_params = opts[:header_params] || {}
|
535
719
|
# HTTP header 'Accept' (if needed)
|
536
720
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
537
721
|
# HTTP header 'Content-Type'
|
538
|
-
|
722
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
723
|
+
if !content_type.nil?
|
724
|
+
header_params['Content-Type'] = content_type
|
725
|
+
end
|
539
726
|
|
540
727
|
# form parameters
|
541
|
-
form_params = {}
|
728
|
+
form_params = opts[:form_params] || {}
|
542
729
|
|
543
730
|
# http body (model)
|
544
|
-
post_body = @api_client.object_to_http_body(body)
|
545
|
-
auth_names = ['OAuth2']
|
546
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
547
|
-
:header_params => header_params,
|
548
|
-
:query_params => query_params,
|
549
|
-
:form_params => form_params,
|
550
|
-
:body => post_body,
|
551
|
-
:auth_names => auth_names,
|
552
|
-
:return_type => 'ScoreDetails')
|
553
|
-
if @api_client.config.debugging
|
554
|
-
@api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
555
|
-
end
|
556
|
-
return data, status_code, headers
|
557
|
-
end
|
731
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
558
732
|
|
559
|
-
|
560
|
-
|
561
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
562
|
-
# @param [Hash] opts the optional parameters
|
563
|
-
# @option opts [BOOLEAN] :ids Return only the identifiers of the scores
|
564
|
-
# @return [Array<ScoreDetails>]
|
565
|
-
def ger_user_likes(user, opts = {})
|
566
|
-
data, _status_code, _headers = ger_user_likes_with_http_info(user, opts)
|
567
|
-
return data
|
568
|
-
end
|
733
|
+
# return_type
|
734
|
+
return_type = opts[:debug_return_type] || 'ScoreDetails'
|
569
735
|
|
570
|
-
|
571
|
-
|
572
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
573
|
-
# @param [Hash] opts the optional parameters
|
574
|
-
# @option opts [BOOLEAN] :ids Return only the identifiers of the scores
|
575
|
-
# @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
576
|
-
def ger_user_likes_with_http_info(user, opts = {})
|
577
|
-
if @api_client.config.debugging
|
578
|
-
@api_client.config.logger.debug "Calling API: ScoreApi.ger_user_likes ..."
|
579
|
-
end
|
580
|
-
# verify the required parameter 'user' is set
|
581
|
-
if @api_client.config.client_side_validation && user.nil?
|
582
|
-
fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.ger_user_likes"
|
583
|
-
end
|
584
|
-
# resource path
|
585
|
-
local_var_path = "/users/{user}/likes".sub('{' + 'user' + '}', user.to_s)
|
586
|
-
|
587
|
-
# query parameters
|
588
|
-
query_params = {}
|
589
|
-
query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
|
590
|
-
|
591
|
-
# header parameters
|
592
|
-
header_params = {}
|
593
|
-
# HTTP header 'Accept' (if needed)
|
594
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
595
|
-
# HTTP header 'Content-Type'
|
596
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
736
|
+
# auth_names
|
737
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
597
738
|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
# http body (model)
|
602
|
-
post_body = nil
|
603
|
-
auth_names = ['OAuth2']
|
604
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
739
|
+
new_options = opts.merge(
|
740
|
+
:operation => :"ScoreApi.fork_score",
|
605
741
|
:header_params => header_params,
|
606
742
|
:query_params => query_params,
|
607
743
|
:form_params => form_params,
|
608
744
|
:body => post_body,
|
609
745
|
:auth_names => auth_names,
|
610
|
-
:return_type =>
|
746
|
+
:return_type => return_type
|
747
|
+
)
|
748
|
+
|
749
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
611
750
|
if @api_client.config.debugging
|
612
|
-
@api_client.config.logger.debug "API called: ScoreApi#
|
751
|
+
@api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
613
752
|
end
|
614
753
|
return data, status_code, headers
|
615
754
|
end
|
616
755
|
|
617
756
|
# List group's scores
|
618
757
|
# Get the list of scores shared with a group.
|
619
|
-
# @param group Unique identifier of a Flat group
|
758
|
+
# @param group [String] Unique identifier of a Flat group
|
620
759
|
# @param [Hash] opts the optional parameters
|
621
760
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
622
761
|
# @return [Array<ScoreDetails>]
|
623
762
|
def get_group_scores(group, opts = {})
|
624
763
|
data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
|
625
|
-
|
764
|
+
data
|
626
765
|
end
|
627
766
|
|
628
767
|
# List group's scores
|
629
768
|
# Get the list of scores shared with a group.
|
630
|
-
# @param group Unique identifier of a Flat group
|
769
|
+
# @param group [String] Unique identifier of a Flat group
|
631
770
|
# @param [Hash] opts the optional parameters
|
632
771
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
633
|
-
# @return [Array<(Array<ScoreDetails>,
|
772
|
+
# @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
634
773
|
def get_group_scores_with_http_info(group, opts = {})
|
635
774
|
if @api_client.config.debugging
|
636
|
-
@api_client.config.logger.debug
|
775
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_group_scores ...'
|
637
776
|
end
|
638
777
|
# verify the required parameter 'group' is set
|
639
778
|
if @api_client.config.client_side_validation && group.nil?
|
640
779
|
fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
|
641
780
|
end
|
642
781
|
# resource path
|
643
|
-
local_var_path =
|
782
|
+
local_var_path = '/groups/{group}/scores'.sub('{' + 'group' + '}', CGI.escape(group.to_s))
|
644
783
|
|
645
784
|
# query parameters
|
646
|
-
query_params = {}
|
785
|
+
query_params = opts[:query_params] || {}
|
647
786
|
query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
|
648
787
|
|
649
788
|
# header parameters
|
650
|
-
header_params = {}
|
789
|
+
header_params = opts[:header_params] || {}
|
651
790
|
# HTTP header 'Accept' (if needed)
|
652
791
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
653
|
-
# HTTP header 'Content-Type'
|
654
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
655
792
|
|
656
793
|
# form parameters
|
657
|
-
form_params = {}
|
794
|
+
form_params = opts[:form_params] || {}
|
658
795
|
|
659
796
|
# http body (model)
|
660
|
-
post_body =
|
661
|
-
|
662
|
-
|
797
|
+
post_body = opts[:debug_body]
|
798
|
+
|
799
|
+
# return_type
|
800
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
|
801
|
+
|
802
|
+
# auth_names
|
803
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
804
|
+
|
805
|
+
new_options = opts.merge(
|
806
|
+
:operation => :"ScoreApi.get_group_scores",
|
663
807
|
:header_params => header_params,
|
664
808
|
:query_params => query_params,
|
665
809
|
:form_params => form_params,
|
666
810
|
:body => post_body,
|
667
811
|
:auth_names => auth_names,
|
668
|
-
:return_type =>
|
812
|
+
:return_type => return_type
|
813
|
+
)
|
814
|
+
|
815
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
669
816
|
if @api_client.config.debugging
|
670
817
|
@api_client.config.logger.debug "API called: ScoreApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
671
818
|
end
|
@@ -674,56 +821,64 @@ module FlatApi
|
|
674
821
|
|
675
822
|
# Get a score's metadata
|
676
823
|
# Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
|
677
|
-
# @param score 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`).
|
824
|
+
# @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`).
|
678
825
|
# @param [Hash] opts the optional parameters
|
679
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
826
|
+
# @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.
|
680
827
|
# @return [ScoreDetails]
|
681
828
|
def get_score(score, opts = {})
|
682
829
|
data, _status_code, _headers = get_score_with_http_info(score, opts)
|
683
|
-
|
830
|
+
data
|
684
831
|
end
|
685
832
|
|
686
833
|
# Get a score's metadata
|
687
834
|
# Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
|
688
|
-
# @param score 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`).
|
835
|
+
# @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`).
|
689
836
|
# @param [Hash] opts the optional parameters
|
690
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
691
|
-
# @return [Array<(ScoreDetails,
|
837
|
+
# @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.
|
838
|
+
# @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
|
692
839
|
def get_score_with_http_info(score, opts = {})
|
693
840
|
if @api_client.config.debugging
|
694
|
-
@api_client.config.logger.debug
|
841
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score ...'
|
695
842
|
end
|
696
843
|
# verify the required parameter 'score' is set
|
697
844
|
if @api_client.config.client_side_validation && score.nil?
|
698
845
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
|
699
846
|
end
|
700
847
|
# resource path
|
701
|
-
local_var_path =
|
848
|
+
local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
702
849
|
|
703
850
|
# query parameters
|
704
|
-
query_params = {}
|
851
|
+
query_params = opts[:query_params] || {}
|
705
852
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
706
853
|
|
707
854
|
# header parameters
|
708
|
-
header_params = {}
|
855
|
+
header_params = opts[:header_params] || {}
|
709
856
|
# HTTP header 'Accept' (if needed)
|
710
857
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
711
|
-
# HTTP header 'Content-Type'
|
712
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
713
858
|
|
714
859
|
# form parameters
|
715
|
-
form_params = {}
|
860
|
+
form_params = opts[:form_params] || {}
|
716
861
|
|
717
862
|
# http body (model)
|
718
|
-
post_body =
|
719
|
-
|
720
|
-
|
863
|
+
post_body = opts[:debug_body]
|
864
|
+
|
865
|
+
# return_type
|
866
|
+
return_type = opts[:debug_return_type] || 'ScoreDetails'
|
867
|
+
|
868
|
+
# auth_names
|
869
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
870
|
+
|
871
|
+
new_options = opts.merge(
|
872
|
+
:operation => :"ScoreApi.get_score",
|
721
873
|
:header_params => header_params,
|
722
874
|
:query_params => query_params,
|
723
875
|
:form_params => form_params,
|
724
876
|
:body => post_body,
|
725
877
|
:auth_names => auth_names,
|
726
|
-
:return_type =>
|
878
|
+
:return_type => return_type
|
879
|
+
)
|
880
|
+
|
881
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
727
882
|
if @api_client.config.debugging
|
728
883
|
@api_client.config.logger.debug "API called: ScoreApi#get_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
729
884
|
end
|
@@ -732,26 +887,26 @@ module FlatApi
|
|
732
887
|
|
733
888
|
# Get a collaborator
|
734
889
|
# Get the information about a collaborator (User or Group).
|
735
|
-
# @param score 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`).
|
736
|
-
# @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
890
|
+
# @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`).
|
891
|
+
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
737
892
|
# @param [Hash] opts the optional parameters
|
738
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
739
|
-
# @return [
|
893
|
+
# @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.
|
894
|
+
# @return [ResourceCollaborator]
|
740
895
|
def get_score_collaborator(score, collaborator, opts = {})
|
741
896
|
data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
|
742
|
-
|
897
|
+
data
|
743
898
|
end
|
744
899
|
|
745
900
|
# Get a collaborator
|
746
901
|
# Get the information about a collaborator (User or Group).
|
747
|
-
# @param score 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`).
|
748
|
-
# @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
902
|
+
# @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`).
|
903
|
+
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
749
904
|
# @param [Hash] opts the optional parameters
|
750
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
751
|
-
# @return [Array<(
|
905
|
+
# @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.
|
906
|
+
# @return [Array<(ResourceCollaborator, Integer, Hash)>] ResourceCollaborator data, response status code and response headers
|
752
907
|
def get_score_collaborator_with_http_info(score, collaborator, opts = {})
|
753
908
|
if @api_client.config.debugging
|
754
|
-
@api_client.config.logger.debug
|
909
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborator ...'
|
755
910
|
end
|
756
911
|
# verify the required parameter 'score' is set
|
757
912
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -762,32 +917,40 @@ module FlatApi
|
|
762
917
|
fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
|
763
918
|
end
|
764
919
|
# resource path
|
765
|
-
local_var_path =
|
920
|
+
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'collaborator' + '}', CGI.escape(collaborator.to_s))
|
766
921
|
|
767
922
|
# query parameters
|
768
|
-
query_params = {}
|
923
|
+
query_params = opts[:query_params] || {}
|
769
924
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
770
925
|
|
771
926
|
# header parameters
|
772
|
-
header_params = {}
|
927
|
+
header_params = opts[:header_params] || {}
|
773
928
|
# HTTP header 'Accept' (if needed)
|
774
929
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
775
|
-
# HTTP header 'Content-Type'
|
776
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
777
930
|
|
778
931
|
# form parameters
|
779
|
-
form_params = {}
|
932
|
+
form_params = opts[:form_params] || {}
|
780
933
|
|
781
934
|
# http body (model)
|
782
|
-
post_body =
|
783
|
-
|
784
|
-
|
935
|
+
post_body = opts[:debug_body]
|
936
|
+
|
937
|
+
# return_type
|
938
|
+
return_type = opts[:debug_return_type] || 'ResourceCollaborator'
|
939
|
+
|
940
|
+
# auth_names
|
941
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
942
|
+
|
943
|
+
new_options = opts.merge(
|
944
|
+
:operation => :"ScoreApi.get_score_collaborator",
|
785
945
|
:header_params => header_params,
|
786
946
|
:query_params => query_params,
|
787
947
|
:form_params => form_params,
|
788
948
|
:body => post_body,
|
789
949
|
:auth_names => auth_names,
|
790
|
-
:return_type =>
|
950
|
+
:return_type => return_type
|
951
|
+
)
|
952
|
+
|
953
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
791
954
|
if @api_client.config.debugging
|
792
955
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
793
956
|
end
|
@@ -796,56 +959,64 @@ module FlatApi
|
|
796
959
|
|
797
960
|
# List the collaborators
|
798
961
|
# This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated).
|
799
|
-
# @param score 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`).
|
962
|
+
# @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`).
|
800
963
|
# @param [Hash] opts the optional parameters
|
801
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
802
|
-
# @return [Array<
|
964
|
+
# @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.
|
965
|
+
# @return [Array<ResourceCollaborator>]
|
803
966
|
def get_score_collaborators(score, opts = {})
|
804
967
|
data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
|
805
|
-
|
968
|
+
data
|
806
969
|
end
|
807
970
|
|
808
971
|
# List the collaborators
|
809
972
|
# This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated).
|
810
|
-
# @param score 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`).
|
973
|
+
# @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`).
|
811
974
|
# @param [Hash] opts the optional parameters
|
812
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
813
|
-
# @return [Array<(Array<
|
975
|
+
# @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.
|
976
|
+
# @return [Array<(Array<ResourceCollaborator>, Integer, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
|
814
977
|
def get_score_collaborators_with_http_info(score, opts = {})
|
815
978
|
if @api_client.config.debugging
|
816
|
-
@api_client.config.logger.debug
|
979
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborators ...'
|
817
980
|
end
|
818
981
|
# verify the required parameter 'score' is set
|
819
982
|
if @api_client.config.client_side_validation && score.nil?
|
820
983
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
|
821
984
|
end
|
822
985
|
# resource path
|
823
|
-
local_var_path =
|
986
|
+
local_var_path = '/scores/{score}/collaborators'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
824
987
|
|
825
988
|
# query parameters
|
826
|
-
query_params = {}
|
989
|
+
query_params = opts[:query_params] || {}
|
827
990
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
828
991
|
|
829
992
|
# header parameters
|
830
|
-
header_params = {}
|
993
|
+
header_params = opts[:header_params] || {}
|
831
994
|
# HTTP header 'Accept' (if needed)
|
832
995
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
833
|
-
# HTTP header 'Content-Type'
|
834
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
835
996
|
|
836
997
|
# form parameters
|
837
|
-
form_params = {}
|
998
|
+
form_params = opts[:form_params] || {}
|
838
999
|
|
839
1000
|
# http body (model)
|
840
|
-
post_body =
|
841
|
-
|
842
|
-
|
1001
|
+
post_body = opts[:debug_body]
|
1002
|
+
|
1003
|
+
# return_type
|
1004
|
+
return_type = opts[:debug_return_type] || 'Array<ResourceCollaborator>'
|
1005
|
+
|
1006
|
+
# auth_names
|
1007
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1008
|
+
|
1009
|
+
new_options = opts.merge(
|
1010
|
+
:operation => :"ScoreApi.get_score_collaborators",
|
843
1011
|
:header_params => header_params,
|
844
1012
|
:query_params => query_params,
|
845
1013
|
:form_params => form_params,
|
846
1014
|
:body => post_body,
|
847
1015
|
:auth_names => auth_names,
|
848
|
-
:return_type =>
|
1016
|
+
:return_type => return_type
|
1017
|
+
)
|
1018
|
+
|
1019
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
849
1020
|
if @api_client.config.debugging
|
850
1021
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
851
1022
|
end
|
@@ -854,56 +1025,85 @@ module FlatApi
|
|
854
1025
|
|
855
1026
|
# List comments
|
856
1027
|
# This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
|
857
|
-
# @param score 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`).
|
1028
|
+
# @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`).
|
858
1029
|
# @param [Hash] opts the optional parameters
|
859
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
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
|
+
# @option opts [String] :type Filter the comments by type
|
1032
|
+
# @option opts [String] :sort Sort
|
1033
|
+
# @option opts [String] :direction Sort direction
|
860
1034
|
# @return [Array<ScoreComment>]
|
861
1035
|
def get_score_comments(score, opts = {})
|
862
1036
|
data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
|
863
|
-
|
1037
|
+
data
|
864
1038
|
end
|
865
1039
|
|
866
1040
|
# List comments
|
867
1041
|
# This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
|
868
|
-
# @param score 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`).
|
1042
|
+
# @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`).
|
869
1043
|
# @param [Hash] opts the optional parameters
|
870
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
871
|
-
# @
|
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
|
+
# @option opts [String] :type Filter the comments by type
|
1046
|
+
# @option opts [String] :sort Sort
|
1047
|
+
# @option opts [String] :direction Sort direction
|
1048
|
+
# @return [Array<(Array<ScoreComment>, Integer, Hash)>] Array<ScoreComment> data, response status code and response headers
|
872
1049
|
def get_score_comments_with_http_info(score, opts = {})
|
873
1050
|
if @api_client.config.debugging
|
874
|
-
@api_client.config.logger.debug
|
1051
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_comments ...'
|
875
1052
|
end
|
876
1053
|
# verify the required parameter 'score' is set
|
877
1054
|
if @api_client.config.client_side_validation && score.nil?
|
878
1055
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
|
879
1056
|
end
|
1057
|
+
allowable_values = ["document", "inline"]
|
1058
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
1059
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
1060
|
+
end
|
1061
|
+
allowable_values = ["date"]
|
1062
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
1063
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
1064
|
+
end
|
1065
|
+
allowable_values = ["asc", "desc"]
|
1066
|
+
if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
|
1067
|
+
fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
|
1068
|
+
end
|
880
1069
|
# resource path
|
881
|
-
local_var_path =
|
1070
|
+
local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
882
1071
|
|
883
1072
|
# query parameters
|
884
|
-
query_params = {}
|
1073
|
+
query_params = opts[:query_params] || {}
|
885
1074
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1075
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
1076
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1077
|
+
query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
|
886
1078
|
|
887
1079
|
# header parameters
|
888
|
-
header_params = {}
|
1080
|
+
header_params = opts[:header_params] || {}
|
889
1081
|
# HTTP header 'Accept' (if needed)
|
890
1082
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
891
|
-
# HTTP header 'Content-Type'
|
892
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
893
1083
|
|
894
1084
|
# form parameters
|
895
|
-
form_params = {}
|
1085
|
+
form_params = opts[:form_params] || {}
|
896
1086
|
|
897
1087
|
# http body (model)
|
898
|
-
post_body =
|
899
|
-
|
900
|
-
|
1088
|
+
post_body = opts[:debug_body]
|
1089
|
+
|
1090
|
+
# return_type
|
1091
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreComment>'
|
1092
|
+
|
1093
|
+
# auth_names
|
1094
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1095
|
+
|
1096
|
+
new_options = opts.merge(
|
1097
|
+
:operation => :"ScoreApi.get_score_comments",
|
901
1098
|
:header_params => header_params,
|
902
1099
|
:query_params => query_params,
|
903
1100
|
:form_params => form_params,
|
904
1101
|
:body => post_body,
|
905
1102
|
:auth_names => auth_names,
|
906
|
-
:return_type =>
|
1103
|
+
:return_type => return_type
|
1104
|
+
)
|
1105
|
+
|
1106
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
907
1107
|
if @api_client.config.debugging
|
908
1108
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
909
1109
|
end
|
@@ -912,26 +1112,26 @@ module FlatApi
|
|
912
1112
|
|
913
1113
|
# Get a score revision
|
914
1114
|
# When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
|
915
|
-
# @param score 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`).
|
916
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
1115
|
+
# @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`).
|
1116
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
917
1117
|
# @param [Hash] opts the optional parameters
|
918
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1118
|
+
# @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.
|
919
1119
|
# @return [ScoreRevision]
|
920
1120
|
def get_score_revision(score, revision, opts = {})
|
921
1121
|
data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
|
922
|
-
|
1122
|
+
data
|
923
1123
|
end
|
924
1124
|
|
925
1125
|
# Get a score revision
|
926
1126
|
# When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
|
927
|
-
# @param score 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`).
|
928
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
1127
|
+
# @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`).
|
1128
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
929
1129
|
# @param [Hash] opts the optional parameters
|
930
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
931
|
-
# @return [Array<(ScoreRevision,
|
1130
|
+
# @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.
|
1131
|
+
# @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
|
932
1132
|
def get_score_revision_with_http_info(score, revision, opts = {})
|
933
1133
|
if @api_client.config.debugging
|
934
|
-
@api_client.config.logger.debug
|
1134
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision ...'
|
935
1135
|
end
|
936
1136
|
# verify the required parameter 'score' is set
|
937
1137
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -942,32 +1142,40 @@ module FlatApi
|
|
942
1142
|
fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
|
943
1143
|
end
|
944
1144
|
# resource path
|
945
|
-
local_var_path =
|
1145
|
+
local_var_path = '/scores/{score}/revisions/{revision}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'revision' + '}', CGI.escape(revision.to_s))
|
946
1146
|
|
947
1147
|
# query parameters
|
948
|
-
query_params = {}
|
1148
|
+
query_params = opts[:query_params] || {}
|
949
1149
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
950
1150
|
|
951
1151
|
# header parameters
|
952
|
-
header_params = {}
|
1152
|
+
header_params = opts[:header_params] || {}
|
953
1153
|
# HTTP header 'Accept' (if needed)
|
954
1154
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
955
|
-
# HTTP header 'Content-Type'
|
956
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
957
1155
|
|
958
1156
|
# form parameters
|
959
|
-
form_params = {}
|
1157
|
+
form_params = opts[:form_params] || {}
|
960
1158
|
|
961
1159
|
# http body (model)
|
962
|
-
post_body =
|
963
|
-
|
964
|
-
|
1160
|
+
post_body = opts[:debug_body]
|
1161
|
+
|
1162
|
+
# return_type
|
1163
|
+
return_type = opts[:debug_return_type] || 'ScoreRevision'
|
1164
|
+
|
1165
|
+
# auth_names
|
1166
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1167
|
+
|
1168
|
+
new_options = opts.merge(
|
1169
|
+
:operation => :"ScoreApi.get_score_revision",
|
965
1170
|
:header_params => header_params,
|
966
1171
|
:query_params => query_params,
|
967
1172
|
:form_params => form_params,
|
968
1173
|
:body => post_body,
|
969
1174
|
:auth_names => auth_names,
|
970
|
-
:return_type =>
|
1175
|
+
:return_type => return_type
|
1176
|
+
)
|
1177
|
+
|
1178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
971
1179
|
if @api_client.config.debugging
|
972
1180
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
973
1181
|
end
|
@@ -975,33 +1183,35 @@ module FlatApi
|
|
975
1183
|
end
|
976
1184
|
|
977
1185
|
# Get a score revision data
|
978
|
-
# 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`,
|
979
|
-
# @param score 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`).
|
980
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
981
|
-
# @param format The format of the file you will retrieve
|
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`.
|
1187
|
+
# @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
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
1189
|
+
# @param format [String] The format of the file you will retrieve
|
982
1190
|
# @param [Hash] opts the optional parameters
|
983
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
984
|
-
# @option opts [
|
985
|
-
# @option opts [
|
986
|
-
# @
|
1191
|
+
# @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.
|
1192
|
+
# @option opts [String] :parts An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\".
|
1193
|
+
# @option opts [Boolean] :default_track When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file.
|
1194
|
+
# @option opts [Boolean] :url Returns a json with the `url` in it instead of redirecting
|
1195
|
+
# @return [File]
|
987
1196
|
def get_score_revision_data(score, revision, format, opts = {})
|
988
1197
|
data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
|
989
|
-
|
1198
|
+
data
|
990
1199
|
end
|
991
1200
|
|
992
1201
|
# Get a score revision data
|
993
|
-
# 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`,
|
994
|
-
# @param score 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`).
|
995
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
996
|
-
# @param format The format of the file you will retrieve
|
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`.
|
1203
|
+
# @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
|
+
# @param revision [String] Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
1205
|
+
# @param format [String] The format of the file you will retrieve
|
997
1206
|
# @param [Hash] opts the optional parameters
|
998
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
999
|
-
# @option opts [
|
1000
|
-
# @option opts [
|
1001
|
-
# @
|
1207
|
+
# @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.
|
1208
|
+
# @option opts [String] :parts An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\".
|
1209
|
+
# @option opts [Boolean] :default_track When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file.
|
1210
|
+
# @option opts [Boolean] :url Returns a json with the `url` in it instead of redirecting
|
1211
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
1002
1212
|
def get_score_revision_data_with_http_info(score, revision, format, opts = {})
|
1003
1213
|
if @api_client.config.debugging
|
1004
|
-
@api_client.config.logger.debug
|
1214
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision_data ...'
|
1005
1215
|
end
|
1006
1216
|
# verify the required parameter 'score' is set
|
1007
1217
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1016,38 +1226,48 @@ module FlatApi
|
|
1016
1226
|
fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
|
1017
1227
|
end
|
1018
1228
|
# verify enum value
|
1019
|
-
|
1020
|
-
|
1229
|
+
allowable_values = ["json", "mxl", "xml", "mp3", "wav", "midi", "thumbnail.png", "synchronizationPoints"]
|
1230
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
1231
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
1021
1232
|
end
|
1022
1233
|
# resource path
|
1023
|
-
local_var_path =
|
1234
|
+
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))
|
1024
1235
|
|
1025
1236
|
# query parameters
|
1026
|
-
query_params = {}
|
1237
|
+
query_params = opts[:query_params] || {}
|
1027
1238
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1028
|
-
query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
|
1029
1239
|
query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
|
1240
|
+
query_params[:'defaultTrack'] = opts[:'default_track'] if !opts[:'default_track'].nil?
|
1241
|
+
query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
|
1030
1242
|
|
1031
1243
|
# header parameters
|
1032
|
-
header_params = {}
|
1244
|
+
header_params = opts[:header_params] || {}
|
1033
1245
|
# HTTP header 'Accept' (if needed)
|
1034
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'])
|
1035
|
-
# HTTP header 'Content-Type'
|
1036
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1037
1247
|
|
1038
1248
|
# form parameters
|
1039
|
-
form_params = {}
|
1249
|
+
form_params = opts[:form_params] || {}
|
1040
1250
|
|
1041
1251
|
# http body (model)
|
1042
|
-
post_body =
|
1043
|
-
|
1044
|
-
|
1252
|
+
post_body = opts[:debug_body]
|
1253
|
+
|
1254
|
+
# return_type
|
1255
|
+
return_type = opts[:debug_return_type] || 'File'
|
1256
|
+
|
1257
|
+
# auth_names
|
1258
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1259
|
+
|
1260
|
+
new_options = opts.merge(
|
1261
|
+
:operation => :"ScoreApi.get_score_revision_data",
|
1045
1262
|
:header_params => header_params,
|
1046
1263
|
:query_params => query_params,
|
1047
1264
|
:form_params => form_params,
|
1048
1265
|
:body => post_body,
|
1049
1266
|
:auth_names => auth_names,
|
1050
|
-
:return_type =>
|
1267
|
+
:return_type => return_type
|
1268
|
+
)
|
1269
|
+
|
1270
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1051
1271
|
if @api_client.config.debugging
|
1052
1272
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1053
1273
|
end
|
@@ -1056,56 +1276,64 @@ module FlatApi
|
|
1056
1276
|
|
1057
1277
|
# List the revisions
|
1058
1278
|
# When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
|
1059
|
-
# @param score 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`).
|
1279
|
+
# @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`).
|
1060
1280
|
# @param [Hash] opts the optional parameters
|
1061
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1281
|
+
# @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.
|
1062
1282
|
# @return [Array<ScoreRevision>]
|
1063
1283
|
def get_score_revisions(score, opts = {})
|
1064
1284
|
data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
|
1065
|
-
|
1285
|
+
data
|
1066
1286
|
end
|
1067
1287
|
|
1068
1288
|
# List the revisions
|
1069
1289
|
# When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
|
1070
|
-
# @param score 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`).
|
1290
|
+
# @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`).
|
1071
1291
|
# @param [Hash] opts the optional parameters
|
1072
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1073
|
-
# @return [Array<(Array<ScoreRevision>,
|
1292
|
+
# @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.
|
1293
|
+
# @return [Array<(Array<ScoreRevision>, Integer, Hash)>] Array<ScoreRevision> data, response status code and response headers
|
1074
1294
|
def get_score_revisions_with_http_info(score, opts = {})
|
1075
1295
|
if @api_client.config.debugging
|
1076
|
-
@api_client.config.logger.debug
|
1296
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revisions ...'
|
1077
1297
|
end
|
1078
1298
|
# verify the required parameter 'score' is set
|
1079
1299
|
if @api_client.config.client_side_validation && score.nil?
|
1080
1300
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
|
1081
1301
|
end
|
1082
1302
|
# resource path
|
1083
|
-
local_var_path =
|
1303
|
+
local_var_path = '/scores/{score}/revisions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1084
1304
|
|
1085
1305
|
# query parameters
|
1086
|
-
query_params = {}
|
1306
|
+
query_params = opts[:query_params] || {}
|
1087
1307
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1088
1308
|
|
1089
1309
|
# header parameters
|
1090
|
-
header_params = {}
|
1310
|
+
header_params = opts[:header_params] || {}
|
1091
1311
|
# HTTP header 'Accept' (if needed)
|
1092
1312
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1093
|
-
# HTTP header 'Content-Type'
|
1094
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1095
1313
|
|
1096
1314
|
# form parameters
|
1097
|
-
form_params = {}
|
1315
|
+
form_params = opts[:form_params] || {}
|
1098
1316
|
|
1099
1317
|
# http body (model)
|
1100
|
-
post_body =
|
1101
|
-
|
1102
|
-
|
1318
|
+
post_body = opts[:debug_body]
|
1319
|
+
|
1320
|
+
# return_type
|
1321
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreRevision>'
|
1322
|
+
|
1323
|
+
# auth_names
|
1324
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1325
|
+
|
1326
|
+
new_options = opts.merge(
|
1327
|
+
:operation => :"ScoreApi.get_score_revisions",
|
1103
1328
|
:header_params => header_params,
|
1104
1329
|
:query_params => query_params,
|
1105
1330
|
:form_params => form_params,
|
1106
1331
|
:body => post_body,
|
1107
1332
|
:auth_names => auth_names,
|
1108
|
-
:return_type =>
|
1333
|
+
:return_type => return_type
|
1334
|
+
)
|
1335
|
+
|
1336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1109
1337
|
if @api_client.config.debugging
|
1110
1338
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1111
1339
|
end
|
@@ -1114,53 +1342,61 @@ module FlatApi
|
|
1114
1342
|
|
1115
1343
|
# List submissions related to the score
|
1116
1344
|
# This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
|
1117
|
-
# @param score 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`).
|
1345
|
+
# @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`).
|
1118
1346
|
# @param [Hash] opts the optional parameters
|
1119
1347
|
# @return [Array<AssignmentSubmission>]
|
1120
1348
|
def get_score_submissions(score, opts = {})
|
1121
1349
|
data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
|
1122
|
-
|
1350
|
+
data
|
1123
1351
|
end
|
1124
1352
|
|
1125
1353
|
# List submissions related to the score
|
1126
1354
|
# This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
|
1127
|
-
# @param score 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`).
|
1355
|
+
# @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`).
|
1128
1356
|
# @param [Hash] opts the optional parameters
|
1129
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
1357
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
1130
1358
|
def get_score_submissions_with_http_info(score, opts = {})
|
1131
1359
|
if @api_client.config.debugging
|
1132
|
-
@api_client.config.logger.debug
|
1360
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_submissions ...'
|
1133
1361
|
end
|
1134
1362
|
# verify the required parameter 'score' is set
|
1135
1363
|
if @api_client.config.client_side_validation && score.nil?
|
1136
1364
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
|
1137
1365
|
end
|
1138
1366
|
# resource path
|
1139
|
-
local_var_path =
|
1367
|
+
local_var_path = '/scores/{score}/submissions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1140
1368
|
|
1141
1369
|
# query parameters
|
1142
|
-
query_params = {}
|
1370
|
+
query_params = opts[:query_params] || {}
|
1143
1371
|
|
1144
1372
|
# header parameters
|
1145
|
-
header_params = {}
|
1373
|
+
header_params = opts[:header_params] || {}
|
1146
1374
|
# HTTP header 'Accept' (if needed)
|
1147
1375
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1148
|
-
# HTTP header 'Content-Type'
|
1149
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1150
1376
|
|
1151
1377
|
# form parameters
|
1152
|
-
form_params = {}
|
1378
|
+
form_params = opts[:form_params] || {}
|
1153
1379
|
|
1154
1380
|
# http body (model)
|
1155
|
-
post_body =
|
1156
|
-
|
1157
|
-
|
1381
|
+
post_body = opts[:debug_body]
|
1382
|
+
|
1383
|
+
# return_type
|
1384
|
+
return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
|
1385
|
+
|
1386
|
+
# auth_names
|
1387
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1388
|
+
|
1389
|
+
new_options = opts.merge(
|
1390
|
+
:operation => :"ScoreApi.get_score_submissions",
|
1158
1391
|
:header_params => header_params,
|
1159
1392
|
:query_params => query_params,
|
1160
1393
|
:form_params => form_params,
|
1161
1394
|
:body => post_body,
|
1162
1395
|
:auth_names => auth_names,
|
1163
|
-
:return_type =>
|
1396
|
+
:return_type => return_type
|
1397
|
+
)
|
1398
|
+
|
1399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1164
1400
|
if @api_client.config.debugging
|
1165
1401
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1166
1402
|
end
|
@@ -1168,27 +1404,25 @@ module FlatApi
|
|
1168
1404
|
end
|
1169
1405
|
|
1170
1406
|
# Retrieve the details of an audio or video track linked to a score
|
1171
|
-
#
|
1172
|
-
# @param
|
1173
|
-
# @param track Unique identifier of a score audio track
|
1407
|
+
# @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`).
|
1408
|
+
# @param track [String] Unique identifier of a score audio track
|
1174
1409
|
# @param [Hash] opts the optional parameters
|
1175
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1410
|
+
# @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.
|
1176
1411
|
# @return [ScoreTrack]
|
1177
1412
|
def get_score_track(score, track, opts = {})
|
1178
1413
|
data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
|
1179
|
-
|
1414
|
+
data
|
1180
1415
|
end
|
1181
1416
|
|
1182
1417
|
# Retrieve the details of an audio or video track linked to a score
|
1183
|
-
#
|
1184
|
-
# @param
|
1185
|
-
# @param track Unique identifier of a score audio track
|
1418
|
+
# @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`).
|
1419
|
+
# @param track [String] Unique identifier of a score audio track
|
1186
1420
|
# @param [Hash] opts the optional parameters
|
1187
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1188
|
-
# @return [Array<(ScoreTrack,
|
1421
|
+
# @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.
|
1422
|
+
# @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
|
1189
1423
|
def get_score_track_with_http_info(score, track, opts = {})
|
1190
1424
|
if @api_client.config.debugging
|
1191
|
-
@api_client.config.logger.debug
|
1425
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_track ...'
|
1192
1426
|
end
|
1193
1427
|
# verify the required parameter 'score' is set
|
1194
1428
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1199,90 +1433,187 @@ module FlatApi
|
|
1199
1433
|
fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
|
1200
1434
|
end
|
1201
1435
|
# resource path
|
1202
|
-
local_var_path =
|
1436
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
|
1203
1437
|
|
1204
1438
|
# query parameters
|
1205
|
-
query_params = {}
|
1439
|
+
query_params = opts[:query_params] || {}
|
1206
1440
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1207
1441
|
|
1208
1442
|
# header parameters
|
1209
|
-
header_params = {}
|
1443
|
+
header_params = opts[:header_params] || {}
|
1210
1444
|
# HTTP header 'Accept' (if needed)
|
1211
1445
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1212
|
-
# HTTP header 'Content-Type'
|
1213
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1214
1446
|
|
1215
1447
|
# form parameters
|
1216
|
-
form_params = {}
|
1448
|
+
form_params = opts[:form_params] || {}
|
1217
1449
|
|
1218
1450
|
# http body (model)
|
1219
|
-
post_body =
|
1220
|
-
|
1221
|
-
|
1451
|
+
post_body = opts[:debug_body]
|
1452
|
+
|
1453
|
+
# return_type
|
1454
|
+
return_type = opts[:debug_return_type] || 'ScoreTrack'
|
1455
|
+
|
1456
|
+
# auth_names
|
1457
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1458
|
+
|
1459
|
+
new_options = opts.merge(
|
1460
|
+
:operation => :"ScoreApi.get_score_track",
|
1222
1461
|
:header_params => header_params,
|
1223
1462
|
:query_params => query_params,
|
1224
1463
|
:form_params => form_params,
|
1225
1464
|
:body => post_body,
|
1226
1465
|
:auth_names => auth_names,
|
1227
|
-
:return_type =>
|
1466
|
+
:return_type => return_type
|
1467
|
+
)
|
1468
|
+
|
1469
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1228
1470
|
if @api_client.config.debugging
|
1229
1471
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1230
1472
|
end
|
1231
1473
|
return data, status_code, headers
|
1232
1474
|
end
|
1233
1475
|
|
1476
|
+
# List liked scores
|
1477
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1478
|
+
# @param [Hash] opts the optional parameters
|
1479
|
+
# @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.
|
1480
|
+
# @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.
|
1481
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
|
1482
|
+
# @option opts [Boolean] :ids Return only the identifiers of the scores
|
1483
|
+
# @return [Array<ScoreDetails>]
|
1484
|
+
def get_user_likes(user, opts = {})
|
1485
|
+
data, _status_code, _headers = get_user_likes_with_http_info(user, opts)
|
1486
|
+
data
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
# List liked scores
|
1490
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1491
|
+
# @param [Hash] opts the optional parameters
|
1492
|
+
# @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.
|
1493
|
+
# @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.
|
1494
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
|
1495
|
+
# @option opts [Boolean] :ids Return only the identifiers of the scores
|
1496
|
+
# @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
1497
|
+
def get_user_likes_with_http_info(user, opts = {})
|
1498
|
+
if @api_client.config.debugging
|
1499
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_user_likes ...'
|
1500
|
+
end
|
1501
|
+
# verify the required parameter 'user' is set
|
1502
|
+
if @api_client.config.client_side_validation && user.nil?
|
1503
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_likes"
|
1504
|
+
end
|
1505
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
1506
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be smaller than or equal to 100.'
|
1507
|
+
end
|
1508
|
+
|
1509
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
1510
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be greater than or equal to 1.'
|
1511
|
+
end
|
1512
|
+
|
1513
|
+
# resource path
|
1514
|
+
local_var_path = '/users/{user}/likes'.sub('{' + 'user' + '}', CGI.escape(user.to_s))
|
1515
|
+
|
1516
|
+
# query parameters
|
1517
|
+
query_params = opts[:query_params] || {}
|
1518
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
1519
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
1520
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1521
|
+
query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
|
1522
|
+
|
1523
|
+
# header parameters
|
1524
|
+
header_params = opts[:header_params] || {}
|
1525
|
+
# HTTP header 'Accept' (if needed)
|
1526
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1527
|
+
|
1528
|
+
# form parameters
|
1529
|
+
form_params = opts[:form_params] || {}
|
1530
|
+
|
1531
|
+
# http body (model)
|
1532
|
+
post_body = opts[:debug_body]
|
1533
|
+
|
1534
|
+
# return_type
|
1535
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
|
1536
|
+
|
1537
|
+
# auth_names
|
1538
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1539
|
+
|
1540
|
+
new_options = opts.merge(
|
1541
|
+
:operation => :"ScoreApi.get_user_likes",
|
1542
|
+
:header_params => header_params,
|
1543
|
+
:query_params => query_params,
|
1544
|
+
:form_params => form_params,
|
1545
|
+
:body => post_body,
|
1546
|
+
:auth_names => auth_names,
|
1547
|
+
:return_type => return_type
|
1548
|
+
)
|
1549
|
+
|
1550
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1551
|
+
if @api_client.config.debugging
|
1552
|
+
@api_client.config.logger.debug "API called: ScoreApi#get_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1553
|
+
end
|
1554
|
+
return data, status_code, headers
|
1555
|
+
end
|
1556
|
+
|
1234
1557
|
# List user's scores
|
1235
|
-
# Get the list of scores owned by
|
1236
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1558
|
+
# Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
|
1559
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1237
1560
|
# @param [Hash] opts the optional parameters
|
1238
1561
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
1239
1562
|
# @return [Array<ScoreDetails>]
|
1240
1563
|
def get_user_scores(user, opts = {})
|
1241
1564
|
data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
|
1242
|
-
|
1565
|
+
data
|
1243
1566
|
end
|
1244
1567
|
|
1245
1568
|
# List user's scores
|
1246
|
-
# Get the list of scores owned by
|
1247
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1569
|
+
# Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
|
1570
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1248
1571
|
# @param [Hash] opts the optional parameters
|
1249
1572
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
1250
|
-
# @return [Array<(Array<ScoreDetails>,
|
1573
|
+
# @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
1251
1574
|
def get_user_scores_with_http_info(user, opts = {})
|
1252
1575
|
if @api_client.config.debugging
|
1253
|
-
@api_client.config.logger.debug
|
1576
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_user_scores ...'
|
1254
1577
|
end
|
1255
1578
|
# verify the required parameter 'user' is set
|
1256
1579
|
if @api_client.config.client_side_validation && user.nil?
|
1257
1580
|
fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
|
1258
1581
|
end
|
1259
1582
|
# resource path
|
1260
|
-
local_var_path =
|
1583
|
+
local_var_path = '/users/{user}/scores'.sub('{' + 'user' + '}', CGI.escape(user.to_s))
|
1261
1584
|
|
1262
1585
|
# query parameters
|
1263
|
-
query_params = {}
|
1586
|
+
query_params = opts[:query_params] || {}
|
1264
1587
|
query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
|
1265
1588
|
|
1266
1589
|
# header parameters
|
1267
|
-
header_params = {}
|
1590
|
+
header_params = opts[:header_params] || {}
|
1268
1591
|
# HTTP header 'Accept' (if needed)
|
1269
1592
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1270
|
-
# HTTP header 'Content-Type'
|
1271
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1272
1593
|
|
1273
1594
|
# form parameters
|
1274
|
-
form_params = {}
|
1595
|
+
form_params = opts[:form_params] || {}
|
1275
1596
|
|
1276
1597
|
# http body (model)
|
1277
|
-
post_body =
|
1278
|
-
|
1279
|
-
|
1598
|
+
post_body = opts[:debug_body]
|
1599
|
+
|
1600
|
+
# return_type
|
1601
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
|
1602
|
+
|
1603
|
+
# auth_names
|
1604
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1605
|
+
|
1606
|
+
new_options = opts.merge(
|
1607
|
+
:operation => :"ScoreApi.get_user_scores",
|
1280
1608
|
:header_params => header_params,
|
1281
1609
|
:query_params => query_params,
|
1282
1610
|
:form_params => form_params,
|
1283
1611
|
:body => post_body,
|
1284
1612
|
:auth_names => auth_names,
|
1285
|
-
:return_type =>
|
1613
|
+
:return_type => return_type
|
1614
|
+
)
|
1615
|
+
|
1616
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1286
1617
|
if @api_client.config.debugging
|
1287
1618
|
@api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1288
1619
|
end
|
@@ -1290,57 +1621,69 @@ module FlatApi
|
|
1290
1621
|
end
|
1291
1622
|
|
1292
1623
|
# List the audio or video tracks linked to a score
|
1293
|
-
#
|
1294
|
-
# @param score 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`).
|
1624
|
+
# @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`).
|
1295
1625
|
# @param [Hash] opts the optional parameters
|
1296
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1626
|
+
# @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.
|
1627
|
+
# @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
|
1628
|
+
# @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track
|
1297
1629
|
# @return [Array<ScoreTrack>]
|
1298
1630
|
def list_score_tracks(score, opts = {})
|
1299
1631
|
data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
|
1300
|
-
|
1632
|
+
data
|
1301
1633
|
end
|
1302
1634
|
|
1303
1635
|
# List the audio or video tracks linked to a score
|
1304
|
-
#
|
1305
|
-
# @param score 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`).
|
1636
|
+
# @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`).
|
1306
1637
|
# @param [Hash] opts the optional parameters
|
1307
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1308
|
-
# @
|
1638
|
+
# @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.
|
1639
|
+
# @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
|
1640
|
+
# @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track
|
1641
|
+
# @return [Array<(Array<ScoreTrack>, Integer, Hash)>] Array<ScoreTrack> data, response status code and response headers
|
1309
1642
|
def list_score_tracks_with_http_info(score, opts = {})
|
1310
1643
|
if @api_client.config.debugging
|
1311
|
-
@api_client.config.logger.debug
|
1644
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.list_score_tracks ...'
|
1312
1645
|
end
|
1313
1646
|
# verify the required parameter 'score' is set
|
1314
1647
|
if @api_client.config.client_side_validation && score.nil?
|
1315
1648
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
|
1316
1649
|
end
|
1317
1650
|
# resource path
|
1318
|
-
local_var_path =
|
1651
|
+
local_var_path = '/scores/{score}/tracks'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1319
1652
|
|
1320
1653
|
# query parameters
|
1321
|
-
query_params = {}
|
1654
|
+
query_params = opts[:query_params] || {}
|
1322
1655
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1656
|
+
query_params[:'assignment'] = opts[:'assignment'] if !opts[:'assignment'].nil?
|
1657
|
+
query_params[:'listAutoTrack'] = opts[:'list_auto_track'] if !opts[:'list_auto_track'].nil?
|
1323
1658
|
|
1324
1659
|
# header parameters
|
1325
|
-
header_params = {}
|
1660
|
+
header_params = opts[:header_params] || {}
|
1326
1661
|
# HTTP header 'Accept' (if needed)
|
1327
1662
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1328
|
-
# HTTP header 'Content-Type'
|
1329
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1330
1663
|
|
1331
1664
|
# form parameters
|
1332
|
-
form_params = {}
|
1665
|
+
form_params = opts[:form_params] || {}
|
1333
1666
|
|
1334
1667
|
# http body (model)
|
1335
|
-
post_body =
|
1336
|
-
|
1337
|
-
|
1668
|
+
post_body = opts[:debug_body]
|
1669
|
+
|
1670
|
+
# return_type
|
1671
|
+
return_type = opts[:debug_return_type] || 'Array<ScoreTrack>'
|
1672
|
+
|
1673
|
+
# auth_names
|
1674
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1675
|
+
|
1676
|
+
new_options = opts.merge(
|
1677
|
+
:operation => :"ScoreApi.list_score_tracks",
|
1338
1678
|
:header_params => header_params,
|
1339
1679
|
:query_params => query_params,
|
1340
1680
|
:form_params => form_params,
|
1341
1681
|
:body => post_body,
|
1342
1682
|
:auth_names => auth_names,
|
1343
|
-
:return_type =>
|
1683
|
+
:return_type => return_type
|
1684
|
+
)
|
1685
|
+
|
1686
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1344
1687
|
if @api_client.config.debugging
|
1345
1688
|
@api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1346
1689
|
end
|
@@ -1348,27 +1691,25 @@ module FlatApi
|
|
1348
1691
|
end
|
1349
1692
|
|
1350
1693
|
# Mark the comment as resolved
|
1351
|
-
#
|
1352
|
-
# @param
|
1353
|
-
# @param comment Unique identifier of a sheet music comment
|
1694
|
+
# @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`).
|
1695
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
1354
1696
|
# @param [Hash] opts the optional parameters
|
1355
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1697
|
+
# @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.
|
1356
1698
|
# @return [nil]
|
1357
1699
|
def mark_score_comment_resolved(score, comment, opts = {})
|
1358
1700
|
mark_score_comment_resolved_with_http_info(score, comment, opts)
|
1359
|
-
|
1701
|
+
nil
|
1360
1702
|
end
|
1361
1703
|
|
1362
1704
|
# Mark the comment as resolved
|
1363
|
-
#
|
1364
|
-
# @param
|
1365
|
-
# @param comment Unique identifier of a sheet music comment
|
1705
|
+
# @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`).
|
1706
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
1366
1707
|
# @param [Hash] opts the optional parameters
|
1367
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1368
|
-
# @return [Array<(nil,
|
1708
|
+
# @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.
|
1709
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1369
1710
|
def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
|
1370
1711
|
if @api_client.config.debugging
|
1371
|
-
@api_client.config.logger.debug
|
1712
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_resolved ...'
|
1372
1713
|
end
|
1373
1714
|
# verify the required parameter 'score' is set
|
1374
1715
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1379,31 +1720,40 @@ module FlatApi
|
|
1379
1720
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
|
1380
1721
|
end
|
1381
1722
|
# resource path
|
1382
|
-
local_var_path =
|
1723
|
+
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
|
1383
1724
|
|
1384
1725
|
# query parameters
|
1385
|
-
query_params = {}
|
1726
|
+
query_params = opts[:query_params] || {}
|
1386
1727
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1387
1728
|
|
1388
1729
|
# header parameters
|
1389
|
-
header_params = {}
|
1730
|
+
header_params = opts[:header_params] || {}
|
1390
1731
|
# HTTP header 'Accept' (if needed)
|
1391
1732
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1392
|
-
# HTTP header 'Content-Type'
|
1393
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1394
1733
|
|
1395
1734
|
# form parameters
|
1396
|
-
form_params = {}
|
1735
|
+
form_params = opts[:form_params] || {}
|
1397
1736
|
|
1398
1737
|
# http body (model)
|
1399
|
-
post_body =
|
1400
|
-
|
1401
|
-
|
1738
|
+
post_body = opts[:debug_body]
|
1739
|
+
|
1740
|
+
# return_type
|
1741
|
+
return_type = opts[:debug_return_type]
|
1742
|
+
|
1743
|
+
# auth_names
|
1744
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1745
|
+
|
1746
|
+
new_options = opts.merge(
|
1747
|
+
:operation => :"ScoreApi.mark_score_comment_resolved",
|
1402
1748
|
:header_params => header_params,
|
1403
1749
|
:query_params => query_params,
|
1404
1750
|
:form_params => form_params,
|
1405
1751
|
:body => post_body,
|
1406
|
-
:auth_names => auth_names
|
1752
|
+
:auth_names => auth_names,
|
1753
|
+
:return_type => return_type
|
1754
|
+
)
|
1755
|
+
|
1756
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1407
1757
|
if @api_client.config.debugging
|
1408
1758
|
@api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1409
1759
|
end
|
@@ -1411,27 +1761,25 @@ module FlatApi
|
|
1411
1761
|
end
|
1412
1762
|
|
1413
1763
|
# Mark the comment as unresolved
|
1414
|
-
#
|
1415
|
-
# @param
|
1416
|
-
# @param comment Unique identifier of a sheet music comment
|
1764
|
+
# @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`).
|
1765
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
1417
1766
|
# @param [Hash] opts the optional parameters
|
1418
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1767
|
+
# @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.
|
1419
1768
|
# @return [nil]
|
1420
1769
|
def mark_score_comment_unresolved(score, comment, opts = {})
|
1421
1770
|
mark_score_comment_unresolved_with_http_info(score, comment, opts)
|
1422
|
-
|
1771
|
+
nil
|
1423
1772
|
end
|
1424
1773
|
|
1425
1774
|
# Mark the comment as unresolved
|
1426
|
-
#
|
1427
|
-
# @param
|
1428
|
-
# @param comment Unique identifier of a sheet music comment
|
1775
|
+
# @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`).
|
1776
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
1429
1777
|
# @param [Hash] opts the optional parameters
|
1430
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1431
|
-
# @return [Array<(nil,
|
1778
|
+
# @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.
|
1779
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1432
1780
|
def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
|
1433
1781
|
if @api_client.config.debugging
|
1434
|
-
@api_client.config.logger.debug
|
1782
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_unresolved ...'
|
1435
1783
|
end
|
1436
1784
|
# verify the required parameter 'score' is set
|
1437
1785
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1442,31 +1790,40 @@ module FlatApi
|
|
1442
1790
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
|
1443
1791
|
end
|
1444
1792
|
# resource path
|
1445
|
-
local_var_path =
|
1793
|
+
local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
|
1446
1794
|
|
1447
1795
|
# query parameters
|
1448
|
-
query_params = {}
|
1796
|
+
query_params = opts[:query_params] || {}
|
1449
1797
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1450
1798
|
|
1451
1799
|
# header parameters
|
1452
|
-
header_params = {}
|
1800
|
+
header_params = opts[:header_params] || {}
|
1453
1801
|
# HTTP header 'Accept' (if needed)
|
1454
1802
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1455
|
-
# HTTP header 'Content-Type'
|
1456
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1457
1803
|
|
1458
1804
|
# form parameters
|
1459
|
-
form_params = {}
|
1805
|
+
form_params = opts[:form_params] || {}
|
1460
1806
|
|
1461
1807
|
# http body (model)
|
1462
|
-
post_body =
|
1463
|
-
|
1464
|
-
|
1808
|
+
post_body = opts[:debug_body]
|
1809
|
+
|
1810
|
+
# return_type
|
1811
|
+
return_type = opts[:debug_return_type]
|
1812
|
+
|
1813
|
+
# auth_names
|
1814
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1815
|
+
|
1816
|
+
new_options = opts.merge(
|
1817
|
+
:operation => :"ScoreApi.mark_score_comment_unresolved",
|
1465
1818
|
:header_params => header_params,
|
1466
1819
|
:query_params => query_params,
|
1467
1820
|
:form_params => form_params,
|
1468
1821
|
:body => post_body,
|
1469
|
-
:auth_names => auth_names
|
1822
|
+
:auth_names => auth_names,
|
1823
|
+
:return_type => return_type
|
1824
|
+
)
|
1825
|
+
|
1826
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1470
1827
|
if @api_client.config.debugging
|
1471
1828
|
@api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1472
1829
|
end
|
@@ -1475,26 +1832,26 @@ module FlatApi
|
|
1475
1832
|
|
1476
1833
|
# Post a new comment
|
1477
1834
|
# Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`.
|
1478
|
-
# @param score 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`).
|
1479
|
-
# @param body
|
1835
|
+
# @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`).
|
1836
|
+
# @param body [ScoreCommentCreation]
|
1480
1837
|
# @param [Hash] opts the optional parameters
|
1481
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1838
|
+
# @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.
|
1482
1839
|
# @return [ScoreComment]
|
1483
1840
|
def post_score_comment(score, body, opts = {})
|
1484
1841
|
data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
|
1485
|
-
|
1842
|
+
data
|
1486
1843
|
end
|
1487
1844
|
|
1488
1845
|
# Post a new comment
|
1489
1846
|
# Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`.
|
1490
|
-
# @param score 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`).
|
1491
|
-
# @param body
|
1847
|
+
# @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`).
|
1848
|
+
# @param body [ScoreCommentCreation]
|
1492
1849
|
# @param [Hash] opts the optional parameters
|
1493
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1494
|
-
# @return [Array<(ScoreComment,
|
1850
|
+
# @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.
|
1851
|
+
# @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
|
1495
1852
|
def post_score_comment_with_http_info(score, body, opts = {})
|
1496
1853
|
if @api_client.config.debugging
|
1497
|
-
@api_client.config.logger.debug
|
1854
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.post_score_comment ...'
|
1498
1855
|
end
|
1499
1856
|
# verify the required parameter 'score' is set
|
1500
1857
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1505,32 +1862,45 @@ module FlatApi
|
|
1505
1862
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
|
1506
1863
|
end
|
1507
1864
|
# resource path
|
1508
|
-
local_var_path =
|
1865
|
+
local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1509
1866
|
|
1510
1867
|
# query parameters
|
1511
|
-
query_params = {}
|
1868
|
+
query_params = opts[:query_params] || {}
|
1512
1869
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1513
1870
|
|
1514
1871
|
# header parameters
|
1515
|
-
header_params = {}
|
1872
|
+
header_params = opts[:header_params] || {}
|
1516
1873
|
# HTTP header 'Accept' (if needed)
|
1517
1874
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1518
1875
|
# HTTP header 'Content-Type'
|
1519
|
-
|
1876
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1877
|
+
if !content_type.nil?
|
1878
|
+
header_params['Content-Type'] = content_type
|
1879
|
+
end
|
1520
1880
|
|
1521
1881
|
# form parameters
|
1522
|
-
form_params = {}
|
1882
|
+
form_params = opts[:form_params] || {}
|
1523
1883
|
|
1524
1884
|
# http body (model)
|
1525
|
-
post_body = @api_client.object_to_http_body(body)
|
1526
|
-
|
1527
|
-
|
1885
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1886
|
+
|
1887
|
+
# return_type
|
1888
|
+
return_type = opts[:debug_return_type] || 'ScoreComment'
|
1889
|
+
|
1890
|
+
# auth_names
|
1891
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1892
|
+
|
1893
|
+
new_options = opts.merge(
|
1894
|
+
:operation => :"ScoreApi.post_score_comment",
|
1528
1895
|
:header_params => header_params,
|
1529
1896
|
:query_params => query_params,
|
1530
1897
|
:form_params => form_params,
|
1531
1898
|
:body => post_body,
|
1532
1899
|
:auth_names => auth_names,
|
1533
|
-
:return_type =>
|
1900
|
+
:return_type => return_type
|
1901
|
+
)
|
1902
|
+
|
1903
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1534
1904
|
if @api_client.config.debugging
|
1535
1905
|
@api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1536
1906
|
end
|
@@ -1539,24 +1909,24 @@ module FlatApi
|
|
1539
1909
|
|
1540
1910
|
# Delete a collaborator
|
1541
1911
|
# Remove the specified collaborator from the score
|
1542
|
-
# @param score 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`).
|
1543
|
-
# @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
1912
|
+
# @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
|
+
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
1544
1914
|
# @param [Hash] opts the optional parameters
|
1545
1915
|
# @return [nil]
|
1546
1916
|
def remove_score_collaborator(score, collaborator, opts = {})
|
1547
1917
|
remove_score_collaborator_with_http_info(score, collaborator, opts)
|
1548
|
-
|
1918
|
+
nil
|
1549
1919
|
end
|
1550
1920
|
|
1551
1921
|
# Delete a collaborator
|
1552
1922
|
# Remove the specified collaborator from the score
|
1553
|
-
# @param score 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`).
|
1554
|
-
# @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
1923
|
+
# @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
|
+
# @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
|
1555
1925
|
# @param [Hash] opts the optional parameters
|
1556
|
-
# @return [Array<(nil,
|
1926
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1557
1927
|
def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
|
1558
1928
|
if @api_client.config.debugging
|
1559
|
-
@api_client.config.logger.debug
|
1929
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.remove_score_collaborator ...'
|
1560
1930
|
end
|
1561
1931
|
# verify the required parameter 'score' is set
|
1562
1932
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1567,60 +1937,130 @@ module FlatApi
|
|
1567
1937
|
fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
|
1568
1938
|
end
|
1569
1939
|
# resource path
|
1570
|
-
local_var_path =
|
1940
|
+
local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'collaborator' + '}', CGI.escape(collaborator.to_s))
|
1571
1941
|
|
1572
1942
|
# query parameters
|
1573
|
-
query_params = {}
|
1943
|
+
query_params = opts[:query_params] || {}
|
1574
1944
|
|
1575
1945
|
# header parameters
|
1576
|
-
header_params = {}
|
1946
|
+
header_params = opts[:header_params] || {}
|
1577
1947
|
# HTTP header 'Accept' (if needed)
|
1578
1948
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1579
|
-
# HTTP header 'Content-Type'
|
1580
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1581
1949
|
|
1582
1950
|
# form parameters
|
1583
|
-
form_params = {}
|
1951
|
+
form_params = opts[:form_params] || {}
|
1584
1952
|
|
1585
1953
|
# http body (model)
|
1586
|
-
post_body =
|
1587
|
-
|
1588
|
-
|
1954
|
+
post_body = opts[:debug_body]
|
1955
|
+
|
1956
|
+
# return_type
|
1957
|
+
return_type = opts[:debug_return_type]
|
1958
|
+
|
1959
|
+
# auth_names
|
1960
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
1961
|
+
|
1962
|
+
new_options = opts.merge(
|
1963
|
+
:operation => :"ScoreApi.remove_score_collaborator",
|
1589
1964
|
:header_params => header_params,
|
1590
1965
|
:query_params => query_params,
|
1591
1966
|
:form_params => form_params,
|
1592
1967
|
:body => post_body,
|
1593
|
-
:auth_names => auth_names
|
1968
|
+
:auth_names => auth_names,
|
1969
|
+
:return_type => return_type
|
1970
|
+
)
|
1971
|
+
|
1972
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1594
1973
|
if @api_client.config.debugging
|
1595
1974
|
@api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1596
1975
|
end
|
1597
1976
|
return data, status_code, headers
|
1598
1977
|
end
|
1599
1978
|
|
1979
|
+
# Untrash a score
|
1980
|
+
# This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
|
1981
|
+
# @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`).
|
1982
|
+
# @param [Hash] opts the optional parameters
|
1983
|
+
# @return [nil]
|
1984
|
+
def untrash_score(score, opts = {})
|
1985
|
+
untrash_score_with_http_info(score, opts)
|
1986
|
+
nil
|
1987
|
+
end
|
1988
|
+
|
1989
|
+
# Untrash a score
|
1990
|
+
# This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
|
1991
|
+
# @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`).
|
1992
|
+
# @param [Hash] opts the optional parameters
|
1993
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1994
|
+
def untrash_score_with_http_info(score, opts = {})
|
1995
|
+
if @api_client.config.debugging
|
1996
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.untrash_score ...'
|
1997
|
+
end
|
1998
|
+
# verify the required parameter 'score' is set
|
1999
|
+
if @api_client.config.client_side_validation && score.nil?
|
2000
|
+
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
|
2001
|
+
end
|
2002
|
+
# resource path
|
2003
|
+
local_var_path = '/scores/{score}/untrash'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
2004
|
+
|
2005
|
+
# query parameters
|
2006
|
+
query_params = opts[:query_params] || {}
|
2007
|
+
|
2008
|
+
# header parameters
|
2009
|
+
header_params = opts[:header_params] || {}
|
2010
|
+
# HTTP header 'Accept' (if needed)
|
2011
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2012
|
+
|
2013
|
+
# form parameters
|
2014
|
+
form_params = opts[:form_params] || {}
|
2015
|
+
|
2016
|
+
# http body (model)
|
2017
|
+
post_body = opts[:debug_body]
|
2018
|
+
|
2019
|
+
# return_type
|
2020
|
+
return_type = opts[:debug_return_type]
|
2021
|
+
|
2022
|
+
# auth_names
|
2023
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
2024
|
+
|
2025
|
+
new_options = opts.merge(
|
2026
|
+
:operation => :"ScoreApi.untrash_score",
|
2027
|
+
:header_params => header_params,
|
2028
|
+
:query_params => query_params,
|
2029
|
+
:form_params => form_params,
|
2030
|
+
:body => post_body,
|
2031
|
+
:auth_names => auth_names,
|
2032
|
+
:return_type => return_type
|
2033
|
+
)
|
2034
|
+
|
2035
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
2036
|
+
if @api_client.config.debugging
|
2037
|
+
@api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2038
|
+
end
|
2039
|
+
return data, status_code, headers
|
2040
|
+
end
|
2041
|
+
|
1600
2042
|
# Update an existing comment
|
1601
|
-
#
|
1602
|
-
# @param
|
1603
|
-
# @param
|
1604
|
-
# @param body
|
2043
|
+
# @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`).
|
2044
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
2045
|
+
# @param body [ScoreCommentUpdate]
|
1605
2046
|
# @param [Hash] opts the optional parameters
|
1606
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
2047
|
+
# @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.
|
1607
2048
|
# @return [ScoreComment]
|
1608
2049
|
def update_score_comment(score, comment, body, opts = {})
|
1609
2050
|
data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
|
1610
|
-
|
2051
|
+
data
|
1611
2052
|
end
|
1612
2053
|
|
1613
2054
|
# Update an existing comment
|
1614
|
-
#
|
1615
|
-
# @param
|
1616
|
-
# @param
|
1617
|
-
# @param body
|
2055
|
+
# @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`).
|
2056
|
+
# @param comment [String] Unique identifier of a sheet music comment
|
2057
|
+
# @param body [ScoreCommentUpdate]
|
1618
2058
|
# @param [Hash] opts the optional parameters
|
1619
|
-
# @option opts [String] :sharing_key This sharing key must be specified to access to a score with a `privacy` mode set to `privateLink` and the current user is not a collaborator of the document.
|
1620
|
-
# @return [Array<(ScoreComment,
|
2059
|
+
# @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.
|
2060
|
+
# @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
|
1621
2061
|
def update_score_comment_with_http_info(score, comment, body, opts = {})
|
1622
2062
|
if @api_client.config.debugging
|
1623
|
-
@api_client.config.logger.debug
|
2063
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.update_score_comment ...'
|
1624
2064
|
end
|
1625
2065
|
# verify the required parameter 'score' is set
|
1626
2066
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1635,32 +2075,45 @@ module FlatApi
|
|
1635
2075
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
|
1636
2076
|
end
|
1637
2077
|
# resource path
|
1638
|
-
local_var_path =
|
2078
|
+
local_var_path = '/scores/{score}/comments/{comment}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
|
1639
2079
|
|
1640
2080
|
# query parameters
|
1641
|
-
query_params = {}
|
2081
|
+
query_params = opts[:query_params] || {}
|
1642
2082
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1643
2083
|
|
1644
2084
|
# header parameters
|
1645
|
-
header_params = {}
|
2085
|
+
header_params = opts[:header_params] || {}
|
1646
2086
|
# HTTP header 'Accept' (if needed)
|
1647
2087
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1648
2088
|
# HTTP header 'Content-Type'
|
1649
|
-
|
2089
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2090
|
+
if !content_type.nil?
|
2091
|
+
header_params['Content-Type'] = content_type
|
2092
|
+
end
|
1650
2093
|
|
1651
2094
|
# form parameters
|
1652
|
-
form_params = {}
|
2095
|
+
form_params = opts[:form_params] || {}
|
1653
2096
|
|
1654
2097
|
# http body (model)
|
1655
|
-
post_body = @api_client.object_to_http_body(body)
|
1656
|
-
|
1657
|
-
|
2098
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
2099
|
+
|
2100
|
+
# return_type
|
2101
|
+
return_type = opts[:debug_return_type] || 'ScoreComment'
|
2102
|
+
|
2103
|
+
# auth_names
|
2104
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
2105
|
+
|
2106
|
+
new_options = opts.merge(
|
2107
|
+
:operation => :"ScoreApi.update_score_comment",
|
1658
2108
|
:header_params => header_params,
|
1659
2109
|
:query_params => query_params,
|
1660
2110
|
:form_params => form_params,
|
1661
2111
|
:body => post_body,
|
1662
2112
|
:auth_names => auth_names,
|
1663
|
-
:return_type =>
|
2113
|
+
:return_type => return_type
|
2114
|
+
)
|
2115
|
+
|
2116
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1664
2117
|
if @api_client.config.debugging
|
1665
2118
|
@api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1666
2119
|
end
|
@@ -1668,27 +2121,25 @@ module FlatApi
|
|
1668
2121
|
end
|
1669
2122
|
|
1670
2123
|
# Update an audio or video track linked to a score
|
1671
|
-
#
|
1672
|
-
# @param
|
1673
|
-
# @param
|
1674
|
-
# @param body
|
2124
|
+
# @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`).
|
2125
|
+
# @param track [String] Unique identifier of a score audio track
|
2126
|
+
# @param body [ScoreTrackUpdate]
|
1675
2127
|
# @param [Hash] opts the optional parameters
|
1676
2128
|
# @return [ScoreTrack]
|
1677
2129
|
def update_score_track(score, track, body, opts = {})
|
1678
2130
|
data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
|
1679
|
-
|
2131
|
+
data
|
1680
2132
|
end
|
1681
2133
|
|
1682
2134
|
# Update an audio or video track linked to a score
|
1683
|
-
#
|
1684
|
-
# @param
|
1685
|
-
# @param
|
1686
|
-
# @param body
|
2135
|
+
# @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`).
|
2136
|
+
# @param track [String] Unique identifier of a score audio track
|
2137
|
+
# @param body [ScoreTrackUpdate]
|
1687
2138
|
# @param [Hash] opts the optional parameters
|
1688
|
-
# @return [Array<(ScoreTrack,
|
2139
|
+
# @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
|
1689
2140
|
def update_score_track_with_http_info(score, track, body, opts = {})
|
1690
2141
|
if @api_client.config.debugging
|
1691
|
-
@api_client.config.logger.debug
|
2142
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.update_score_track ...'
|
1692
2143
|
end
|
1693
2144
|
# verify the required parameter 'score' is set
|
1694
2145
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1703,31 +2154,44 @@ module FlatApi
|
|
1703
2154
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
|
1704
2155
|
end
|
1705
2156
|
# resource path
|
1706
|
-
local_var_path =
|
2157
|
+
local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
|
1707
2158
|
|
1708
2159
|
# query parameters
|
1709
|
-
query_params = {}
|
2160
|
+
query_params = opts[:query_params] || {}
|
1710
2161
|
|
1711
2162
|
# header parameters
|
1712
|
-
header_params = {}
|
2163
|
+
header_params = opts[:header_params] || {}
|
1713
2164
|
# HTTP header 'Accept' (if needed)
|
1714
2165
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1715
2166
|
# HTTP header 'Content-Type'
|
1716
|
-
|
2167
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2168
|
+
if !content_type.nil?
|
2169
|
+
header_params['Content-Type'] = content_type
|
2170
|
+
end
|
1717
2171
|
|
1718
2172
|
# form parameters
|
1719
|
-
form_params = {}
|
2173
|
+
form_params = opts[:form_params] || {}
|
1720
2174
|
|
1721
2175
|
# http body (model)
|
1722
|
-
post_body = @api_client.object_to_http_body(body)
|
1723
|
-
|
1724
|
-
|
2176
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
2177
|
+
|
2178
|
+
# return_type
|
2179
|
+
return_type = opts[:debug_return_type] || 'ScoreTrack'
|
2180
|
+
|
2181
|
+
# auth_names
|
2182
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
2183
|
+
|
2184
|
+
new_options = opts.merge(
|
2185
|
+
:operation => :"ScoreApi.update_score_track",
|
1725
2186
|
:header_params => header_params,
|
1726
2187
|
:query_params => query_params,
|
1727
2188
|
:form_params => form_params,
|
1728
2189
|
:body => post_body,
|
1729
2190
|
:auth_names => auth_names,
|
1730
|
-
:return_type =>
|
2191
|
+
:return_type => return_type
|
2192
|
+
)
|
2193
|
+
|
2194
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1731
2195
|
if @api_client.config.debugging
|
1732
2196
|
@api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1733
2197
|
end
|