flat_api 0.2.0 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/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 +257 -169
- 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 +944 -552
- data/lib/flat_api/api/task_api.rb +85 -0
- data/lib/flat_api/api/user_api.rb +112 -74
- 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 +138 -50
- data/lib/flat_api/models/collection_app.rb +236 -0
- data/lib/flat_api/models/collection_capabilities.rb +109 -47
- data/lib/flat_api/models/collection_creation.rb +132 -37
- data/lib/flat_api/models/collection_modification.rb +122 -35
- data/lib/flat_api/models/collection_privacy.rb +18 -9
- data/lib/flat_api/models/collection_type.rb +19 -9
- 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 +181 -51
- data/lib/flat_api/models/resource_collaborator_creation.rb +74 -47
- data/lib/flat_api/models/resource_rights.rb +145 -42
- 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 -225
- 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 +272 -81
- data/lib/flat_api/models/score_fork.rb +88 -36
- 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 +180 -50
- 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 +78 -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 +36 -37
- 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 +105 -91
- data/spec/api/task_api_spec.rb +47 -0
- data/spec/api/user_api_spec.rb +27 -25
- 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 +15 -21
- data/spec/models/collection_creation_spec.rb +17 -17
- data/spec/models/collection_modification_spec.rb +17 -17
- data/spec/models/collection_privacy_spec.rb +10 -16
- data/spec/models/collection_spec.rb +39 -27
- data/spec/models/collection_type_spec.rb +10 -16
- 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 +17 -23
- data/spec/models/resource_collaborator_spec.rb +47 -25
- data/spec/models/resource_rights_spec.rb +29 -19
- 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 -58
- 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 +23 -17
- 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 +47 -23
- 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 +279 -327
- data/CHANGELOG.md +0 -17
- data/Gemfile +0 -7
- data/README.md +0 -271
- data/Rakefile +0 -8
- data/docs/AccountApi.md +0 -55
- data/docs/Assignment.md +0 -18
- data/docs/AssignmentCopy.md +0 -8
- data/docs/AssignmentCreation.md +0 -12
- data/docs/AssignmentSubmission.md +0 -19
- data/docs/AssignmentSubmissionUpdate.md +0 -11
- data/docs/ClassApi.md +0 -1051
- data/docs/ClassAttachmentCreation.md +0 -10
- data/docs/ClassCreation.md +0 -9
- data/docs/ClassDetails.md +0 -25
- data/docs/ClassDetailsCanvas.md +0 -9
- data/docs/ClassDetailsClever.md +0 -14
- data/docs/ClassDetailsGoogleClassroom.md +0 -11
- data/docs/ClassDetailsGoogleDrive.md +0 -9
- data/docs/ClassDetailsLti.md +0 -10
- data/docs/ClassRoles.md +0 -7
- data/docs/ClassState.md +0 -7
- data/docs/ClassUpdate.md +0 -9
- data/docs/Collection.md +0 -18
- data/docs/CollectionApi.md +0 -521
- data/docs/CollectionCapabilities.md +0 -12
- data/docs/CollectionCreation.md +0 -8
- data/docs/CollectionModification.md +0 -8
- data/docs/CollectionPrivacy.md +0 -7
- data/docs/CollectionTitle.md +0 -7
- data/docs/CollectionType.md +0 -7
- data/docs/FlatErrorResponse.md +0 -11
- data/docs/FlatLocales.md +0 -7
- data/docs/GoogleClassroomCoursework.md +0 -10
- data/docs/GoogleClassroomSubmission.md +0 -10
- data/docs/Group.md +0 -14
- data/docs/GroupApi.md +0 -167
- data/docs/GroupDetails.md +0 -14
- data/docs/GroupType.md +0 -7
- data/docs/LicenseMode.md +0 -7
- data/docs/LicenseSources.md +0 -7
- data/docs/LmsName.md +0 -7
- data/docs/LtiCredentials.md +0 -16
- data/docs/LtiCredentialsCreation.md +0 -9
- data/docs/MediaAttachment.md +0 -23
- data/docs/MediaScoreSharingMode.md +0 -7
- data/docs/OrganizationApi.md +0 -538
- data/docs/OrganizationInvitation.md +0 -14
- data/docs/OrganizationInvitationCreation.md +0 -9
- data/docs/OrganizationRoles.md +0 -7
- data/docs/ResourceCollaborator.md +0 -16
- data/docs/ResourceCollaboratorCreation.md +0 -14
- data/docs/ResourceRights.md +0 -10
- data/docs/ResourceSharingKey.md +0 -7
- data/docs/ScoreApi.md +0 -1658
- data/docs/ScoreComment.md +0 -22
- data/docs/ScoreCommentContext.md +0 -14
- data/docs/ScoreCommentCreation.md +0 -13
- data/docs/ScoreCommentUpdate.md +0 -11
- data/docs/ScoreCommentsCounts.md +0 -11
- data/docs/ScoreCreation.md +0 -14
- data/docs/ScoreCreationType.md +0 -7
- data/docs/ScoreData.md +0 -7
- data/docs/ScoreDataEncoding.md +0 -7
- data/docs/ScoreDetails.md +0 -36
- data/docs/ScoreFork.md +0 -8
- data/docs/ScoreLicense.md +0 -7
- data/docs/ScoreLikesCounts.md +0 -10
- data/docs/ScoreModification.md +0 -14
- data/docs/ScorePrivacy.md +0 -7
- data/docs/ScoreRevision.md +0 -14
- data/docs/ScoreRevisionCreation.md +0 -11
- data/docs/ScoreRevisionStatistics.md +0 -9
- data/docs/ScoreSource.md +0 -8
- data/docs/ScoreSummary.md +0 -13
- data/docs/ScoreTrack.md +0 -19
- data/docs/ScoreTrackCreation.md +0 -12
- data/docs/ScoreTrackPoint.md +0 -10
- data/docs/ScoreTrackState.md +0 -7
- data/docs/ScoreTrackType.md +0 -7
- data/docs/ScoreTrackUpdate.md +0 -11
- data/docs/ScoreViewsCounts.md +0 -10
- data/docs/UserAdminUpdate.md +0 -9
- data/docs/UserApi.md +0 -173
- data/docs/UserBasics.md +0 -13
- data/docs/UserCreation.md +0 -11
- data/docs/UserDetails.md +0 -28
- data/docs/UserDetailsAdmin.md +0 -20
- data/docs/UserDetailsAdminLicense.md +0 -12
- data/docs/UserInstruments.md +0 -7
- data/docs/UserPublic.md +0 -25
- data/docs/UserPublicSummary.md +0 -17
- data/flat_api.gemspec +0 -48
- data/lib/flat_api/models/assignment_creation.rb +0 -230
- data/lib/flat_api/models/collection_title.rb +0 -179
- data/lib/flat_api/models/resource_sharing_key.rb +0 -179
- data/lib/flat_api/models/score_data.rb +0 -179
- data/lib/flat_api/models/score_data_encoding.rb +0 -30
- data/lib/flat_api/models/user_details_admin_license.rb +0 -227
- data/lib/flat_api/models/user_instruments.rb +0 -179
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/assignment_creation_spec.rb +0 -66
- data/spec/models/collection_title_spec.rb +0 -36
- data/spec/models/resource_sharing_key_spec.rb +0 -36
- data/spec/models/score_data_encoding_spec.rb +0 -36
- data/spec/models/score_data_spec.rb +0 -36
- data/spec/models/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
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.
|
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
|
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
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
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.
|
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
|
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<(ResourceCollaborator,
|
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
|
@@ -260,52 +401,64 @@ module FlatApi
|
|
260
401
|
|
261
402
|
# Delete a score
|
262
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).
|
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`).
|
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
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).
|
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`).
|
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
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
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.
|
333
|
-
# @return [Array<(nil,
|
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}`). When editing the `title`
|
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}`). When editing the `title`
|
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
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
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.
|
513
|
-
# @return [Array<(ScoreDetails,
|
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
|
558
|
-
|
559
|
-
# List liked scores
|
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
|
569
|
-
|
570
|
-
# List liked scores
|
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)
|
731
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
586
732
|
|
587
|
-
#
|
588
|
-
|
589
|
-
query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
|
733
|
+
# return_type
|
734
|
+
return_type = opts[:debug_return_type] || 'ScoreDetails'
|
590
735
|
|
591
|
-
#
|
592
|
-
|
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'])
|
597
|
-
|
598
|
-
# form parameters
|
599
|
-
form_params = {}
|
736
|
+
# auth_names
|
737
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
600
738
|
|
601
|
-
|
602
|
-
|
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
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
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.
|
691
|
-
# @return [Array<(ScoreDetails,
|
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
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.
|
739
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
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.
|
751
|
-
# @return [Array<(ResourceCollaborator,
|
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
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.
|
802
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
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.
|
813
|
-
# @return [Array<(Array<ResourceCollaborator>,
|
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,7 +1025,7 @@ 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
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.
|
860
1031
|
# @option opts [String] :type Filter the comments by type
|
@@ -863,65 +1034,76 @@ module FlatApi
|
|
863
1034
|
# @return [Array<ScoreComment>]
|
864
1035
|
def get_score_comments(score, opts = {})
|
865
1036
|
data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
|
866
|
-
|
1037
|
+
data
|
867
1038
|
end
|
868
1039
|
|
869
1040
|
# List comments
|
870
1041
|
# This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
|
871
|
-
# @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`).
|
872
1043
|
# @param [Hash] opts the optional parameters
|
873
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.
|
874
1045
|
# @option opts [String] :type Filter the comments by type
|
875
1046
|
# @option opts [String] :sort Sort
|
876
1047
|
# @option opts [String] :direction Sort direction
|
877
|
-
# @return [Array<(Array<ScoreComment>,
|
1048
|
+
# @return [Array<(Array<ScoreComment>, Integer, Hash)>] Array<ScoreComment> data, response status code and response headers
|
878
1049
|
def get_score_comments_with_http_info(score, opts = {})
|
879
1050
|
if @api_client.config.debugging
|
880
|
-
@api_client.config.logger.debug
|
1051
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_comments ...'
|
881
1052
|
end
|
882
1053
|
# verify the required parameter 'score' is set
|
883
1054
|
if @api_client.config.client_side_validation && score.nil?
|
884
1055
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
|
885
1056
|
end
|
886
|
-
|
887
|
-
|
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}"
|
888
1060
|
end
|
889
|
-
|
890
|
-
|
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}"
|
891
1064
|
end
|
892
|
-
|
893
|
-
|
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}"
|
894
1068
|
end
|
895
1069
|
# resource path
|
896
|
-
local_var_path =
|
1070
|
+
local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
897
1071
|
|
898
1072
|
# query parameters
|
899
|
-
query_params = {}
|
1073
|
+
query_params = opts[:query_params] || {}
|
900
1074
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
901
1075
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
902
1076
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
903
1077
|
query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
|
904
1078
|
|
905
1079
|
# header parameters
|
906
|
-
header_params = {}
|
1080
|
+
header_params = opts[:header_params] || {}
|
907
1081
|
# HTTP header 'Accept' (if needed)
|
908
1082
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
909
|
-
# HTTP header 'Content-Type'
|
910
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
911
1083
|
|
912
1084
|
# form parameters
|
913
|
-
form_params = {}
|
1085
|
+
form_params = opts[:form_params] || {}
|
914
1086
|
|
915
1087
|
# http body (model)
|
916
|
-
post_body =
|
917
|
-
|
918
|
-
|
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",
|
919
1098
|
:header_params => header_params,
|
920
1099
|
:query_params => query_params,
|
921
1100
|
:form_params => form_params,
|
922
1101
|
:body => post_body,
|
923
1102
|
:auth_names => auth_names,
|
924
|
-
:return_type =>
|
1103
|
+
:return_type => return_type
|
1104
|
+
)
|
1105
|
+
|
1106
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
925
1107
|
if @api_client.config.debugging
|
926
1108
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
927
1109
|
end
|
@@ -930,26 +1112,26 @@ module FlatApi
|
|
930
1112
|
|
931
1113
|
# Get a score revision
|
932
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.
|
933
|
-
# @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`).
|
934
|
-
# @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.
|
935
1117
|
# @param [Hash] opts the optional parameters
|
936
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.
|
937
1119
|
# @return [ScoreRevision]
|
938
1120
|
def get_score_revision(score, revision, opts = {})
|
939
1121
|
data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
|
940
|
-
|
1122
|
+
data
|
941
1123
|
end
|
942
1124
|
|
943
1125
|
# Get a score revision
|
944
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.
|
945
|
-
# @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`).
|
946
|
-
# @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.
|
947
1129
|
# @param [Hash] opts the optional parameters
|
948
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.
|
949
|
-
# @return [Array<(ScoreRevision,
|
1131
|
+
# @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
|
950
1132
|
def get_score_revision_with_http_info(score, revision, opts = {})
|
951
1133
|
if @api_client.config.debugging
|
952
|
-
@api_client.config.logger.debug
|
1134
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision ...'
|
953
1135
|
end
|
954
1136
|
# verify the required parameter 'score' is set
|
955
1137
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -960,32 +1142,40 @@ module FlatApi
|
|
960
1142
|
fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
|
961
1143
|
end
|
962
1144
|
# resource path
|
963
|
-
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))
|
964
1146
|
|
965
1147
|
# query parameters
|
966
|
-
query_params = {}
|
1148
|
+
query_params = opts[:query_params] || {}
|
967
1149
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
968
1150
|
|
969
1151
|
# header parameters
|
970
|
-
header_params = {}
|
1152
|
+
header_params = opts[:header_params] || {}
|
971
1153
|
# HTTP header 'Accept' (if needed)
|
972
1154
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
973
|
-
# HTTP header 'Content-Type'
|
974
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
975
1155
|
|
976
1156
|
# form parameters
|
977
|
-
form_params = {}
|
1157
|
+
form_params = opts[:form_params] || {}
|
978
1158
|
|
979
1159
|
# http body (model)
|
980
|
-
post_body =
|
981
|
-
|
982
|
-
|
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",
|
983
1170
|
:header_params => header_params,
|
984
1171
|
:query_params => query_params,
|
985
1172
|
:form_params => form_params,
|
986
1173
|
:body => post_body,
|
987
1174
|
:auth_names => auth_names,
|
988
|
-
:return_type =>
|
1175
|
+
:return_type => return_type
|
1176
|
+
)
|
1177
|
+
|
1178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
989
1179
|
if @api_client.config.debugging
|
990
1180
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
991
1181
|
end
|
@@ -993,33 +1183,35 @@ module FlatApi
|
|
993
1183
|
end
|
994
1184
|
|
995
1185
|
# Get a score revision data
|
996
|
-
# 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`,
|
997
|
-
# @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`).
|
998
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
999
|
-
# @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
|
1000
1190
|
# @param [Hash] opts the optional parameters
|
1001
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.
|
1002
|
-
# @option opts [String] :parts An optional a set of parts to be exported. This parameter must be
|
1003
|
-
# @option opts [
|
1004
|
-
# @
|
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]
|
1005
1196
|
def get_score_revision_data(score, revision, format, opts = {})
|
1006
1197
|
data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
|
1007
|
-
|
1198
|
+
data
|
1008
1199
|
end
|
1009
1200
|
|
1010
1201
|
# Get a score revision data
|
1011
|
-
# 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`,
|
1012
|
-
# @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`).
|
1013
|
-
# @param revision Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created.
|
1014
|
-
# @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
|
1015
1206
|
# @param [Hash] opts the optional parameters
|
1016
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.
|
1017
|
-
# @option opts [String] :parts An optional a set of parts to be exported. This parameter must be
|
1018
|
-
# @option opts [
|
1019
|
-
# @
|
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
|
1020
1212
|
def get_score_revision_data_with_http_info(score, revision, format, opts = {})
|
1021
1213
|
if @api_client.config.debugging
|
1022
|
-
@api_client.config.logger.debug
|
1214
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision_data ...'
|
1023
1215
|
end
|
1024
1216
|
# verify the required parameter 'score' is set
|
1025
1217
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1034,38 +1226,48 @@ module FlatApi
|
|
1034
1226
|
fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
|
1035
1227
|
end
|
1036
1228
|
# verify enum value
|
1037
|
-
|
1038
|
-
|
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}"
|
1039
1232
|
end
|
1040
1233
|
# resource path
|
1041
|
-
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))
|
1042
1235
|
|
1043
1236
|
# query parameters
|
1044
|
-
query_params = {}
|
1237
|
+
query_params = opts[:query_params] || {}
|
1045
1238
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1046
1239
|
query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
|
1047
|
-
query_params[:'
|
1240
|
+
query_params[:'defaultTrack'] = opts[:'default_track'] if !opts[:'default_track'].nil?
|
1241
|
+
query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
|
1048
1242
|
|
1049
1243
|
# header parameters
|
1050
|
-
header_params = {}
|
1244
|
+
header_params = opts[:header_params] || {}
|
1051
1245
|
# HTTP header 'Accept' (if needed)
|
1052
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'])
|
1053
|
-
# HTTP header 'Content-Type'
|
1054
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1055
1247
|
|
1056
1248
|
# form parameters
|
1057
|
-
form_params = {}
|
1249
|
+
form_params = opts[:form_params] || {}
|
1058
1250
|
|
1059
1251
|
# http body (model)
|
1060
|
-
post_body =
|
1061
|
-
|
1062
|
-
|
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",
|
1063
1262
|
:header_params => header_params,
|
1064
1263
|
:query_params => query_params,
|
1065
1264
|
:form_params => form_params,
|
1066
1265
|
:body => post_body,
|
1067
1266
|
:auth_names => auth_names,
|
1068
|
-
:return_type =>
|
1267
|
+
:return_type => return_type
|
1268
|
+
)
|
1269
|
+
|
1270
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1069
1271
|
if @api_client.config.debugging
|
1070
1272
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1071
1273
|
end
|
@@ -1074,56 +1276,64 @@ module FlatApi
|
|
1074
1276
|
|
1075
1277
|
# List the revisions
|
1076
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.
|
1077
|
-
# @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`).
|
1078
1280
|
# @param [Hash] opts the optional parameters
|
1079
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.
|
1080
1282
|
# @return [Array<ScoreRevision>]
|
1081
1283
|
def get_score_revisions(score, opts = {})
|
1082
1284
|
data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
|
1083
|
-
|
1285
|
+
data
|
1084
1286
|
end
|
1085
1287
|
|
1086
1288
|
# List the revisions
|
1087
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.
|
1088
|
-
# @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`).
|
1089
1291
|
# @param [Hash] opts the optional parameters
|
1090
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.
|
1091
|
-
# @return [Array<(Array<ScoreRevision>,
|
1293
|
+
# @return [Array<(Array<ScoreRevision>, Integer, Hash)>] Array<ScoreRevision> data, response status code and response headers
|
1092
1294
|
def get_score_revisions_with_http_info(score, opts = {})
|
1093
1295
|
if @api_client.config.debugging
|
1094
|
-
@api_client.config.logger.debug
|
1296
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revisions ...'
|
1095
1297
|
end
|
1096
1298
|
# verify the required parameter 'score' is set
|
1097
1299
|
if @api_client.config.client_side_validation && score.nil?
|
1098
1300
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
|
1099
1301
|
end
|
1100
1302
|
# resource path
|
1101
|
-
local_var_path =
|
1303
|
+
local_var_path = '/scores/{score}/revisions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1102
1304
|
|
1103
1305
|
# query parameters
|
1104
|
-
query_params = {}
|
1306
|
+
query_params = opts[:query_params] || {}
|
1105
1307
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1106
1308
|
|
1107
1309
|
# header parameters
|
1108
|
-
header_params = {}
|
1310
|
+
header_params = opts[:header_params] || {}
|
1109
1311
|
# HTTP header 'Accept' (if needed)
|
1110
1312
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1111
|
-
# HTTP header 'Content-Type'
|
1112
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1113
1313
|
|
1114
1314
|
# form parameters
|
1115
|
-
form_params = {}
|
1315
|
+
form_params = opts[:form_params] || {}
|
1116
1316
|
|
1117
1317
|
# http body (model)
|
1118
|
-
post_body =
|
1119
|
-
|
1120
|
-
|
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",
|
1121
1328
|
:header_params => header_params,
|
1122
1329
|
:query_params => query_params,
|
1123
1330
|
:form_params => form_params,
|
1124
1331
|
:body => post_body,
|
1125
1332
|
:auth_names => auth_names,
|
1126
|
-
:return_type =>
|
1333
|
+
:return_type => return_type
|
1334
|
+
)
|
1335
|
+
|
1336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1127
1337
|
if @api_client.config.debugging
|
1128
1338
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1129
1339
|
end
|
@@ -1132,53 +1342,61 @@ module FlatApi
|
|
1132
1342
|
|
1133
1343
|
# List submissions related to the score
|
1134
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.
|
1135
|
-
# @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`).
|
1136
1346
|
# @param [Hash] opts the optional parameters
|
1137
1347
|
# @return [Array<AssignmentSubmission>]
|
1138
1348
|
def get_score_submissions(score, opts = {})
|
1139
1349
|
data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
|
1140
|
-
|
1350
|
+
data
|
1141
1351
|
end
|
1142
1352
|
|
1143
1353
|
# List submissions related to the score
|
1144
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.
|
1145
|
-
# @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`).
|
1146
1356
|
# @param [Hash] opts the optional parameters
|
1147
|
-
# @return [Array<(Array<AssignmentSubmission>,
|
1357
|
+
# @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
|
1148
1358
|
def get_score_submissions_with_http_info(score, opts = {})
|
1149
1359
|
if @api_client.config.debugging
|
1150
|
-
@api_client.config.logger.debug
|
1360
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_submissions ...'
|
1151
1361
|
end
|
1152
1362
|
# verify the required parameter 'score' is set
|
1153
1363
|
if @api_client.config.client_side_validation && score.nil?
|
1154
1364
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
|
1155
1365
|
end
|
1156
1366
|
# resource path
|
1157
|
-
local_var_path =
|
1367
|
+
local_var_path = '/scores/{score}/submissions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1158
1368
|
|
1159
1369
|
# query parameters
|
1160
|
-
query_params = {}
|
1370
|
+
query_params = opts[:query_params] || {}
|
1161
1371
|
|
1162
1372
|
# header parameters
|
1163
|
-
header_params = {}
|
1373
|
+
header_params = opts[:header_params] || {}
|
1164
1374
|
# HTTP header 'Accept' (if needed)
|
1165
1375
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1166
|
-
# HTTP header 'Content-Type'
|
1167
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1168
1376
|
|
1169
1377
|
# form parameters
|
1170
|
-
form_params = {}
|
1378
|
+
form_params = opts[:form_params] || {}
|
1171
1379
|
|
1172
1380
|
# http body (model)
|
1173
|
-
post_body =
|
1174
|
-
|
1175
|
-
|
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",
|
1176
1391
|
:header_params => header_params,
|
1177
1392
|
:query_params => query_params,
|
1178
1393
|
:form_params => form_params,
|
1179
1394
|
:body => post_body,
|
1180
1395
|
:auth_names => auth_names,
|
1181
|
-
:return_type =>
|
1396
|
+
:return_type => return_type
|
1397
|
+
)
|
1398
|
+
|
1399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1182
1400
|
if @api_client.config.debugging
|
1183
1401
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1184
1402
|
end
|
@@ -1186,27 +1404,25 @@ module FlatApi
|
|
1186
1404
|
end
|
1187
1405
|
|
1188
1406
|
# Retrieve the details of an audio or video track linked to a score
|
1189
|
-
#
|
1190
|
-
# @param
|
1191
|
-
# @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
|
1192
1409
|
# @param [Hash] opts the optional parameters
|
1193
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.
|
1194
1411
|
# @return [ScoreTrack]
|
1195
1412
|
def get_score_track(score, track, opts = {})
|
1196
1413
|
data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
|
1197
|
-
|
1414
|
+
data
|
1198
1415
|
end
|
1199
1416
|
|
1200
1417
|
# Retrieve the details of an audio or video track linked to a score
|
1201
|
-
#
|
1202
|
-
# @param
|
1203
|
-
# @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
|
1204
1420
|
# @param [Hash] opts the optional parameters
|
1205
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.
|
1206
|
-
# @return [Array<(ScoreTrack,
|
1422
|
+
# @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
|
1207
1423
|
def get_score_track_with_http_info(score, track, opts = {})
|
1208
1424
|
if @api_client.config.debugging
|
1209
|
-
@api_client.config.logger.debug
|
1425
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_score_track ...'
|
1210
1426
|
end
|
1211
1427
|
# verify the required parameter 'score' is set
|
1212
1428
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1217,90 +1433,187 @@ module FlatApi
|
|
1217
1433
|
fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
|
1218
1434
|
end
|
1219
1435
|
# resource path
|
1220
|
-
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))
|
1221
1437
|
|
1222
1438
|
# query parameters
|
1223
|
-
query_params = {}
|
1439
|
+
query_params = opts[:query_params] || {}
|
1224
1440
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1225
1441
|
|
1226
1442
|
# header parameters
|
1227
|
-
header_params = {}
|
1443
|
+
header_params = opts[:header_params] || {}
|
1228
1444
|
# HTTP header 'Accept' (if needed)
|
1229
1445
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1230
|
-
# HTTP header 'Content-Type'
|
1231
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1232
1446
|
|
1233
1447
|
# form parameters
|
1234
|
-
form_params = {}
|
1448
|
+
form_params = opts[:form_params] || {}
|
1235
1449
|
|
1236
1450
|
# http body (model)
|
1237
|
-
post_body =
|
1238
|
-
|
1239
|
-
|
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",
|
1240
1461
|
:header_params => header_params,
|
1241
1462
|
:query_params => query_params,
|
1242
1463
|
:form_params => form_params,
|
1243
1464
|
:body => post_body,
|
1244
1465
|
:auth_names => auth_names,
|
1245
|
-
:return_type =>
|
1466
|
+
:return_type => return_type
|
1467
|
+
)
|
1468
|
+
|
1469
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1246
1470
|
if @api_client.config.debugging
|
1247
1471
|
@api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1248
1472
|
end
|
1249
1473
|
return data, status_code, headers
|
1250
1474
|
end
|
1251
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
|
+
|
1252
1557
|
# List user's scores
|
1253
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.
|
1254
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1559
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1255
1560
|
# @param [Hash] opts the optional parameters
|
1256
1561
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
1257
1562
|
# @return [Array<ScoreDetails>]
|
1258
1563
|
def get_user_scores(user, opts = {})
|
1259
1564
|
data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
|
1260
|
-
|
1565
|
+
data
|
1261
1566
|
end
|
1262
1567
|
|
1263
1568
|
# List user's scores
|
1264
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.
|
1265
|
-
# @param user Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1570
|
+
# @param user [String] Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user.
|
1266
1571
|
# @param [Hash] opts the optional parameters
|
1267
1572
|
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
1268
|
-
# @return [Array<(Array<ScoreDetails>,
|
1573
|
+
# @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
1269
1574
|
def get_user_scores_with_http_info(user, opts = {})
|
1270
1575
|
if @api_client.config.debugging
|
1271
|
-
@api_client.config.logger.debug
|
1576
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.get_user_scores ...'
|
1272
1577
|
end
|
1273
1578
|
# verify the required parameter 'user' is set
|
1274
1579
|
if @api_client.config.client_side_validation && user.nil?
|
1275
1580
|
fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
|
1276
1581
|
end
|
1277
1582
|
# resource path
|
1278
|
-
local_var_path =
|
1583
|
+
local_var_path = '/users/{user}/scores'.sub('{' + 'user' + '}', CGI.escape(user.to_s))
|
1279
1584
|
|
1280
1585
|
# query parameters
|
1281
|
-
query_params = {}
|
1586
|
+
query_params = opts[:query_params] || {}
|
1282
1587
|
query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
|
1283
1588
|
|
1284
1589
|
# header parameters
|
1285
|
-
header_params = {}
|
1590
|
+
header_params = opts[:header_params] || {}
|
1286
1591
|
# HTTP header 'Accept' (if needed)
|
1287
1592
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1288
|
-
# HTTP header 'Content-Type'
|
1289
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1290
1593
|
|
1291
1594
|
# form parameters
|
1292
|
-
form_params = {}
|
1595
|
+
form_params = opts[:form_params] || {}
|
1293
1596
|
|
1294
1597
|
# http body (model)
|
1295
|
-
post_body =
|
1296
|
-
|
1297
|
-
|
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",
|
1298
1608
|
:header_params => header_params,
|
1299
1609
|
:query_params => query_params,
|
1300
1610
|
:form_params => form_params,
|
1301
1611
|
:body => post_body,
|
1302
1612
|
:auth_names => auth_names,
|
1303
|
-
:return_type =>
|
1613
|
+
:return_type => return_type
|
1614
|
+
)
|
1615
|
+
|
1616
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1304
1617
|
if @api_client.config.debugging
|
1305
1618
|
@api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1306
1619
|
end
|
@@ -1308,57 +1621,69 @@ module FlatApi
|
|
1308
1621
|
end
|
1309
1622
|
|
1310
1623
|
# List the audio or video tracks linked to a score
|
1311
|
-
#
|
1312
|
-
# @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`).
|
1313
1625
|
# @param [Hash] opts the optional parameters
|
1314
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
|
1315
1629
|
# @return [Array<ScoreTrack>]
|
1316
1630
|
def list_score_tracks(score, opts = {})
|
1317
1631
|
data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
|
1318
|
-
|
1632
|
+
data
|
1319
1633
|
end
|
1320
1634
|
|
1321
1635
|
# List the audio or video tracks linked to a score
|
1322
|
-
#
|
1323
|
-
# @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`).
|
1324
1637
|
# @param [Hash] opts the optional parameters
|
1325
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.
|
1326
|
-
# @
|
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
|
1327
1642
|
def list_score_tracks_with_http_info(score, opts = {})
|
1328
1643
|
if @api_client.config.debugging
|
1329
|
-
@api_client.config.logger.debug
|
1644
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.list_score_tracks ...'
|
1330
1645
|
end
|
1331
1646
|
# verify the required parameter 'score' is set
|
1332
1647
|
if @api_client.config.client_side_validation && score.nil?
|
1333
1648
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
|
1334
1649
|
end
|
1335
1650
|
# resource path
|
1336
|
-
local_var_path =
|
1651
|
+
local_var_path = '/scores/{score}/tracks'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1337
1652
|
|
1338
1653
|
# query parameters
|
1339
|
-
query_params = {}
|
1654
|
+
query_params = opts[:query_params] || {}
|
1340
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?
|
1341
1658
|
|
1342
1659
|
# header parameters
|
1343
|
-
header_params = {}
|
1660
|
+
header_params = opts[:header_params] || {}
|
1344
1661
|
# HTTP header 'Accept' (if needed)
|
1345
1662
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1346
|
-
# HTTP header 'Content-Type'
|
1347
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1348
1663
|
|
1349
1664
|
# form parameters
|
1350
|
-
form_params = {}
|
1665
|
+
form_params = opts[:form_params] || {}
|
1351
1666
|
|
1352
1667
|
# http body (model)
|
1353
|
-
post_body =
|
1354
|
-
|
1355
|
-
|
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",
|
1356
1678
|
:header_params => header_params,
|
1357
1679
|
:query_params => query_params,
|
1358
1680
|
:form_params => form_params,
|
1359
1681
|
:body => post_body,
|
1360
1682
|
:auth_names => auth_names,
|
1361
|
-
:return_type =>
|
1683
|
+
:return_type => return_type
|
1684
|
+
)
|
1685
|
+
|
1686
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1362
1687
|
if @api_client.config.debugging
|
1363
1688
|
@api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1364
1689
|
end
|
@@ -1366,27 +1691,25 @@ module FlatApi
|
|
1366
1691
|
end
|
1367
1692
|
|
1368
1693
|
# Mark the comment as resolved
|
1369
|
-
#
|
1370
|
-
# @param
|
1371
|
-
# @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
|
1372
1696
|
# @param [Hash] opts the optional parameters
|
1373
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.
|
1374
1698
|
# @return [nil]
|
1375
1699
|
def mark_score_comment_resolved(score, comment, opts = {})
|
1376
1700
|
mark_score_comment_resolved_with_http_info(score, comment, opts)
|
1377
|
-
|
1701
|
+
nil
|
1378
1702
|
end
|
1379
1703
|
|
1380
1704
|
# Mark the comment as resolved
|
1381
|
-
#
|
1382
|
-
# @param
|
1383
|
-
# @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
|
1384
1707
|
# @param [Hash] opts the optional parameters
|
1385
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.
|
1386
|
-
# @return [Array<(nil,
|
1709
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1387
1710
|
def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
|
1388
1711
|
if @api_client.config.debugging
|
1389
|
-
@api_client.config.logger.debug
|
1712
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_resolved ...'
|
1390
1713
|
end
|
1391
1714
|
# verify the required parameter 'score' is set
|
1392
1715
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1397,31 +1720,40 @@ module FlatApi
|
|
1397
1720
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
|
1398
1721
|
end
|
1399
1722
|
# resource path
|
1400
|
-
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))
|
1401
1724
|
|
1402
1725
|
# query parameters
|
1403
|
-
query_params = {}
|
1726
|
+
query_params = opts[:query_params] || {}
|
1404
1727
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1405
1728
|
|
1406
1729
|
# header parameters
|
1407
|
-
header_params = {}
|
1730
|
+
header_params = opts[:header_params] || {}
|
1408
1731
|
# HTTP header 'Accept' (if needed)
|
1409
1732
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1410
|
-
# HTTP header 'Content-Type'
|
1411
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1412
1733
|
|
1413
1734
|
# form parameters
|
1414
|
-
form_params = {}
|
1735
|
+
form_params = opts[:form_params] || {}
|
1415
1736
|
|
1416
1737
|
# http body (model)
|
1417
|
-
post_body =
|
1418
|
-
|
1419
|
-
|
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",
|
1420
1748
|
:header_params => header_params,
|
1421
1749
|
:query_params => query_params,
|
1422
1750
|
:form_params => form_params,
|
1423
1751
|
:body => post_body,
|
1424
|
-
: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)
|
1425
1757
|
if @api_client.config.debugging
|
1426
1758
|
@api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1427
1759
|
end
|
@@ -1429,27 +1761,25 @@ module FlatApi
|
|
1429
1761
|
end
|
1430
1762
|
|
1431
1763
|
# Mark the comment as unresolved
|
1432
|
-
#
|
1433
|
-
# @param
|
1434
|
-
# @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
|
1435
1766
|
# @param [Hash] opts the optional parameters
|
1436
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.
|
1437
1768
|
# @return [nil]
|
1438
1769
|
def mark_score_comment_unresolved(score, comment, opts = {})
|
1439
1770
|
mark_score_comment_unresolved_with_http_info(score, comment, opts)
|
1440
|
-
|
1771
|
+
nil
|
1441
1772
|
end
|
1442
1773
|
|
1443
1774
|
# Mark the comment as unresolved
|
1444
|
-
#
|
1445
|
-
# @param
|
1446
|
-
# @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
|
1447
1777
|
# @param [Hash] opts the optional parameters
|
1448
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.
|
1449
|
-
# @return [Array<(nil,
|
1779
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1450
1780
|
def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
|
1451
1781
|
if @api_client.config.debugging
|
1452
|
-
@api_client.config.logger.debug
|
1782
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_unresolved ...'
|
1453
1783
|
end
|
1454
1784
|
# verify the required parameter 'score' is set
|
1455
1785
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1460,31 +1790,40 @@ module FlatApi
|
|
1460
1790
|
fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
|
1461
1791
|
end
|
1462
1792
|
# resource path
|
1463
|
-
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))
|
1464
1794
|
|
1465
1795
|
# query parameters
|
1466
|
-
query_params = {}
|
1796
|
+
query_params = opts[:query_params] || {}
|
1467
1797
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1468
1798
|
|
1469
1799
|
# header parameters
|
1470
|
-
header_params = {}
|
1800
|
+
header_params = opts[:header_params] || {}
|
1471
1801
|
# HTTP header 'Accept' (if needed)
|
1472
1802
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1473
|
-
# HTTP header 'Content-Type'
|
1474
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1475
1803
|
|
1476
1804
|
# form parameters
|
1477
|
-
form_params = {}
|
1805
|
+
form_params = opts[:form_params] || {}
|
1478
1806
|
|
1479
1807
|
# http body (model)
|
1480
|
-
post_body =
|
1481
|
-
|
1482
|
-
|
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",
|
1483
1818
|
:header_params => header_params,
|
1484
1819
|
:query_params => query_params,
|
1485
1820
|
:form_params => form_params,
|
1486
1821
|
:body => post_body,
|
1487
|
-
: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)
|
1488
1827
|
if @api_client.config.debugging
|
1489
1828
|
@api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1490
1829
|
end
|
@@ -1493,26 +1832,26 @@ module FlatApi
|
|
1493
1832
|
|
1494
1833
|
# Post a new comment
|
1495
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`.
|
1496
|
-
# @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`).
|
1497
|
-
# @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]
|
1498
1837
|
# @param [Hash] opts the optional parameters
|
1499
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.
|
1500
1839
|
# @return [ScoreComment]
|
1501
1840
|
def post_score_comment(score, body, opts = {})
|
1502
1841
|
data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
|
1503
|
-
|
1842
|
+
data
|
1504
1843
|
end
|
1505
1844
|
|
1506
1845
|
# Post a new comment
|
1507
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`.
|
1508
|
-
# @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`).
|
1509
|
-
# @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]
|
1510
1849
|
# @param [Hash] opts the optional parameters
|
1511
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.
|
1512
|
-
# @return [Array<(ScoreComment,
|
1851
|
+
# @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
|
1513
1852
|
def post_score_comment_with_http_info(score, body, opts = {})
|
1514
1853
|
if @api_client.config.debugging
|
1515
|
-
@api_client.config.logger.debug
|
1854
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.post_score_comment ...'
|
1516
1855
|
end
|
1517
1856
|
# verify the required parameter 'score' is set
|
1518
1857
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1523,32 +1862,45 @@ module FlatApi
|
|
1523
1862
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
|
1524
1863
|
end
|
1525
1864
|
# resource path
|
1526
|
-
local_var_path =
|
1865
|
+
local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1527
1866
|
|
1528
1867
|
# query parameters
|
1529
|
-
query_params = {}
|
1868
|
+
query_params = opts[:query_params] || {}
|
1530
1869
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1531
1870
|
|
1532
1871
|
# header parameters
|
1533
|
-
header_params = {}
|
1872
|
+
header_params = opts[:header_params] || {}
|
1534
1873
|
# HTTP header 'Accept' (if needed)
|
1535
1874
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1536
1875
|
# HTTP header 'Content-Type'
|
1537
|
-
|
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
|
1538
1880
|
|
1539
1881
|
# form parameters
|
1540
|
-
form_params = {}
|
1882
|
+
form_params = opts[:form_params] || {}
|
1541
1883
|
|
1542
1884
|
# http body (model)
|
1543
|
-
post_body = @api_client.object_to_http_body(body)
|
1544
|
-
|
1545
|
-
|
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",
|
1546
1895
|
:header_params => header_params,
|
1547
1896
|
:query_params => query_params,
|
1548
1897
|
:form_params => form_params,
|
1549
1898
|
:body => post_body,
|
1550
1899
|
:auth_names => auth_names,
|
1551
|
-
:return_type =>
|
1900
|
+
:return_type => return_type
|
1901
|
+
)
|
1902
|
+
|
1903
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1552
1904
|
if @api_client.config.debugging
|
1553
1905
|
@api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1554
1906
|
end
|
@@ -1557,24 +1909,24 @@ module FlatApi
|
|
1557
1909
|
|
1558
1910
|
# Delete a collaborator
|
1559
1911
|
# Remove the specified collaborator from the score
|
1560
|
-
# @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`).
|
1561
|
-
# @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**
|
1562
1914
|
# @param [Hash] opts the optional parameters
|
1563
1915
|
# @return [nil]
|
1564
1916
|
def remove_score_collaborator(score, collaborator, opts = {})
|
1565
1917
|
remove_score_collaborator_with_http_info(score, collaborator, opts)
|
1566
|
-
|
1918
|
+
nil
|
1567
1919
|
end
|
1568
1920
|
|
1569
1921
|
# Delete a collaborator
|
1570
1922
|
# Remove the specified collaborator from the score
|
1571
|
-
# @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`).
|
1572
|
-
# @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**
|
1573
1925
|
# @param [Hash] opts the optional parameters
|
1574
|
-
# @return [Array<(nil,
|
1926
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1575
1927
|
def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
|
1576
1928
|
if @api_client.config.debugging
|
1577
|
-
@api_client.config.logger.debug
|
1929
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.remove_score_collaborator ...'
|
1578
1930
|
end
|
1579
1931
|
# verify the required parameter 'score' is set
|
1580
1932
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1585,30 +1937,39 @@ module FlatApi
|
|
1585
1937
|
fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
|
1586
1938
|
end
|
1587
1939
|
# resource path
|
1588
|
-
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))
|
1589
1941
|
|
1590
1942
|
# query parameters
|
1591
|
-
query_params = {}
|
1943
|
+
query_params = opts[:query_params] || {}
|
1592
1944
|
|
1593
1945
|
# header parameters
|
1594
|
-
header_params = {}
|
1946
|
+
header_params = opts[:header_params] || {}
|
1595
1947
|
# HTTP header 'Accept' (if needed)
|
1596
1948
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1597
|
-
# HTTP header 'Content-Type'
|
1598
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1599
1949
|
|
1600
1950
|
# form parameters
|
1601
|
-
form_params = {}
|
1951
|
+
form_params = opts[:form_params] || {}
|
1602
1952
|
|
1603
1953
|
# http body (model)
|
1604
|
-
post_body =
|
1605
|
-
|
1606
|
-
|
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",
|
1607
1964
|
:header_params => header_params,
|
1608
1965
|
:query_params => query_params,
|
1609
1966
|
:form_params => form_params,
|
1610
1967
|
:body => post_body,
|
1611
|
-
: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)
|
1612
1973
|
if @api_client.config.debugging
|
1613
1974
|
@api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1614
1975
|
end
|
@@ -1617,52 +1978,61 @@ module FlatApi
|
|
1617
1978
|
|
1618
1979
|
# Untrash a score
|
1619
1980
|
# This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
|
1620
|
-
# @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`).
|
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`).
|
1621
1982
|
# @param [Hash] opts the optional parameters
|
1622
1983
|
# @return [nil]
|
1623
1984
|
def untrash_score(score, opts = {})
|
1624
1985
|
untrash_score_with_http_info(score, opts)
|
1625
|
-
|
1986
|
+
nil
|
1626
1987
|
end
|
1627
1988
|
|
1628
1989
|
# Untrash a score
|
1629
1990
|
# This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
|
1630
|
-
# @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`).
|
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`).
|
1631
1992
|
# @param [Hash] opts the optional parameters
|
1632
|
-
# @return [Array<(nil,
|
1993
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1633
1994
|
def untrash_score_with_http_info(score, opts = {})
|
1634
1995
|
if @api_client.config.debugging
|
1635
|
-
@api_client.config.logger.debug
|
1996
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.untrash_score ...'
|
1636
1997
|
end
|
1637
1998
|
# verify the required parameter 'score' is set
|
1638
1999
|
if @api_client.config.client_side_validation && score.nil?
|
1639
2000
|
fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
|
1640
2001
|
end
|
1641
2002
|
# resource path
|
1642
|
-
local_var_path =
|
2003
|
+
local_var_path = '/scores/{score}/untrash'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
|
1643
2004
|
|
1644
2005
|
# query parameters
|
1645
|
-
query_params = {}
|
2006
|
+
query_params = opts[:query_params] || {}
|
1646
2007
|
|
1647
2008
|
# header parameters
|
1648
|
-
header_params = {}
|
2009
|
+
header_params = opts[:header_params] || {}
|
1649
2010
|
# HTTP header 'Accept' (if needed)
|
1650
2011
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1651
|
-
# HTTP header 'Content-Type'
|
1652
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1653
2012
|
|
1654
2013
|
# form parameters
|
1655
|
-
form_params = {}
|
2014
|
+
form_params = opts[:form_params] || {}
|
1656
2015
|
|
1657
2016
|
# http body (model)
|
1658
|
-
post_body =
|
1659
|
-
|
1660
|
-
|
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",
|
1661
2027
|
:header_params => header_params,
|
1662
2028
|
:query_params => query_params,
|
1663
2029
|
:form_params => form_params,
|
1664
2030
|
:body => post_body,
|
1665
|
-
:auth_names => auth_names
|
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)
|
1666
2036
|
if @api_client.config.debugging
|
1667
2037
|
@api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1668
2038
|
end
|
@@ -1670,29 +2040,27 @@ module FlatApi
|
|
1670
2040
|
end
|
1671
2041
|
|
1672
2042
|
# Update an existing comment
|
1673
|
-
#
|
1674
|
-
# @param
|
1675
|
-
# @param
|
1676
|
-
# @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]
|
1677
2046
|
# @param [Hash] opts the optional parameters
|
1678
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.
|
1679
2048
|
# @return [ScoreComment]
|
1680
2049
|
def update_score_comment(score, comment, body, opts = {})
|
1681
2050
|
data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
|
1682
|
-
|
2051
|
+
data
|
1683
2052
|
end
|
1684
2053
|
|
1685
2054
|
# Update an existing comment
|
1686
|
-
#
|
1687
|
-
# @param
|
1688
|
-
# @param
|
1689
|
-
# @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]
|
1690
2058
|
# @param [Hash] opts the optional parameters
|
1691
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.
|
1692
|
-
# @return [Array<(ScoreComment,
|
2060
|
+
# @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
|
1693
2061
|
def update_score_comment_with_http_info(score, comment, body, opts = {})
|
1694
2062
|
if @api_client.config.debugging
|
1695
|
-
@api_client.config.logger.debug
|
2063
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.update_score_comment ...'
|
1696
2064
|
end
|
1697
2065
|
# verify the required parameter 'score' is set
|
1698
2066
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1707,32 +2075,45 @@ module FlatApi
|
|
1707
2075
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
|
1708
2076
|
end
|
1709
2077
|
# resource path
|
1710
|
-
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))
|
1711
2079
|
|
1712
2080
|
# query parameters
|
1713
|
-
query_params = {}
|
2081
|
+
query_params = opts[:query_params] || {}
|
1714
2082
|
query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
|
1715
2083
|
|
1716
2084
|
# header parameters
|
1717
|
-
header_params = {}
|
2085
|
+
header_params = opts[:header_params] || {}
|
1718
2086
|
# HTTP header 'Accept' (if needed)
|
1719
2087
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1720
2088
|
# HTTP header 'Content-Type'
|
1721
|
-
|
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
|
1722
2093
|
|
1723
2094
|
# form parameters
|
1724
|
-
form_params = {}
|
2095
|
+
form_params = opts[:form_params] || {}
|
1725
2096
|
|
1726
2097
|
# http body (model)
|
1727
|
-
post_body = @api_client.object_to_http_body(body)
|
1728
|
-
|
1729
|
-
|
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",
|
1730
2108
|
:header_params => header_params,
|
1731
2109
|
:query_params => query_params,
|
1732
2110
|
:form_params => form_params,
|
1733
2111
|
:body => post_body,
|
1734
2112
|
:auth_names => auth_names,
|
1735
|
-
:return_type =>
|
2113
|
+
:return_type => return_type
|
2114
|
+
)
|
2115
|
+
|
2116
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1736
2117
|
if @api_client.config.debugging
|
1737
2118
|
@api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1738
2119
|
end
|
@@ -1740,27 +2121,25 @@ module FlatApi
|
|
1740
2121
|
end
|
1741
2122
|
|
1742
2123
|
# Update an audio or video track linked to a score
|
1743
|
-
#
|
1744
|
-
# @param
|
1745
|
-
# @param
|
1746
|
-
# @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]
|
1747
2127
|
# @param [Hash] opts the optional parameters
|
1748
2128
|
# @return [ScoreTrack]
|
1749
2129
|
def update_score_track(score, track, body, opts = {})
|
1750
2130
|
data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
|
1751
|
-
|
2131
|
+
data
|
1752
2132
|
end
|
1753
2133
|
|
1754
2134
|
# Update an audio or video track linked to a score
|
1755
|
-
#
|
1756
|
-
# @param
|
1757
|
-
# @param
|
1758
|
-
# @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]
|
1759
2138
|
# @param [Hash] opts the optional parameters
|
1760
|
-
# @return [Array<(ScoreTrack,
|
2139
|
+
# @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
|
1761
2140
|
def update_score_track_with_http_info(score, track, body, opts = {})
|
1762
2141
|
if @api_client.config.debugging
|
1763
|
-
@api_client.config.logger.debug
|
2142
|
+
@api_client.config.logger.debug 'Calling API: ScoreApi.update_score_track ...'
|
1764
2143
|
end
|
1765
2144
|
# verify the required parameter 'score' is set
|
1766
2145
|
if @api_client.config.client_side_validation && score.nil?
|
@@ -1775,31 +2154,44 @@ module FlatApi
|
|
1775
2154
|
fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
|
1776
2155
|
end
|
1777
2156
|
# resource path
|
1778
|
-
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))
|
1779
2158
|
|
1780
2159
|
# query parameters
|
1781
|
-
query_params = {}
|
2160
|
+
query_params = opts[:query_params] || {}
|
1782
2161
|
|
1783
2162
|
# header parameters
|
1784
|
-
header_params = {}
|
2163
|
+
header_params = opts[:header_params] || {}
|
1785
2164
|
# HTTP header 'Accept' (if needed)
|
1786
2165
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1787
2166
|
# HTTP header 'Content-Type'
|
1788
|
-
|
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
|
1789
2171
|
|
1790
2172
|
# form parameters
|
1791
|
-
form_params = {}
|
2173
|
+
form_params = opts[:form_params] || {}
|
1792
2174
|
|
1793
2175
|
# http body (model)
|
1794
|
-
post_body = @api_client.object_to_http_body(body)
|
1795
|
-
|
1796
|
-
|
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",
|
1797
2186
|
:header_params => header_params,
|
1798
2187
|
:query_params => query_params,
|
1799
2188
|
:form_params => form_params,
|
1800
2189
|
:body => post_body,
|
1801
2190
|
:auth_names => auth_names,
|
1802
|
-
:return_type =>
|
2191
|
+
:return_type => return_type
|
2192
|
+
)
|
2193
|
+
|
2194
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1803
2195
|
if @api_client.config.debugging
|
1804
2196
|
@api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1805
2197
|
end
|