flat_api 0.3.5 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +69 -0
- data/LICENSE +201 -0
- data/README.md +92 -0
- data/lib/flat_api/api/account_api.rb +4 -4
- data/lib/flat_api/api/class_api.rb +281 -63
- data/lib/flat_api/api/collection_api.rb +63 -50
- data/lib/flat_api/api/edu_resources_api.rb +38 -26
- data/lib/flat_api/api/group_api.rb +432 -9
- data/lib/flat_api/api/omr_api.rb +894 -0
- data/lib/flat_api/api/organization_api.rb +307 -35
- data/lib/flat_api/api/score_api.rb +129 -80
- data/lib/flat_api/api/task_api.rb +5 -5
- data/lib/flat_api/api/user_api.rb +45 -14
- data/lib/flat_api/api_client.rb +169 -96
- data/lib/flat_api/api_error.rb +3 -3
- data/lib/flat_api/api_model_base.rb +88 -0
- data/lib/flat_api/client.rb +69 -0
- data/lib/flat_api/configuration.rb +124 -25
- data/lib/flat_api/errors.rb +86 -0
- data/lib/flat_api/models/add_group_user200_response.rb +148 -0
- data/lib/flat_api/models/add_group_user_request.rb +165 -0
- data/lib/flat_api/models/api_access_token.rb +13 -80
- data/lib/flat_api/models/app_scopes.rb +6 -4
- data/lib/flat_api/models/assignment.rb +190 -85
- data/lib/flat_api/models/assignment_capabilities.rb +53 -80
- data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +33 -80
- data/lib/flat_api/models/assignment_copy.rb +5 -6
- data/lib/flat_api/models/assignment_copy_response.rb +187 -82
- data/lib/flat_api/models/assignment_copy_to_class.rb +23 -80
- data/lib/flat_api/models/assignment_copy_to_resource_library.rb +23 -80
- data/lib/flat_api/models/assignment_group.rb +232 -0
- data/lib/flat_api/models/assignment_submission.rb +104 -81
- data/lib/flat_api/models/assignment_submission_comment.rb +13 -80
- data/lib/flat_api/models/assignment_submission_comment_creation.rb +23 -80
- data/lib/flat_api/models/assignment_submission_comments.rb +13 -80
- data/lib/flat_api/models/assignment_submission_history.rb +33 -80
- data/lib/flat_api/models/assignment_submission_history_attachment.rb +13 -80
- data/lib/flat_api/models/assignment_submission_history_state.rb +3 -3
- data/lib/flat_api/models/assignment_submission_lti.rb +64 -86
- data/lib/flat_api/models/{assignment_submission_playback_inner.rb → assignment_submission_playback.rb} +36 -83
- data/lib/flat_api/models/assignment_submission_state.rb +3 -3
- data/lib/flat_api/models/assignment_submission_students_mode.rb +40 -0
- data/lib/flat_api/models/assignment_submission_update.rb +25 -81
- data/lib/flat_api/models/assignment_type.rb +5 -4
- data/lib/flat_api/models/assignment_update.rb +218 -87
- data/lib/flat_api/models/class_assignment.rb +219 -82
- data/lib/flat_api/models/class_assignment_all_of_canvas.rb +13 -80
- data/lib/flat_api/models/class_assignment_all_of_lti.rb +13 -80
- data/lib/flat_api/models/class_assignment_all_of_mfc.rb +13 -80
- data/lib/flat_api/models/class_assignment_update.rb +237 -94
- data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +13 -80
- data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +13 -80
- data/lib/flat_api/models/class_attachment_creation.rb +51 -86
- data/lib/flat_api/models/class_creation.rb +13 -80
- data/lib/flat_api/models/class_details.rb +85 -81
- data/lib/flat_api/models/class_details_canvas.rb +13 -80
- data/lib/flat_api/models/class_details_clever.rb +13 -80
- data/lib/flat_api/models/class_details_google_classroom.rb +13 -80
- data/lib/flat_api/models/class_details_google_drive.rb +13 -80
- data/lib/flat_api/models/class_details_issues.rb +13 -80
- data/lib/flat_api/models/class_details_issues_sync_inner.rb +15 -82
- data/lib/flat_api/models/class_details_lti.rb +28 -85
- data/lib/flat_api/models/class_details_mfc.rb +13 -80
- data/lib/flat_api/models/class_details_microsoft_graph.rb +13 -80
- data/lib/flat_api/models/class_grade_level.rb +3 -3
- data/lib/flat_api/models/class_roles.rb +3 -3
- data/lib/flat_api/models/class_state.rb +5 -4
- data/lib/flat_api/models/class_update.rb +13 -80
- data/lib/flat_api/models/collection.rb +182 -81
- data/lib/flat_api/models/collection_app.rb +13 -80
- data/lib/flat_api/models/collection_capabilities.rb +63 -80
- data/lib/flat_api/models/collection_contents.rb +166 -0
- data/lib/flat_api/models/collection_creation.rb +20 -99
- data/lib/flat_api/models/collection_modification.rb +17 -82
- data/lib/flat_api/models/collection_privacy.rb +3 -3
- data/lib/flat_api/models/collection_type.rb +7 -6
- data/lib/flat_api/models/credit_transaction.rb +388 -0
- data/lib/flat_api/models/edu_library.rb +63 -82
- data/lib/flat_api/models/edu_resource.rb +101 -84
- data/lib/flat_api/models/edu_resource_assignment_creation.rb +170 -0
- data/lib/flat_api/models/edu_resource_capabilities.rb +27 -84
- data/lib/flat_api/models/edu_resource_copy.rb +23 -80
- data/lib/flat_api/models/edu_resource_creation.rb +96 -86
- data/lib/flat_api/models/edu_resource_folder.rb +39 -84
- data/lib/flat_api/models/edu_resource_lti_link.rb +23 -80
- data/lib/flat_api/models/edu_resource_move.rb +23 -80
- data/lib/flat_api/models/edu_resource_privacy.rb +3 -3
- data/lib/flat_api/models/edu_resource_resource.rb +5 -6
- data/lib/flat_api/models/edu_resource_type.rb +3 -3
- data/lib/flat_api/models/edu_resource_update.rb +101 -86
- data/lib/flat_api/models/edu_resource_use_in_class.rb +23 -80
- data/lib/flat_api/models/flat_error_response.rb +47 -84
- data/lib/flat_api/models/google_classroom_coursework.rb +13 -80
- data/lib/flat_api/models/google_classroom_submission.rb +43 -80
- data/lib/flat_api/models/grade.rb +51 -0
- data/lib/flat_api/models/group.rb +14 -94
- data/lib/flat_api/models/group_creation.rb +238 -0
- data/lib/flat_api/models/group_details.rb +178 -84
- data/lib/flat_api/models/group_type.rb +6 -4
- data/lib/flat_api/models/license_mode.rb +3 -3
- data/lib/flat_api/models/license_sources.rb +3 -3
- data/lib/flat_api/models/lms_name.rb +3 -3
- data/lib/flat_api/models/lti_configuration.rb +56 -0
- data/lib/flat_api/models/lti_configuration1p1.rb +361 -0
- data/lib/flat_api/models/lti_configuration1p1_all_of_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3.rb +106 -0
- data/lib/flat_api/models/lti_configuration1p3_base.rb +336 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services.rb +166 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_ags.rb +179 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.rb +159 -0
- data/lib/flat_api/models/lti_configuration1p3_base_supported_services_nrps.rb +169 -0
- data/lib/flat_api/models/lti_configuration1p3_base_tool.rb +199 -0
- data/lib/flat_api/models/lti_configuration1p3_deployment.rb +529 -0
- data/lib/flat_api/models/lti_configuration1p3_dynamic.rb +530 -0
- data/lib/flat_api/models/lti_configuration1p3_manual.rb +489 -0
- data/lib/flat_api/models/lti_configuration_base.rb +306 -0
- data/lib/flat_api/models/lti_configuration_create.rb +60 -0
- data/lib/flat_api/models/lti_configuration_create1p1.rb +210 -0
- data/lib/flat_api/models/lti_configuration_create1p3_deployment.rb +264 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic.rb +209 -0
- data/lib/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.rb +159 -0
- data/lib/flat_api/models/lti_configuration_create1p3_manual.rb +270 -0
- data/lib/flat_api/models/lti_configuration_update.rb +104 -0
- data/lib/flat_api/models/lti_configuration_update_deployment.rb +169 -0
- data/lib/flat_api/models/lti_configuration_update_standalone.rb +219 -0
- data/lib/flat_api/models/lti_credentials.rb +29 -84
- data/lib/flat_api/models/lti_credentials_creation.rb +23 -80
- data/lib/flat_api/models/media_attachment.rb +43 -88
- data/lib/flat_api/models/media_score_sharing_mode.rb +3 -3
- data/lib/flat_api/models/microsoft_graph_assignment.rb +99 -88
- data/lib/flat_api/models/microsoft_graph_submission.rb +33 -80
- data/lib/flat_api/models/omr_capabilities.rb +480 -0
- data/lib/flat_api/models/omr_details_step_data.rb +228 -0
- data/lib/flat_api/models/omr_details_submission.rb +288 -0
- data/lib/flat_api/models/omr_detected_instrument.rb +260 -0
- data/lib/flat_api/models/omr_imported_metadata.rb +181 -0
- data/lib/flat_api/models/omr_instrument_override.rb +311 -0
- data/lib/flat_api/models/omr_job.rb +394 -0
- data/lib/flat_api/models/omr_job_creation.rb +238 -0
- data/lib/flat_api/models/omr_job_file_metadata.rb +199 -0
- data/lib/flat_api/models/omr_job_file_upload.rb +176 -0
- data/lib/flat_api/models/omr_job_file_upload_result.rb +159 -0
- data/lib/flat_api/models/omr_job_input_file.rb +176 -0
- data/lib/flat_api/models/omr_job_output.rb +40 -0
- data/lib/flat_api/models/omr_job_progress.rb +169 -0
- data/lib/flat_api/models/omr_job_result.rb +161 -0
- data/lib/flat_api/models/omr_job_retention.rb +176 -0
- data/lib/flat_api/models/omr_job_status.rb +44 -0
- data/lib/flat_api/models/omr_locale_details.rb +193 -0
- data/lib/flat_api/models/omr_pending_step.rb +213 -0
- data/lib/flat_api/models/omr_step_name.rb +39 -0
- data/lib/flat_api/models/organization_invitation.rb +54 -81
- data/lib/flat_api/models/organization_invitation_creation.rb +15 -82
- data/lib/flat_api/models/organization_roles.rb +5 -5
- data/lib/flat_api/models/organization_user_access_token_creation.rb +23 -80
- data/lib/flat_api/models/rename_group_request.rb +165 -0
- data/lib/flat_api/models/resource_collaborator.rb +43 -85
- data/lib/flat_api/models/resource_collaborator_creation.rb +13 -80
- data/lib/flat_api/models/resource_rights.rb +43 -85
- data/lib/flat_api/models/score_comment.rb +122 -80
- data/lib/flat_api/models/score_comment_context.rb +73 -80
- data/lib/flat_api/models/score_comment_creation.rb +24 -81
- data/lib/flat_api/models/score_comment_moderation.rb +13 -80
- data/lib/flat_api/models/score_comment_update.rb +18 -85
- data/lib/flat_api/models/score_comments_counts.rb +28 -85
- data/lib/flat_api/models/score_creation.rb +5 -6
- data/lib/flat_api/models/score_creation_builder_data.rb +24 -88
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +23 -80
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +13 -80
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +24 -81
- data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +33 -80
- data/lib/flat_api/models/score_creation_common.rb +14 -81
- data/lib/flat_api/models/score_creation_file_import.rb +39 -86
- data/lib/flat_api/models/score_creation_google_drive_import.rb +24 -81
- data/lib/flat_api/models/score_creation_type.rb +4 -5
- data/lib/flat_api/models/score_details.rb +180 -89
- data/lib/flat_api/models/score_details_all_of_me.rb +193 -0
- data/lib/flat_api/models/score_fork.rb +14 -83
- data/lib/flat_api/models/score_license.rb +4 -5
- data/lib/flat_api/models/score_likes_counts.rb +28 -106
- data/lib/flat_api/models/score_modification.rb +13 -80
- data/lib/flat_api/models/score_plays_counts.rb +28 -85
- data/lib/flat_api/models/score_privacy.rb +3 -3
- data/lib/flat_api/models/score_revision.rb +81 -87
- data/lib/flat_api/models/score_revision_creation.rb +23 -80
- data/lib/flat_api/models/score_revision_statistics.rb +13 -80
- data/lib/flat_api/models/score_source.rb +13 -80
- data/lib/flat_api/models/score_summary.rb +63 -80
- data/lib/flat_api/models/score_track.rb +94 -88
- data/lib/flat_api/models/score_track_creation.rb +13 -80
- data/lib/flat_api/models/score_track_creation_response.rb +165 -0
- data/lib/flat_api/models/score_track_point.rb +23 -80
- data/lib/flat_api/models/score_track_purpose.rb +3 -3
- data/lib/flat_api/models/score_track_state.rb +3 -3
- data/lib/flat_api/models/score_track_type.rb +3 -3
- data/lib/flat_api/models/score_track_update.rb +25 -81
- data/lib/flat_api/models/score_views_counts.rb +28 -85
- data/lib/flat_api/models/task.rb +62 -87
- data/lib/flat_api/models/task_export_options.rb +13 -80
- data/lib/flat_api/models/task_progress.rb +13 -80
- data/lib/flat_api/models/task_result.rb +13 -80
- data/lib/flat_api/models/teaching_theme.rb +47 -0
- data/lib/flat_api/models/tutteo_product.rb +3 -3
- data/lib/flat_api/models/user_admin_update.rb +17 -95
- data/lib/flat_api/models/user_azure_details.rb +13 -80
- data/lib/flat_api/models/user_basics.rb +43 -80
- data/lib/flat_api/models/user_community_profile_links.rb +13 -80
- data/lib/flat_api/models/user_creation.rb +21 -98
- data/lib/flat_api/models/user_details.rb +101 -96
- data/lib/flat_api/models/user_details_admin.rb +72 -85
- data/lib/flat_api/models/user_details_admin_all_of_license.rb +13 -80
- data/lib/flat_api/models/user_public.rb +89 -94
- data/lib/flat_api/models/user_public_summary.rb +58 -81
- data/lib/flat_api/models/user_signin_link.rb +24 -81
- data/lib/flat_api/models/user_signin_link_creation.rb +13 -80
- data/lib/flat_api/oauth.rb +128 -0
- data/lib/flat_api/pagination.rb +88 -0
- data/lib/flat_api/retry.rb +56 -0
- data/lib/flat_api/version.rb +4 -4
- data/lib/flat_api.rb +70 -5
- metadata +98 -330
- data/lib/flat_api/models/flat_locales.rb +0 -56
- data/spec/api/account_api_spec.rb +0 -47
- data/spec/api/class_api_spec.rb +0 -422
- data/spec/api/collection_api_spec.rb +0 -158
- data/spec/api/edu_resources_api_spec.rb +0 -181
- data/spec/api/group_api_spec.rb +0 -71
- data/spec/api/organization_api_spec.rb +0 -201
- data/spec/api/score_api_spec.rb +0 -440
- data/spec/api/task_api_spec.rb +0 -47
- data/spec/api/user_api_spec.rb +0 -75
- data/spec/models/api_access_token_spec.rb +0 -66
- data/spec/models/app_scopes_spec.rb +0 -30
- data/spec/models/assignment_capabilities_can_publish_in_class_error_spec.rb +0 -42
- data/spec/models/assignment_capabilities_spec.rb +0 -60
- data/spec/models/assignment_copy_response_spec.rb +0 -124
- data/spec/models/assignment_copy_spec.rb +0 -32
- data/spec/models/assignment_copy_to_class_spec.rb +0 -48
- data/spec/models/assignment_copy_to_resource_library_spec.rb +0 -42
- data/spec/models/assignment_spec.rb +0 -118
- data/spec/models/assignment_submission_comment_creation_spec.rb +0 -36
- data/spec/models/assignment_submission_comment_spec.rb +0 -72
- data/spec/models/assignment_submission_comments_spec.rb +0 -42
- data/spec/models/assignment_submission_history_attachment_spec.rb +0 -48
- data/spec/models/assignment_submission_history_spec.rb +0 -112
- data/spec/models/assignment_submission_history_state_spec.rb +0 -30
- data/spec/models/assignment_submission_lti_spec.rb +0 -36
- data/spec/models/assignment_submission_playback_inner_spec.rb +0 -42
- data/spec/models/assignment_submission_spec.rb +0 -144
- data/spec/models/assignment_submission_state_spec.rb +0 -30
- data/spec/models/assignment_submission_update_spec.rb +0 -66
- data/spec/models/assignment_type_spec.rb +0 -30
- data/spec/models/assignment_update_spec.rb +0 -100
- data/spec/models/class_assignment_all_of_canvas_spec.rb +0 -42
- data/spec/models/class_assignment_all_of_lti_spec.rb +0 -36
- data/spec/models/class_assignment_all_of_mfc_spec.rb +0 -42
- data/spec/models/class_assignment_spec.rb +0 -216
- data/spec/models/class_assignment_update_all_of_google_classroom_spec.rb +0 -36
- data/spec/models/class_assignment_update_all_of_microsoft_graph_spec.rb +0 -36
- data/spec/models/class_assignment_update_spec.rb +0 -150
- data/spec/models/class_attachment_creation_spec.rb +0 -76
- data/spec/models/class_creation_spec.rb +0 -64
- data/spec/models/class_details_canvas_spec.rb +0 -42
- data/spec/models/class_details_clever_spec.rb +0 -76
- data/spec/models/class_details_google_classroom_spec.rb +0 -42
- data/spec/models/class_details_google_drive_spec.rb +0 -42
- data/spec/models/class_details_issues_spec.rb +0 -36
- data/spec/models/class_details_issues_sync_inner_spec.rb +0 -52
- data/spec/models/class_details_lti_spec.rb +0 -48
- data/spec/models/class_details_mfc_spec.rb +0 -42
- data/spec/models/class_details_microsoft_graph_spec.rb +0 -36
- data/spec/models/class_details_spec.rb +0 -178
- data/spec/models/class_grade_level_spec.rb +0 -30
- data/spec/models/class_roles_spec.rb +0 -30
- data/spec/models/class_state_spec.rb +0 -30
- data/spec/models/class_update_spec.rb +0 -64
- data/spec/models/collection_app_spec.rb +0 -48
- data/spec/models/collection_capabilities_spec.rb +0 -60
- data/spec/models/collection_creation_spec.rb +0 -42
- data/spec/models/collection_modification_spec.rb +0 -42
- data/spec/models/collection_privacy_spec.rb +0 -30
- data/spec/models/collection_spec.rb +0 -114
- data/spec/models/collection_type_spec.rb +0 -30
- data/spec/models/edu_library_spec.rb +0 -62
- data/spec/models/edu_resource_capabilities_spec.rb +0 -48
- data/spec/models/edu_resource_copy_spec.rb +0 -36
- data/spec/models/edu_resource_creation_spec.rb +0 -48
- data/spec/models/edu_resource_folder_spec.rb +0 -36
- data/spec/models/edu_resource_lti_link_spec.rb +0 -36
- data/spec/models/edu_resource_move_spec.rb +0 -36
- data/spec/models/edu_resource_privacy_spec.rb +0 -30
- data/spec/models/edu_resource_resource_spec.rb +0 -32
- data/spec/models/edu_resource_spec.rb +0 -96
- data/spec/models/edu_resource_type_spec.rb +0 -30
- data/spec/models/edu_resource_update_spec.rb +0 -42
- data/spec/models/edu_resource_use_in_class_spec.rb +0 -42
- data/spec/models/flat_error_response_spec.rb +0 -54
- data/spec/models/flat_locales_spec.rb +0 -30
- data/spec/models/google_classroom_coursework_spec.rb +0 -54
- data/spec/models/google_classroom_submission_spec.rb +0 -48
- data/spec/models/group_details_spec.rb +0 -72
- data/spec/models/group_spec.rb +0 -76
- data/spec/models/group_type_spec.rb +0 -30
- data/spec/models/license_mode_spec.rb +0 -30
- data/spec/models/license_sources_spec.rb +0 -30
- data/spec/models/lms_name_spec.rb +0 -30
- data/spec/models/lti_credentials_creation_spec.rb +0 -42
- data/spec/models/lti_credentials_spec.rb +0 -84
- data/spec/models/media_attachment_spec.rb +0 -166
- data/spec/models/media_score_sharing_mode_spec.rb +0 -30
- data/spec/models/microsoft_graph_assignment_spec.rb +0 -54
- data/spec/models/microsoft_graph_submission_spec.rb +0 -42
- data/spec/models/organization_invitation_creation_spec.rb +0 -46
- data/spec/models/organization_invitation_spec.rb +0 -84
- data/spec/models/organization_roles_spec.rb +0 -30
- data/spec/models/organization_user_access_token_creation_spec.rb +0 -36
- data/spec/models/resource_collaborator_creation_spec.rb +0 -72
- data/spec/models/resource_collaborator_spec.rb +0 -112
- data/spec/models/resource_rights_spec.rb +0 -64
- data/spec/models/score_comment_context_spec.rb +0 -78
- data/spec/models/score_comment_creation_spec.rb +0 -66
- data/spec/models/score_comment_moderation_spec.rb +0 -46
- data/spec/models/score_comment_spec.rb +0 -130
- data/spec/models/score_comment_update_spec.rb +0 -54
- data/spec/models/score_comments_counts_spec.rb +0 -54
- data/spec/models/score_creation_builder_data_all_of_builder_data_layout_data_spec.rb +0 -82
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_instruments_spec.rb +0 -60
- data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_spec.rb +0 -66
- data/spec/models/score_creation_builder_data_all_of_builder_data_spec.rb +0 -42
- data/spec/models/score_creation_builder_data_spec.rb +0 -60
- data/spec/models/score_creation_common_spec.rb +0 -54
- data/spec/models/score_creation_file_import_spec.rb +0 -76
- data/spec/models/score_creation_google_drive_import_spec.rb +0 -60
- data/spec/models/score_creation_spec.rb +0 -32
- data/spec/models/score_creation_type_spec.rb +0 -30
- data/spec/models/score_details_spec.rb +0 -240
- data/spec/models/score_fork_spec.rb +0 -48
- data/spec/models/score_license_spec.rb +0 -30
- data/spec/models/score_likes_counts_spec.rb +0 -48
- data/spec/models/score_modification_spec.rb +0 -102
- data/spec/models/score_plays_counts_spec.rb +0 -48
- data/spec/models/score_privacy_spec.rb +0 -30
- data/spec/models/score_revision_creation_spec.rb +0 -58
- data/spec/models/score_revision_spec.rb +0 -78
- data/spec/models/score_revision_statistics_spec.rb +0 -54
- data/spec/models/score_source_spec.rb +0 -36
- data/spec/models/score_summary_spec.rb +0 -66
- data/spec/models/score_track_creation_spec.rb +0 -66
- data/spec/models/score_track_point_spec.rb +0 -52
- data/spec/models/score_track_purpose_spec.rb +0 -30
- data/spec/models/score_track_spec.rb +0 -108
- data/spec/models/score_track_state_spec.rb +0 -30
- data/spec/models/score_track_type_spec.rb +0 -30
- data/spec/models/score_track_update_spec.rb +0 -54
- data/spec/models/score_views_counts_spec.rb +0 -48
- data/spec/models/task_export_options_spec.rb +0 -36
- data/spec/models/task_progress_spec.rb +0 -42
- data/spec/models/task_result_spec.rb +0 -42
- data/spec/models/task_spec.rb +0 -100
- data/spec/models/tutteo_product_spec.rb +0 -30
- data/spec/models/user_admin_update_spec.rb +0 -66
- data/spec/models/user_azure_details_spec.rb +0 -48
- data/spec/models/user_basics_spec.rb +0 -94
- data/spec/models/user_community_profile_links_spec.rb +0 -66
- data/spec/models/user_creation_spec.rb +0 -76
- data/spec/models/user_details_admin_all_of_license_spec.rb +0 -60
- data/spec/models/user_details_admin_spec.rb +0 -142
- data/spec/models/user_details_spec.rb +0 -214
- data/spec/models/user_public_spec.rb +0 -178
- data/spec/models/user_public_summary_spec.rb +0 -118
- data/spec/models/user_signin_link_creation_spec.rb +0 -36
- data/spec/models/user_signin_link_spec.rb +0 -42
- data/spec/spec_helper.rb +0 -111
|
@@ -0,0 +1,894 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Flat API
|
|
3
|
+
|
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.26.1
|
|
7
|
+
Contact: developers@flat.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module FlatApi
|
|
16
|
+
class OMRApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add a file to an OMR job
|
|
23
|
+
# Add one image or PDF to a draft job. Call once per file; files keep their upload order.
|
|
24
|
+
# @param job [String] Unique identifier of the OMR job
|
|
25
|
+
# @param omr_job_file_upload [OmrJobFileUpload]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
28
|
+
# @return [OmrJobFileUploadResult]
|
|
29
|
+
def add_omr_job_file(job, omr_job_file_upload, opts = {})
|
|
30
|
+
data, _status_code, _headers = add_omr_job_file_with_http_info(job, omr_job_file_upload, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add a file to an OMR job
|
|
35
|
+
# Add one image or PDF to a draft job. Call once per file; files keep their upload order.
|
|
36
|
+
# @param job [String] Unique identifier of the OMR job
|
|
37
|
+
# @param omr_job_file_upload [OmrJobFileUpload]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
40
|
+
# @return [Array<(OmrJobFileUploadResult, Integer, Hash)>] OmrJobFileUploadResult data, response status code and response headers
|
|
41
|
+
def add_omr_job_file_with_http_info(job, omr_job_file_upload, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.add_omr_job_file ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'job' is set
|
|
46
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.add_omr_job_file"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'omr_job_file_upload' is set
|
|
50
|
+
if @api_client.config.client_side_validation && omr_job_file_upload.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'omr_job_file_upload' when calling OMRApi.add_omr_job_file"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/omr/jobs/{job}/files'.sub('{job}', CGI.escape(job.to_s))
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
|
|
59
|
+
# header parameters
|
|
60
|
+
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
63
|
+
# HTTP header 'Content-Type'
|
|
64
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
65
|
+
if !content_type.nil?
|
|
66
|
+
header_params['Content-Type'] = content_type
|
|
67
|
+
end
|
|
68
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(omr_job_file_upload)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'OmrJobFileUploadResult'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"OMRApi.add_omr_job_file",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: OMRApi#add_omr_job_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Cancel an OMR job
|
|
100
|
+
# Cancel a draft or in-flight job. Any charged credits are reversed.
|
|
101
|
+
# @param job [String] Unique identifier of the OMR job
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
104
|
+
# @return [OmrJob]
|
|
105
|
+
def cancel_omr_job(job, opts = {})
|
|
106
|
+
data, _status_code, _headers = cancel_omr_job_with_http_info(job, opts)
|
|
107
|
+
data
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Cancel an OMR job
|
|
111
|
+
# Cancel a draft or in-flight job. Any charged credits are reversed.
|
|
112
|
+
# @param job [String] Unique identifier of the OMR job
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
115
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
116
|
+
def cancel_omr_job_with_http_info(job, opts = {})
|
|
117
|
+
if @api_client.config.debugging
|
|
118
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.cancel_omr_job ...'
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'job' is set
|
|
121
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.cancel_omr_job"
|
|
123
|
+
end
|
|
124
|
+
# resource path
|
|
125
|
+
local_var_path = '/omr/jobs/{job}/cancel'.sub('{job}', CGI.escape(job.to_s))
|
|
126
|
+
|
|
127
|
+
# query parameters
|
|
128
|
+
query_params = opts[:query_params] || {}
|
|
129
|
+
|
|
130
|
+
# header parameters
|
|
131
|
+
header_params = opts[:header_params] || {}
|
|
132
|
+
# HTTP header 'Accept' (if needed)
|
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
134
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
135
|
+
|
|
136
|
+
# form parameters
|
|
137
|
+
form_params = opts[:form_params] || {}
|
|
138
|
+
|
|
139
|
+
# http body (model)
|
|
140
|
+
post_body = opts[:debug_body]
|
|
141
|
+
|
|
142
|
+
# return_type
|
|
143
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
144
|
+
|
|
145
|
+
# auth_names
|
|
146
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
147
|
+
|
|
148
|
+
new_options = opts.merge(
|
|
149
|
+
:operation => :"OMRApi.cancel_omr_job",
|
|
150
|
+
:header_params => header_params,
|
|
151
|
+
:query_params => query_params,
|
|
152
|
+
:form_params => form_params,
|
|
153
|
+
:body => post_body,
|
|
154
|
+
:auth_names => auth_names,
|
|
155
|
+
:return_type => return_type
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug "API called: OMRApi#cancel_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
161
|
+
end
|
|
162
|
+
return data, status_code, headers
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Create an OMR job
|
|
166
|
+
# Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break.
|
|
167
|
+
# @param omr_job_creation [OmrJobCreation]
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
170
|
+
# @return [OmrJob]
|
|
171
|
+
def create_omr_job(omr_job_creation, opts = {})
|
|
172
|
+
data, _status_code, _headers = create_omr_job_with_http_info(omr_job_creation, opts)
|
|
173
|
+
data
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Create an OMR job
|
|
177
|
+
# Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break.
|
|
178
|
+
# @param omr_job_creation [OmrJobCreation]
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
181
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
182
|
+
def create_omr_job_with_http_info(omr_job_creation, opts = {})
|
|
183
|
+
if @api_client.config.debugging
|
|
184
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.create_omr_job ...'
|
|
185
|
+
end
|
|
186
|
+
# verify the required parameter 'omr_job_creation' is set
|
|
187
|
+
if @api_client.config.client_side_validation && omr_job_creation.nil?
|
|
188
|
+
fail ArgumentError, "Missing the required parameter 'omr_job_creation' when calling OMRApi.create_omr_job"
|
|
189
|
+
end
|
|
190
|
+
# resource path
|
|
191
|
+
local_var_path = '/omr/jobs'
|
|
192
|
+
|
|
193
|
+
# query parameters
|
|
194
|
+
query_params = opts[:query_params] || {}
|
|
195
|
+
|
|
196
|
+
# header parameters
|
|
197
|
+
header_params = opts[:header_params] || {}
|
|
198
|
+
# HTTP header 'Accept' (if needed)
|
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
200
|
+
# HTTP header 'Content-Type'
|
|
201
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
202
|
+
if !content_type.nil?
|
|
203
|
+
header_params['Content-Type'] = content_type
|
|
204
|
+
end
|
|
205
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
206
|
+
|
|
207
|
+
# form parameters
|
|
208
|
+
form_params = opts[:form_params] || {}
|
|
209
|
+
|
|
210
|
+
# http body (model)
|
|
211
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(omr_job_creation)
|
|
212
|
+
|
|
213
|
+
# return_type
|
|
214
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
215
|
+
|
|
216
|
+
# auth_names
|
|
217
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
218
|
+
|
|
219
|
+
new_options = opts.merge(
|
|
220
|
+
:operation => :"OMRApi.create_omr_job",
|
|
221
|
+
:header_params => header_params,
|
|
222
|
+
:query_params => query_params,
|
|
223
|
+
:form_params => form_params,
|
|
224
|
+
:body => post_body,
|
|
225
|
+
:auth_names => auth_names,
|
|
226
|
+
:return_type => return_type
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
230
|
+
if @api_client.config.debugging
|
|
231
|
+
@api_client.config.logger.debug "API called: OMRApi#create_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
232
|
+
end
|
|
233
|
+
return data, status_code, headers
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Delete an OMR job's data
|
|
237
|
+
# Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing.
|
|
238
|
+
# @param job [String] Unique identifier of the OMR job
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
241
|
+
# @return [OmrJob]
|
|
242
|
+
def delete_omr_job(job, opts = {})
|
|
243
|
+
data, _status_code, _headers = delete_omr_job_with_http_info(job, opts)
|
|
244
|
+
data
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Delete an OMR job's data
|
|
248
|
+
# Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing.
|
|
249
|
+
# @param job [String] Unique identifier of the OMR job
|
|
250
|
+
# @param [Hash] opts the optional parameters
|
|
251
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
252
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
253
|
+
def delete_omr_job_with_http_info(job, opts = {})
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.delete_omr_job ...'
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'job' is set
|
|
258
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
259
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.delete_omr_job"
|
|
260
|
+
end
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = '/omr/jobs/{job}'.sub('{job}', CGI.escape(job.to_s))
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = opts[:query_params] || {}
|
|
266
|
+
|
|
267
|
+
# header parameters
|
|
268
|
+
header_params = opts[:header_params] || {}
|
|
269
|
+
# HTTP header 'Accept' (if needed)
|
|
270
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
271
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
272
|
+
|
|
273
|
+
# form parameters
|
|
274
|
+
form_params = opts[:form_params] || {}
|
|
275
|
+
|
|
276
|
+
# http body (model)
|
|
277
|
+
post_body = opts[:debug_body]
|
|
278
|
+
|
|
279
|
+
# return_type
|
|
280
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
281
|
+
|
|
282
|
+
# auth_names
|
|
283
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
284
|
+
|
|
285
|
+
new_options = opts.merge(
|
|
286
|
+
:operation => :"OMRApi.delete_omr_job",
|
|
287
|
+
:header_params => header_params,
|
|
288
|
+
:query_params => query_params,
|
|
289
|
+
:form_params => form_params,
|
|
290
|
+
:body => post_body,
|
|
291
|
+
:auth_names => auth_names,
|
|
292
|
+
:return_type => return_type
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug "API called: OMRApi#delete_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
298
|
+
end
|
|
299
|
+
return data, status_code, headers
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# OMR capabilities and limits
|
|
303
|
+
# Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted.
|
|
304
|
+
# @param [Hash] opts the optional parameters
|
|
305
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
306
|
+
# @return [OmrCapabilities]
|
|
307
|
+
def get_omr_capabilities(opts = {})
|
|
308
|
+
data, _status_code, _headers = get_omr_capabilities_with_http_info(opts)
|
|
309
|
+
data
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# OMR capabilities and limits
|
|
313
|
+
# Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted.
|
|
314
|
+
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
316
|
+
# @return [Array<(OmrCapabilities, Integer, Hash)>] OmrCapabilities data, response status code and response headers
|
|
317
|
+
def get_omr_capabilities_with_http_info(opts = {})
|
|
318
|
+
if @api_client.config.debugging
|
|
319
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.get_omr_capabilities ...'
|
|
320
|
+
end
|
|
321
|
+
# resource path
|
|
322
|
+
local_var_path = '/omr/capabilities'
|
|
323
|
+
|
|
324
|
+
# query parameters
|
|
325
|
+
query_params = opts[:query_params] || {}
|
|
326
|
+
|
|
327
|
+
# header parameters
|
|
328
|
+
header_params = opts[:header_params] || {}
|
|
329
|
+
# HTTP header 'Accept' (if needed)
|
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
331
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
332
|
+
|
|
333
|
+
# form parameters
|
|
334
|
+
form_params = opts[:form_params] || {}
|
|
335
|
+
|
|
336
|
+
# http body (model)
|
|
337
|
+
post_body = opts[:debug_body]
|
|
338
|
+
|
|
339
|
+
# return_type
|
|
340
|
+
return_type = opts[:debug_return_type] || 'OmrCapabilities'
|
|
341
|
+
|
|
342
|
+
# auth_names
|
|
343
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
344
|
+
|
|
345
|
+
new_options = opts.merge(
|
|
346
|
+
:operation => :"OMRApi.get_omr_capabilities",
|
|
347
|
+
:header_params => header_params,
|
|
348
|
+
:query_params => query_params,
|
|
349
|
+
:form_params => form_params,
|
|
350
|
+
:body => post_body,
|
|
351
|
+
:auth_names => auth_names,
|
|
352
|
+
:return_type => return_type
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
356
|
+
if @api_client.config.debugging
|
|
357
|
+
@api_client.config.logger.debug "API called: OMRApi#get_omr_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
358
|
+
end
|
|
359
|
+
return data, status_code, headers
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Get an OMR job
|
|
363
|
+
# Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes.
|
|
364
|
+
# @param job [String] Unique identifier of the OMR job
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @option opts [Integer] :wait Long-poll up to this many seconds for a state change before returning.
|
|
367
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
368
|
+
# @return [OmrJob]
|
|
369
|
+
def get_omr_job(job, opts = {})
|
|
370
|
+
data, _status_code, _headers = get_omr_job_with_http_info(job, opts)
|
|
371
|
+
data
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Get an OMR job
|
|
375
|
+
# Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes.
|
|
376
|
+
# @param job [String] Unique identifier of the OMR job
|
|
377
|
+
# @param [Hash] opts the optional parameters
|
|
378
|
+
# @option opts [Integer] :wait Long-poll up to this many seconds for a state change before returning.
|
|
379
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
380
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
381
|
+
def get_omr_job_with_http_info(job, opts = {})
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job ...'
|
|
384
|
+
end
|
|
385
|
+
# verify the required parameter 'job' is set
|
|
386
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job"
|
|
388
|
+
end
|
|
389
|
+
if @api_client.config.client_side_validation && !opts[:'wait'].nil? && opts[:'wait'] > 25
|
|
390
|
+
fail ArgumentError, 'invalid value for "opts[:"wait"]" when calling OMRApi.get_omr_job, must be smaller than or equal to 25.'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if @api_client.config.client_side_validation && !opts[:'wait'].nil? && opts[:'wait'] < 0
|
|
394
|
+
fail ArgumentError, 'invalid value for "opts[:"wait"]" when calling OMRApi.get_omr_job, must be greater than or equal to 0.'
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# resource path
|
|
398
|
+
local_var_path = '/omr/jobs/{job}'.sub('{job}', CGI.escape(job.to_s))
|
|
399
|
+
|
|
400
|
+
# query parameters
|
|
401
|
+
query_params = opts[:query_params] || {}
|
|
402
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
403
|
+
|
|
404
|
+
# header parameters
|
|
405
|
+
header_params = opts[:header_params] || {}
|
|
406
|
+
# HTTP header 'Accept' (if needed)
|
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
408
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
409
|
+
|
|
410
|
+
# form parameters
|
|
411
|
+
form_params = opts[:form_params] || {}
|
|
412
|
+
|
|
413
|
+
# http body (model)
|
|
414
|
+
post_body = opts[:debug_body]
|
|
415
|
+
|
|
416
|
+
# return_type
|
|
417
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
418
|
+
|
|
419
|
+
# auth_names
|
|
420
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
421
|
+
|
|
422
|
+
new_options = opts.merge(
|
|
423
|
+
:operation => :"OMRApi.get_omr_job",
|
|
424
|
+
:header_params => header_params,
|
|
425
|
+
:query_params => query_params,
|
|
426
|
+
:form_params => form_params,
|
|
427
|
+
:body => post_body,
|
|
428
|
+
:auth_names => auth_names,
|
|
429
|
+
:return_type => return_type
|
|
430
|
+
)
|
|
431
|
+
|
|
432
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
433
|
+
if @api_client.config.debugging
|
|
434
|
+
@api_client.config.logger.debug "API called: OMRApi#get_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
435
|
+
end
|
|
436
|
+
return data, status_code, headers
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# Download the finalized result
|
|
440
|
+
# Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created.
|
|
441
|
+
# @param job [String] Unique identifier of the OMR job
|
|
442
|
+
# @param format [String] Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`).
|
|
443
|
+
# @param [Hash] opts the optional parameters
|
|
444
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
445
|
+
# @return [File]
|
|
446
|
+
def get_omr_job_export(job, format, opts = {})
|
|
447
|
+
data, _status_code, _headers = get_omr_job_export_with_http_info(job, format, opts)
|
|
448
|
+
data
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# Download the finalized result
|
|
452
|
+
# Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created.
|
|
453
|
+
# @param job [String] Unique identifier of the OMR job
|
|
454
|
+
# @param format [String] Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`).
|
|
455
|
+
# @param [Hash] opts the optional parameters
|
|
456
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
457
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
458
|
+
def get_omr_job_export_with_http_info(job, format, opts = {})
|
|
459
|
+
if @api_client.config.debugging
|
|
460
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job_export ...'
|
|
461
|
+
end
|
|
462
|
+
# verify the required parameter 'job' is set
|
|
463
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
464
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job_export"
|
|
465
|
+
end
|
|
466
|
+
# verify the required parameter 'format' is set
|
|
467
|
+
if @api_client.config.client_side_validation && format.nil?
|
|
468
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling OMRApi.get_omr_job_export"
|
|
469
|
+
end
|
|
470
|
+
# verify enum value
|
|
471
|
+
allowable_values = ["musicxml", "mxl", "midi", "thumbnail.png"]
|
|
472
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
|
473
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
474
|
+
end
|
|
475
|
+
# resource path
|
|
476
|
+
local_var_path = '/omr/jobs/{job}/exports/{format}'.sub('{job}', CGI.escape(job.to_s)).sub('{format}', CGI.escape(format.to_s))
|
|
477
|
+
|
|
478
|
+
# query parameters
|
|
479
|
+
query_params = opts[:query_params] || {}
|
|
480
|
+
|
|
481
|
+
# header parameters
|
|
482
|
+
header_params = opts[:header_params] || {}
|
|
483
|
+
# HTTP header 'Accept' (if needed)
|
|
484
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
|
485
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
486
|
+
|
|
487
|
+
# form parameters
|
|
488
|
+
form_params = opts[:form_params] || {}
|
|
489
|
+
|
|
490
|
+
# http body (model)
|
|
491
|
+
post_body = opts[:debug_body]
|
|
492
|
+
|
|
493
|
+
# return_type
|
|
494
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
495
|
+
|
|
496
|
+
# auth_names
|
|
497
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
498
|
+
|
|
499
|
+
new_options = opts.merge(
|
|
500
|
+
:operation => :"OMRApi.get_omr_job_export",
|
|
501
|
+
:header_params => header_params,
|
|
502
|
+
:query_params => query_params,
|
|
503
|
+
:form_params => form_params,
|
|
504
|
+
:body => post_body,
|
|
505
|
+
:auth_names => auth_names,
|
|
506
|
+
:return_type => return_type
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
510
|
+
if @api_client.config.debugging
|
|
511
|
+
@api_client.config.logger.debug "API called: OMRApi#get_omr_job_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
512
|
+
end
|
|
513
|
+
return data, status_code, headers
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Get an input page image
|
|
517
|
+
# Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file.
|
|
518
|
+
# @param job [String] Unique identifier of the OMR job
|
|
519
|
+
# @param index [Integer] 0-based index of the input file (page) to fetch.
|
|
520
|
+
# @param [Hash] opts the optional parameters
|
|
521
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
522
|
+
# @return [File]
|
|
523
|
+
def get_omr_job_file(job, index, opts = {})
|
|
524
|
+
data, _status_code, _headers = get_omr_job_file_with_http_info(job, index, opts)
|
|
525
|
+
data
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# Get an input page image
|
|
529
|
+
# Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file.
|
|
530
|
+
# @param job [String] Unique identifier of the OMR job
|
|
531
|
+
# @param index [Integer] 0-based index of the input file (page) to fetch.
|
|
532
|
+
# @param [Hash] opts the optional parameters
|
|
533
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
534
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
535
|
+
def get_omr_job_file_with_http_info(job, index, opts = {})
|
|
536
|
+
if @api_client.config.debugging
|
|
537
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job_file ...'
|
|
538
|
+
end
|
|
539
|
+
# verify the required parameter 'job' is set
|
|
540
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
541
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job_file"
|
|
542
|
+
end
|
|
543
|
+
# verify the required parameter 'index' is set
|
|
544
|
+
if @api_client.config.client_side_validation && index.nil?
|
|
545
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling OMRApi.get_omr_job_file"
|
|
546
|
+
end
|
|
547
|
+
# resource path
|
|
548
|
+
local_var_path = '/omr/jobs/{job}/files/{index}'.sub('{job}', CGI.escape(job.to_s)).sub('{index}', CGI.escape(index.to_s))
|
|
549
|
+
|
|
550
|
+
# query parameters
|
|
551
|
+
query_params = opts[:query_params] || {}
|
|
552
|
+
|
|
553
|
+
# header parameters
|
|
554
|
+
header_params = opts[:header_params] || {}
|
|
555
|
+
# HTTP header 'Accept' (if needed)
|
|
556
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/jpeg', 'application/json']) unless header_params['Accept']
|
|
557
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
558
|
+
|
|
559
|
+
# form parameters
|
|
560
|
+
form_params = opts[:form_params] || {}
|
|
561
|
+
|
|
562
|
+
# http body (model)
|
|
563
|
+
post_body = opts[:debug_body]
|
|
564
|
+
|
|
565
|
+
# return_type
|
|
566
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
567
|
+
|
|
568
|
+
# auth_names
|
|
569
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
570
|
+
|
|
571
|
+
new_options = opts.merge(
|
|
572
|
+
:operation => :"OMRApi.get_omr_job_file",
|
|
573
|
+
:header_params => header_params,
|
|
574
|
+
:query_params => query_params,
|
|
575
|
+
:form_params => form_params,
|
|
576
|
+
:body => post_body,
|
|
577
|
+
:auth_names => auth_names,
|
|
578
|
+
:return_type => return_type
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
582
|
+
if @api_client.config.debugging
|
|
583
|
+
@api_client.config.logger.debug "API called: OMRApi#get_omr_job_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
584
|
+
end
|
|
585
|
+
return data, status_code, headers
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
# List credit history
|
|
589
|
+
# The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`.
|
|
590
|
+
# @param [Hash] opts the optional parameters
|
|
591
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
|
592
|
+
# @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.
|
|
593
|
+
# @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.
|
|
594
|
+
# @return [Array<CreditTransaction>]
|
|
595
|
+
def list_billing_credits_history(opts = {})
|
|
596
|
+
data, _status_code, _headers = list_billing_credits_history_with_http_info(opts)
|
|
597
|
+
data
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
# List credit history
|
|
601
|
+
# The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`.
|
|
602
|
+
# @param [Hash] opts the optional parameters
|
|
603
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
|
604
|
+
# @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.
|
|
605
|
+
# @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.
|
|
606
|
+
# @return [Array<(Array<CreditTransaction>, Integer, Hash)>] Array<CreditTransaction> data, response status code and response headers
|
|
607
|
+
def list_billing_credits_history_with_http_info(opts = {})
|
|
608
|
+
if @api_client.config.debugging
|
|
609
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.list_billing_credits_history ...'
|
|
610
|
+
end
|
|
611
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
|
612
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_billing_credits_history, must be smaller than or equal to 1000.'
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
616
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_billing_credits_history, must be greater than or equal to 1.'
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
# resource path
|
|
620
|
+
local_var_path = '/billing/credits/history'
|
|
621
|
+
|
|
622
|
+
# query parameters
|
|
623
|
+
query_params = opts[:query_params] || {}
|
|
624
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
625
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
|
626
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
|
627
|
+
|
|
628
|
+
# header parameters
|
|
629
|
+
header_params = opts[:header_params] || {}
|
|
630
|
+
# HTTP header 'Accept' (if needed)
|
|
631
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
632
|
+
|
|
633
|
+
# form parameters
|
|
634
|
+
form_params = opts[:form_params] || {}
|
|
635
|
+
|
|
636
|
+
# http body (model)
|
|
637
|
+
post_body = opts[:debug_body]
|
|
638
|
+
|
|
639
|
+
# return_type
|
|
640
|
+
return_type = opts[:debug_return_type] || 'Array<CreditTransaction>'
|
|
641
|
+
|
|
642
|
+
# auth_names
|
|
643
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
644
|
+
|
|
645
|
+
new_options = opts.merge(
|
|
646
|
+
:operation => :"OMRApi.list_billing_credits_history",
|
|
647
|
+
:header_params => header_params,
|
|
648
|
+
:query_params => query_params,
|
|
649
|
+
:form_params => form_params,
|
|
650
|
+
:body => post_body,
|
|
651
|
+
:auth_names => auth_names,
|
|
652
|
+
:return_type => return_type
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
656
|
+
if @api_client.config.debugging
|
|
657
|
+
@api_client.config.logger.debug "API called: OMRApi#list_billing_credits_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
658
|
+
end
|
|
659
|
+
return data, status_code, headers
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
# List OMR jobs
|
|
663
|
+
# List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts.
|
|
664
|
+
# @param [Hash] opts the optional parameters
|
|
665
|
+
# @option opts [OmrJobStatus] :status Filter jobs by status
|
|
666
|
+
# @option opts [Boolean] :expired Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart.
|
|
667
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
|
668
|
+
# @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.
|
|
669
|
+
# @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.
|
|
670
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
671
|
+
# @return [Array<OmrJob>]
|
|
672
|
+
def list_omr_jobs(opts = {})
|
|
673
|
+
data, _status_code, _headers = list_omr_jobs_with_http_info(opts)
|
|
674
|
+
data
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
# List OMR jobs
|
|
678
|
+
# List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts.
|
|
679
|
+
# @param [Hash] opts the optional parameters
|
|
680
|
+
# @option opts [OmrJobStatus] :status Filter jobs by status
|
|
681
|
+
# @option opts [Boolean] :expired Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart.
|
|
682
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
|
683
|
+
# @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.
|
|
684
|
+
# @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.
|
|
685
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
686
|
+
# @return [Array<(Array<OmrJob>, Integer, Hash)>] Array<OmrJob> data, response status code and response headers
|
|
687
|
+
def list_omr_jobs_with_http_info(opts = {})
|
|
688
|
+
if @api_client.config.debugging
|
|
689
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.list_omr_jobs ...'
|
|
690
|
+
end
|
|
691
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
|
692
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_omr_jobs, must be smaller than or equal to 1000.'
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
696
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_omr_jobs, must be greater than or equal to 1.'
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
# resource path
|
|
700
|
+
local_var_path = '/omr/jobs'
|
|
701
|
+
|
|
702
|
+
# query parameters
|
|
703
|
+
query_params = opts[:query_params] || {}
|
|
704
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
705
|
+
query_params[:'expired'] = opts[:'expired'] if !opts[:'expired'].nil?
|
|
706
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
707
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
|
708
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
|
709
|
+
|
|
710
|
+
# header parameters
|
|
711
|
+
header_params = opts[:header_params] || {}
|
|
712
|
+
# HTTP header 'Accept' (if needed)
|
|
713
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
714
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
715
|
+
|
|
716
|
+
# form parameters
|
|
717
|
+
form_params = opts[:form_params] || {}
|
|
718
|
+
|
|
719
|
+
# http body (model)
|
|
720
|
+
post_body = opts[:debug_body]
|
|
721
|
+
|
|
722
|
+
# return_type
|
|
723
|
+
return_type = opts[:debug_return_type] || 'Array<OmrJob>'
|
|
724
|
+
|
|
725
|
+
# auth_names
|
|
726
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
727
|
+
|
|
728
|
+
new_options = opts.merge(
|
|
729
|
+
:operation => :"OMRApi.list_omr_jobs",
|
|
730
|
+
:header_params => header_params,
|
|
731
|
+
:query_params => query_params,
|
|
732
|
+
:form_params => form_params,
|
|
733
|
+
:body => post_body,
|
|
734
|
+
:auth_names => auth_names,
|
|
735
|
+
:return_type => return_type
|
|
736
|
+
)
|
|
737
|
+
|
|
738
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
739
|
+
if @api_client.config.debugging
|
|
740
|
+
@api_client.config.logger.debug "API called: OMRApi#list_omr_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
741
|
+
end
|
|
742
|
+
return data, status_code, headers
|
|
743
|
+
end
|
|
744
|
+
|
|
745
|
+
# Start an OMR job
|
|
746
|
+
# Validate the attached files, run the permission, quota and credit checks, then queue the job for processing.
|
|
747
|
+
# @param job [String] Unique identifier of the OMR job
|
|
748
|
+
# @param [Hash] opts the optional parameters
|
|
749
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
750
|
+
# @return [OmrJob]
|
|
751
|
+
def start_omr_job(job, opts = {})
|
|
752
|
+
data, _status_code, _headers = start_omr_job_with_http_info(job, opts)
|
|
753
|
+
data
|
|
754
|
+
end
|
|
755
|
+
|
|
756
|
+
# Start an OMR job
|
|
757
|
+
# Validate the attached files, run the permission, quota and credit checks, then queue the job for processing.
|
|
758
|
+
# @param job [String] Unique identifier of the OMR job
|
|
759
|
+
# @param [Hash] opts the optional parameters
|
|
760
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
761
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
762
|
+
def start_omr_job_with_http_info(job, opts = {})
|
|
763
|
+
if @api_client.config.debugging
|
|
764
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.start_omr_job ...'
|
|
765
|
+
end
|
|
766
|
+
# verify the required parameter 'job' is set
|
|
767
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
768
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.start_omr_job"
|
|
769
|
+
end
|
|
770
|
+
# resource path
|
|
771
|
+
local_var_path = '/omr/jobs/{job}/start'.sub('{job}', CGI.escape(job.to_s))
|
|
772
|
+
|
|
773
|
+
# query parameters
|
|
774
|
+
query_params = opts[:query_params] || {}
|
|
775
|
+
|
|
776
|
+
# header parameters
|
|
777
|
+
header_params = opts[:header_params] || {}
|
|
778
|
+
# HTTP header 'Accept' (if needed)
|
|
779
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
780
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
781
|
+
|
|
782
|
+
# form parameters
|
|
783
|
+
form_params = opts[:form_params] || {}
|
|
784
|
+
|
|
785
|
+
# http body (model)
|
|
786
|
+
post_body = opts[:debug_body]
|
|
787
|
+
|
|
788
|
+
# return_type
|
|
789
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
790
|
+
|
|
791
|
+
# auth_names
|
|
792
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
793
|
+
|
|
794
|
+
new_options = opts.merge(
|
|
795
|
+
:operation => :"OMRApi.start_omr_job",
|
|
796
|
+
:header_params => header_params,
|
|
797
|
+
:query_params => query_params,
|
|
798
|
+
:form_params => form_params,
|
|
799
|
+
:body => post_body,
|
|
800
|
+
:auth_names => auth_names,
|
|
801
|
+
:return_type => return_type
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
805
|
+
if @api_client.config.debugging
|
|
806
|
+
@api_client.config.logger.debug "API called: OMRApi#start_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
807
|
+
end
|
|
808
|
+
return data, status_code, headers
|
|
809
|
+
end
|
|
810
|
+
|
|
811
|
+
# Submit an interactive step
|
|
812
|
+
# Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name).
|
|
813
|
+
# @param job [String] Unique identifier of the OMR job
|
|
814
|
+
# @param step [OmrStepName] The pending step being submitted
|
|
815
|
+
# @param body [OmrDetailsSubmission]
|
|
816
|
+
# @param [Hash] opts the optional parameters
|
|
817
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
818
|
+
# @return [OmrJob]
|
|
819
|
+
def submit_omr_job_step(job, step, body, opts = {})
|
|
820
|
+
data, _status_code, _headers = submit_omr_job_step_with_http_info(job, step, body, opts)
|
|
821
|
+
data
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
# Submit an interactive step
|
|
825
|
+
# Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name).
|
|
826
|
+
# @param job [String] Unique identifier of the OMR job
|
|
827
|
+
# @param step [OmrStepName] The pending step being submitted
|
|
828
|
+
# @param body [OmrDetailsSubmission]
|
|
829
|
+
# @param [Hash] opts the optional parameters
|
|
830
|
+
# @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
|
|
831
|
+
# @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
|
|
832
|
+
def submit_omr_job_step_with_http_info(job, step, body, opts = {})
|
|
833
|
+
if @api_client.config.debugging
|
|
834
|
+
@api_client.config.logger.debug 'Calling API: OMRApi.submit_omr_job_step ...'
|
|
835
|
+
end
|
|
836
|
+
# verify the required parameter 'job' is set
|
|
837
|
+
if @api_client.config.client_side_validation && job.nil?
|
|
838
|
+
fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.submit_omr_job_step"
|
|
839
|
+
end
|
|
840
|
+
# verify the required parameter 'step' is set
|
|
841
|
+
if @api_client.config.client_side_validation && step.nil?
|
|
842
|
+
fail ArgumentError, "Missing the required parameter 'step' when calling OMRApi.submit_omr_job_step"
|
|
843
|
+
end
|
|
844
|
+
# verify the required parameter 'body' is set
|
|
845
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
846
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OMRApi.submit_omr_job_step"
|
|
847
|
+
end
|
|
848
|
+
# resource path
|
|
849
|
+
local_var_path = '/omr/jobs/{job}/steps/{step}'.sub('{job}', CGI.escape(job.to_s)).sub('{step}', CGI.escape(step.to_s))
|
|
850
|
+
|
|
851
|
+
# query parameters
|
|
852
|
+
query_params = opts[:query_params] || {}
|
|
853
|
+
|
|
854
|
+
# header parameters
|
|
855
|
+
header_params = opts[:header_params] || {}
|
|
856
|
+
# HTTP header 'Accept' (if needed)
|
|
857
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
858
|
+
# HTTP header 'Content-Type'
|
|
859
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
860
|
+
if !content_type.nil?
|
|
861
|
+
header_params['Content-Type'] = content_type
|
|
862
|
+
end
|
|
863
|
+
header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
|
|
864
|
+
|
|
865
|
+
# form parameters
|
|
866
|
+
form_params = opts[:form_params] || {}
|
|
867
|
+
|
|
868
|
+
# http body (model)
|
|
869
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
870
|
+
|
|
871
|
+
# return_type
|
|
872
|
+
return_type = opts[:debug_return_type] || 'OmrJob'
|
|
873
|
+
|
|
874
|
+
# auth_names
|
|
875
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
876
|
+
|
|
877
|
+
new_options = opts.merge(
|
|
878
|
+
:operation => :"OMRApi.submit_omr_job_step",
|
|
879
|
+
:header_params => header_params,
|
|
880
|
+
:query_params => query_params,
|
|
881
|
+
:form_params => form_params,
|
|
882
|
+
:body => post_body,
|
|
883
|
+
:auth_names => auth_names,
|
|
884
|
+
:return_type => return_type
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
888
|
+
if @api_client.config.debugging
|
|
889
|
+
@api_client.config.logger.debug "API called: OMRApi#submit_omr_job_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
890
|
+
end
|
|
891
|
+
return data, status_code, headers
|
|
892
|
+
end
|
|
893
|
+
end
|
|
894
|
+
end
|