phrase 0.4.31 → 1.0.3
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/Gemfile +6 -0
- data/LICENSE +17 -18
- data/README.md +449 -280
- data/Rakefile +7 -4
- data/docs/Account.md +27 -0
- data/docs/AccountDetails.md +27 -0
- data/docs/AccountDetails1.md +17 -0
- data/docs/AccountsApi.md +134 -0
- data/docs/AffectedCount.md +17 -0
- data/docs/AffectedResources.md +17 -0
- data/docs/Authorization.md +31 -0
- data/docs/AuthorizationCreateParameters.md +21 -0
- data/docs/AuthorizationUpdateParameters.md +21 -0
- data/docs/AuthorizationWithToken.md +33 -0
- data/docs/AuthorizationWithToken1.md +17 -0
- data/docs/AuthorizationsApi.md +321 -0
- data/docs/BitbucketSync.md +27 -0
- data/docs/BitbucketSyncApi.md +197 -0
- data/docs/BitbucketSyncExportParameters.md +17 -0
- data/docs/BitbucketSyncExportResponse.md +17 -0
- data/docs/BitbucketSyncImportParameters.md +17 -0
- data/docs/BlacklistedKey.md +23 -0
- data/docs/BlacklistedKeyCreateParameters.md +17 -0
- data/docs/BlacklistedKeyUpdateParameters.md +17 -0
- data/docs/BlacklistedKeysApi.md +333 -0
- data/docs/Branch.md +29 -0
- data/docs/BranchCreateParameters.md +17 -0
- data/docs/BranchMergeParameters.md +17 -0
- data/docs/BranchUpdateParameters.md +17 -0
- data/docs/BranchesApi.md +459 -0
- data/docs/Comment.md +25 -0
- data/docs/CommentCreateParameters.md +19 -0
- data/docs/CommentMarkReadParameters.md +17 -0
- data/docs/CommentUpdateParameters.md +19 -0
- data/docs/CommentsApi.md +548 -0
- data/docs/Distribution.md +29 -0
- data/docs/DistributionCreateParameters.md +29 -0
- data/docs/DistributionPreview.md +29 -0
- data/docs/DistributionUpdateParameters.md +29 -0
- data/docs/DistributionsApi.md +331 -0
- data/docs/Document.md +23 -0
- data/docs/DocumentsApi.md +137 -0
- data/docs/Format.md +35 -0
- data/docs/FormatsApi.md +68 -0
- data/docs/GitHubSyncApi.md +130 -0
- data/docs/GitLabSyncApi.md +463 -0
- data/docs/GithubSyncExportParameters.md +17 -0
- data/docs/GithubSyncImportParameters.md +17 -0
- data/docs/GitlabSync.md +37 -0
- data/docs/GitlabSyncExport.md +19 -0
- data/docs/GitlabSyncExportParameters.md +17 -0
- data/docs/GitlabSyncHistory.md +25 -0
- data/docs/GitlabSyncImportParameters.md +17 -0
- data/docs/GlossariesApi.md +331 -0
- data/docs/Glossary.md +25 -0
- data/docs/GlossaryCreateParameters.md +21 -0
- data/docs/GlossaryTerm.md +31 -0
- data/docs/GlossaryTermCreateParameters.md +23 -0
- data/docs/GlossaryTermTranslation.md +25 -0
- data/docs/GlossaryTermTranslationCreateParameters.md +19 -0
- data/docs/GlossaryTermTranslationUpdateParameters.md +19 -0
- data/docs/GlossaryTermTranslationsApi.md +213 -0
- data/docs/GlossaryTermUpdateParameters.md +23 -0
- data/docs/GlossaryTermsApi.md +341 -0
- data/docs/GlossaryUpdateParameters.md +21 -0
- data/docs/InlineResponse422.md +19 -0
- data/docs/InlineResponse422Errors.md +21 -0
- data/docs/Invitation.md +35 -0
- data/docs/InvitationCreateParameters.md +25 -0
- data/docs/InvitationUpdateParameters.md +23 -0
- data/docs/InvitationsApi.md +395 -0
- data/docs/Job.md +29 -0
- data/docs/JobCompleteParameters.md +17 -0
- data/docs/JobCreateParameters.md +27 -0
- data/docs/JobDetails.md +37 -0
- data/docs/JobDetails1.md +23 -0
- data/docs/JobKeysCreateParameters.md +19 -0
- data/docs/JobLocale.md +23 -0
- data/docs/JobLocaleCompleteParameters.md +17 -0
- data/docs/JobLocaleReopenParameters.md +17 -0
- data/docs/JobLocaleUpdateParameters.md +21 -0
- data/docs/JobLocalesApi.md +483 -0
- data/docs/JobLocalesCreateParameters.md +21 -0
- data/docs/JobPreview.md +21 -0
- data/docs/JobReopenParameters.md +17 -0
- data/docs/JobStartParameters.md +17 -0
- data/docs/JobUpdateParameters.md +23 -0
- data/docs/JobsApi.md +674 -0
- data/docs/KeyCreateParameters.md +45 -0
- data/docs/KeyPreview.md +21 -0
- data/docs/KeyUpdateParameters.md +45 -0
- data/docs/KeysApi.md +609 -0
- data/docs/KeysSearchParameters.md +25 -0
- data/docs/KeysTagParameters.md +23 -0
- data/docs/KeysUntagParameters.md +23 -0
- data/docs/Locale.md +35 -0
- data/docs/LocaleCreateParameters.md +35 -0
- data/docs/LocaleDetails.md +37 -0
- data/docs/LocaleDetails1.md +17 -0
- data/docs/LocalePreview.md +21 -0
- data/docs/LocaleStatistics.md +29 -0
- data/docs/LocaleUpdateParameters.md +35 -0
- data/docs/LocalesApi.md +428 -0
- data/docs/Member.md +25 -0
- data/docs/MemberUpdateParameters.md +23 -0
- data/docs/MembersApi.md +267 -0
- data/docs/OrderConfirmParameters.md +17 -0
- data/docs/OrderCreateParameters.md +43 -0
- data/docs/OrdersApi.md +337 -0
- data/docs/Project.md +31 -0
- data/docs/ProjectCreateParameters.md +29 -0
- data/docs/ProjectDetails.md +33 -0
- data/docs/ProjectDetails1.md +19 -0
- data/docs/ProjectLocales.md +27 -0
- data/docs/ProjectLocales1.md +17 -0
- data/docs/ProjectShort.md +25 -0
- data/docs/ProjectUpdateParameters.md +27 -0
- data/docs/ProjectsApi.md +321 -0
- data/docs/Release.md +37 -0
- data/docs/ReleaseCreateParameters.md +21 -0
- data/docs/ReleasePreview.md +37 -0
- data/docs/ReleaseUpdateParameters.md +21 -0
- data/docs/ReleasesApi.md +407 -0
- data/docs/Screenshot.md +29 -0
- data/docs/ScreenshotCreateParameters.md +21 -0
- data/docs/ScreenshotMarker.md +27 -0
- data/docs/ScreenshotMarkerCreateParameters.md +19 -0
- data/docs/ScreenshotMarkerUpdateParameters.md +19 -0
- data/docs/ScreenshotMarkersApi.md +337 -0
- data/docs/ScreenshotUpdateParameters.md +21 -0
- data/docs/ScreenshotsApi.md +331 -0
- data/docs/Space.md +27 -0
- data/docs/SpaceCreateParameters.md +17 -0
- data/docs/SpaceUpdateParameters.md +17 -0
- data/docs/SpacesApi.md +529 -0
- data/docs/SpacesProjectsCreateParameters.md +17 -0
- data/docs/StyleGuidesApi.md +331 -0
- data/docs/Styleguide.md +23 -0
- data/docs/StyleguideCreateParameters.md +41 -0
- data/docs/StyleguideDetails.md +49 -0
- data/docs/StyleguideDetails1.md +41 -0
- data/docs/StyleguidePreview.md +19 -0
- data/docs/StyleguideUpdateParameters.md +41 -0
- data/docs/Tag.md +23 -0
- data/docs/TagCreateParameters.md +19 -0
- data/docs/TagWithStats.md +25 -0
- data/docs/TagWithStats1.md +17 -0
- data/docs/TagWithStats1Statistics.md +23 -0
- data/docs/TagWithStats1Statistics1.md +19 -0
- data/docs/TagsApi.md +271 -0
- data/docs/Team.md +29 -0
- data/docs/TeamCreateParameters.md +17 -0
- data/docs/TeamDetail.md +29 -0
- data/docs/TeamUpdateParameters.md +17 -0
- data/docs/TeamsApi.md +721 -0
- data/docs/TeamsProjectsCreateParameters.md +17 -0
- data/docs/TeamsSpacesCreateParameters.md +17 -0
- data/docs/TeamsUsersCreateParameters.md +17 -0
- data/docs/Translation.md +37 -0
- data/docs/TranslationCreateParameters.md +31 -0
- data/docs/TranslationDetails.md +41 -0
- data/docs/TranslationDetails1.md +19 -0
- data/docs/TranslationExcludeParameters.md +17 -0
- data/docs/TranslationIncludeParameters.md +17 -0
- data/docs/TranslationKey.md +33 -0
- data/docs/TranslationKeyDetails.md +51 -0
- data/docs/TranslationKeyDetails1.md +33 -0
- data/docs/TranslationOrder.md +49 -0
- data/docs/TranslationReviewParameters.md +17 -0
- data/docs/TranslationUnverifyParameters.md +17 -0
- data/docs/TranslationUpdateParameters.md +27 -0
- data/docs/TranslationVerifyParameters.md +17 -0
- data/docs/TranslationVersion.md +31 -0
- data/docs/TranslationVersionWithUser.md +33 -0
- data/docs/TranslationVersionWithUser1.md +17 -0
- data/docs/TranslationsApi.md +1148 -0
- data/docs/TranslationsExcludeParameters.md +23 -0
- data/docs/TranslationsIncludeParameters.md +23 -0
- data/docs/TranslationsReviewParameters.md +19 -0
- data/docs/TranslationsSearchParameters.md +23 -0
- data/docs/TranslationsUnverifyParameters.md +23 -0
- data/docs/TranslationsVerifyParameters.md +23 -0
- data/docs/Upload.md +31 -0
- data/docs/UploadCreateParameters.md +45 -0
- data/docs/UploadSummary.md +31 -0
- data/docs/UploadsApi.md +234 -0
- data/docs/User.md +29 -0
- data/docs/UserPreview.md +21 -0
- data/docs/UsersApi.md +68 -0
- data/docs/VersionsHistoryApi.md +146 -0
- data/docs/Webhook.md +29 -0
- data/docs/WebhookCreateParameters.md +23 -0
- data/docs/WebhookUpdateParameters.md +23 -0
- data/docs/WebhooksApi.md +394 -0
- data/git_push.sh +58 -0
- data/lib/phrase.rb +212 -55
- data/lib/phrase/api/accounts_api.rb +142 -0
- data/lib/phrase/api/authorizations_api.rb +348 -0
- data/lib/phrase/api/bitbucket_sync_api.rb +219 -0
- data/lib/phrase/api/blacklisted_keys_api.rb +381 -0
- data/lib/phrase/api/branches_api.rb +526 -0
- data/lib/phrase/api/comments_api.rb +659 -0
- data/lib/phrase/api/distributions_api.rb +378 -0
- data/lib/phrase/api/documents_api.rb +152 -0
- data/lib/phrase/api/formats_api.rb +70 -0
- data/lib/phrase/api/git_hub_sync_api.rb +146 -0
- data/lib/phrase/api/git_lab_sync_api.rb +510 -0
- data/lib/phrase/api/glossaries_api.rb +378 -0
- data/lib/phrase/api/glossary_term_translations_api.rb +270 -0
- data/lib/phrase/api/glossary_terms_api.rb +408 -0
- data/lib/phrase/api/invitations_api.rb +450 -0
- data/lib/phrase/api/job_locales_api.rb +589 -0
- data/lib/phrase/api/jobs_api.rb +792 -0
- data/lib/phrase/api/keys_api.rb +702 -0
- data/lib/phrase/api/locales_api.rb +499 -0
- data/lib/phrase/api/members_api.rb +304 -0
- data/lib/phrase/api/orders_api.rb +387 -0
- data/lib/phrase/api/projects_api.rb +348 -0
- data/lib/phrase/api/releases_api.rb +486 -0
- data/lib/phrase/api/screenshot_markers_api.rb +396 -0
- data/lib/phrase/api/screenshots_api.rb +378 -0
- data/lib/phrase/api/spaces_api.rb +610 -0
- data/lib/phrase/api/style_guides_api.rb +378 -0
- data/lib/phrase/api/tags_api.rb +307 -0
- data/lib/phrase/api/teams_api.rb +840 -0
- data/lib/phrase/api/translations_api.rb +1353 -0
- data/lib/phrase/api/uploads_api.rb +273 -0
- data/lib/phrase/api/users_api.rb +70 -0
- data/lib/phrase/api/versions_history_api.rb +172 -0
- data/lib/phrase/api/webhooks_api.rb +448 -0
- data/lib/phrase/api_client.rb +376 -0
- data/lib/phrase/api_error.rb +45 -0
- data/lib/phrase/configuration.rb +243 -0
- data/lib/phrase/models/account.rb +239 -0
- data/lib/phrase/models/account_details.rb +247 -0
- data/lib/phrase/models/account_details1.rb +194 -0
- data/lib/phrase/models/affected_count.rb +194 -0
- data/lib/phrase/models/affected_resources.rb +194 -0
- data/lib/phrase/models/authorization.rb +259 -0
- data/lib/phrase/models/authorization_create_parameters.rb +217 -0
- data/lib/phrase/models/authorization_update_parameters.rb +217 -0
- data/lib/phrase/models/authorization_with_token.rb +276 -0
- data/lib/phrase/models/authorization_with_token1.rb +194 -0
- data/lib/phrase/models/bitbucket_sync.rb +241 -0
- data/lib/phrase/models/bitbucket_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/bitbucket_sync_export_response.rb +194 -0
- data/lib/phrase/models/bitbucket_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/blacklisted_key.rb +221 -0
- data/lib/phrase/models/blacklisted_key_create_parameters.rb +195 -0
- data/lib/phrase/models/blacklisted_key_update_parameters.rb +195 -0
- data/lib/phrase/models/branch.rb +248 -0
- data/lib/phrase/models/branch_create_parameters.rb +195 -0
- data/lib/phrase/models/branch_merge_parameters.rb +195 -0
- data/lib/phrase/models/branch_update_parameters.rb +195 -0
- data/lib/phrase/models/comment.rb +230 -0
- data/lib/phrase/models/comment_create_parameters.rb +205 -0
- data/lib/phrase/models/comment_mark_read_parameters.rb +195 -0
- data/lib/phrase/models/comment_update_parameters.rb +205 -0
- data/lib/phrase/models/distribution.rb +252 -0
- data/lib/phrase/models/distribution_create_parameters.rb +259 -0
- data/lib/phrase/models/distribution_preview.rb +250 -0
- data/lib/phrase/models/distribution_update_parameters.rb +259 -0
- data/lib/phrase/models/document.rb +221 -0
- data/lib/phrase/models/format.rb +275 -0
- data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/gitlab_sync.rb +284 -0
- data/lib/phrase/models/gitlab_sync_export.rb +203 -0
- data/lib/phrase/models/gitlab_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/gitlab_sync_history.rb +232 -0
- data/lib/phrase/models/gitlab_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/glossary.rb +232 -0
- data/lib/phrase/models/glossary_create_parameters.rb +217 -0
- data/lib/phrase/models/glossary_term.rb +259 -0
- data/lib/phrase/models/glossary_term_create_parameters.rb +225 -0
- data/lib/phrase/models/glossary_term_translation.rb +230 -0
- data/lib/phrase/models/glossary_term_translation_create_parameters.rb +205 -0
- data/lib/phrase/models/glossary_term_translation_update_parameters.rb +205 -0
- data/lib/phrase/models/glossary_term_update_parameters.rb +225 -0
- data/lib/phrase/models/glossary_update_parameters.rb +217 -0
- data/lib/phrase/models/inline_response422.rb +205 -0
- data/lib/phrase/models/inline_response422_errors.rb +212 -0
- data/lib/phrase/models/invitation.rb +279 -0
- data/lib/phrase/models/invitation_create_parameters.rb +237 -0
- data/lib/phrase/models/invitation_update_parameters.rb +227 -0
- data/lib/phrase/models/job.rb +248 -0
- data/lib/phrase/models/job_complete_parameters.rb +195 -0
- data/lib/phrase/models/job_create_parameters.rb +249 -0
- data/lib/phrase/models/job_details.rb +296 -0
- data/lib/phrase/models/job_details1.rb +225 -0
- data/lib/phrase/models/job_keys_create_parameters.rb +207 -0
- data/lib/phrase/models/job_locale.rb +223 -0
- data/lib/phrase/models/job_locale_complete_parameters.rb +195 -0
- data/lib/phrase/models/job_locale_reopen_parameters.rb +195 -0
- data/lib/phrase/models/job_locale_update_parameters.rb +217 -0
- data/lib/phrase/models/job_locales_create_parameters.rb +217 -0
- data/lib/phrase/models/job_preview.rb +212 -0
- data/lib/phrase/models/job_reopen_parameters.rb +195 -0
- data/lib/phrase/models/job_start_parameters.rb +195 -0
- data/lib/phrase/models/job_update_parameters.rb +225 -0
- data/lib/phrase/models/key_create_parameters.rb +335 -0
- data/lib/phrase/models/key_preview.rb +212 -0
- data/lib/phrase/models/key_update_parameters.rb +335 -0
- data/lib/phrase/models/keys_search_parameters.rb +235 -0
- data/lib/phrase/models/keys_tag_parameters.rb +225 -0
- data/lib/phrase/models/keys_untag_parameters.rb +225 -0
- data/lib/phrase/models/locale.rb +277 -0
- data/lib/phrase/models/locale_create_parameters.rb +285 -0
- data/lib/phrase/models/locale_details.rb +294 -0
- data/lib/phrase/models/locale_details1.rb +194 -0
- data/lib/phrase/models/locale_preview.rb +212 -0
- data/lib/phrase/models/locale_statistics.rb +248 -0
- data/lib/phrase/models/locale_update_parameters.rb +285 -0
- data/lib/phrase/models/member.rb +232 -0
- data/lib/phrase/models/member_update_parameters.rb +227 -0
- data/lib/phrase/models/order_confirm_parameters.rb +195 -0
- data/lib/phrase/models/order_create_parameters.rb +327 -0
- data/lib/phrase/models/project.rb +257 -0
- data/lib/phrase/models/project_create_parameters.rb +255 -0
- data/lib/phrase/models/project_details.rb +274 -0
- data/lib/phrase/models/project_details1.rb +203 -0
- data/lib/phrase/models/project_locales.rb +249 -0
- data/lib/phrase/models/project_locales1.rb +196 -0
- data/lib/phrase/models/project_short.rb +230 -0
- data/lib/phrase/models/project_update_parameters.rb +245 -0
- data/lib/phrase/models/release.rb +290 -0
- data/lib/phrase/models/release_create_parameters.rb +217 -0
- data/lib/phrase/models/release_preview.rb +290 -0
- data/lib/phrase/models/release_update_parameters.rb +217 -0
- data/lib/phrase/models/screenshot.rb +248 -0
- data/lib/phrase/models/screenshot_create_parameters.rb +215 -0
- data/lib/phrase/models/screenshot_marker.rb +239 -0
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +205 -0
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +205 -0
- data/lib/phrase/models/screenshot_update_parameters.rb +215 -0
- data/lib/phrase/models/space.rb +241 -0
- data/lib/phrase/models/space_create_parameters.rb +195 -0
- data/lib/phrase/models/space_update_parameters.rb +195 -0
- data/lib/phrase/models/spaces_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/styleguide.rb +221 -0
- data/lib/phrase/models/styleguide_create_parameters.rb +315 -0
- data/lib/phrase/models/styleguide_details.rb +346 -0
- data/lib/phrase/models/styleguide_details1.rb +302 -0
- data/lib/phrase/models/styleguide_preview.rb +203 -0
- data/lib/phrase/models/styleguide_update_parameters.rb +315 -0
- data/lib/phrase/models/tag.rb +221 -0
- data/lib/phrase/models/tag_create_parameters.rb +205 -0
- data/lib/phrase/models/tag_with_stats.rb +240 -0
- data/lib/phrase/models/tag_with_stats1.rb +196 -0
- data/lib/phrase/models/tag_with_stats1_statistics.rb +221 -0
- data/lib/phrase/models/tag_with_stats1_statistics1.rb +203 -0
- data/lib/phrase/models/team.rb +254 -0
- data/lib/phrase/models/team_create_parameters.rb +195 -0
- data/lib/phrase/models/team_detail.rb +254 -0
- data/lib/phrase/models/team_update_parameters.rb +195 -0
- data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
- data/lib/phrase/models/translation.rb +286 -0
- data/lib/phrase/models/translation_create_parameters.rb +265 -0
- data/lib/phrase/models/translation_details.rb +312 -0
- data/lib/phrase/models/translation_details1.rb +203 -0
- data/lib/phrase/models/translation_exclude_parameters.rb +195 -0
- data/lib/phrase/models/translation_include_parameters.rb +195 -0
- data/lib/phrase/models/translation_key.rb +268 -0
- data/lib/phrase/models/translation_key_details.rb +357 -0
- data/lib/phrase/models/translation_key_details1.rb +266 -0
- data/lib/phrase/models/translation_order.rb +340 -0
- data/lib/phrase/models/translation_review_parameters.rb +195 -0
- data/lib/phrase/models/translation_unverify_parameters.rb +195 -0
- data/lib/phrase/models/translation_update_parameters.rb +245 -0
- data/lib/phrase/models/translation_verify_parameters.rb +195 -0
- data/lib/phrase/models/translation_version.rb +257 -0
- data/lib/phrase/models/translation_version_with_user.rb +274 -0
- data/lib/phrase/models/translation_version_with_user1.rb +194 -0
- data/lib/phrase/models/translations_exclude_parameters.rb +225 -0
- data/lib/phrase/models/translations_include_parameters.rb +225 -0
- data/lib/phrase/models/translations_review_parameters.rb +205 -0
- data/lib/phrase/models/translations_search_parameters.rb +225 -0
- data/lib/phrase/models/translations_unverify_parameters.rb +225 -0
- data/lib/phrase/models/translations_verify_parameters.rb +225 -0
- data/lib/phrase/models/upload.rb +257 -0
- data/lib/phrase/models/upload_create_parameters.rb +335 -0
- data/lib/phrase/models/upload_summary.rb +257 -0
- data/lib/phrase/models/user.rb +248 -0
- data/lib/phrase/models/user_preview.rb +212 -0
- data/lib/phrase/models/webhook.rb +250 -0
- data/lib/phrase/models/webhook_create_parameters.rb +225 -0
- data/lib/phrase/models/webhook_update_parameters.rb +225 -0
- data/lib/phrase/response.rb +41 -0
- data/lib/phrase/version.rb +1 -1
- data/phrase.gemspec +27 -27
- data/spec/api/accounts_api_spec.rb +50 -0
- data/spec/api/authorizations_api_spec.rb +90 -0
- data/spec/api/bitbucket_sync_api_spec.rb +64 -0
- data/spec/api/blacklisted_keys_api_spec.rb +96 -0
- data/spec/api/branches_api_spec.rb +124 -0
- data/spec/api/comments_api_spec.rb +151 -0
- data/spec/api/distributions_api_spec.rb +95 -0
- data/spec/api/documents_api_spec.rb +52 -0
- data/spec/api/formats_api_spec.rb +35 -0
- data/spec/api/git_hub_sync_api_spec.rb +49 -0
- data/spec/api/git_lab_sync_api_spec.rb +125 -0
- data/spec/api/glossaries_api_spec.rb +95 -0
- data/spec/api/glossary_term_translations_api_spec.rb +72 -0
- data/spec/api/glossary_terms_api_spec.rb +100 -0
- data/spec/api/invitations_api_spec.rb +109 -0
- data/spec/api/job_locales_api_spec.rb +135 -0
- data/spec/api/jobs_api_spec.rb +177 -0
- data/spec/api/keys_api_spec.rb +162 -0
- data/spec/api/locales_api_spec.rb +126 -0
- data/spec/api/members_api_spec.rb +81 -0
- data/spec/api/orders_api_spec.rb +98 -0
- data/spec/api/projects_api_spec.rb +90 -0
- data/spec/api/releases_api_spec.rb +115 -0
- data/spec/api/screenshot_markers_api_spec.rb +98 -0
- data/spec/api/screenshots_api_spec.rb +95 -0
- data/spec/api/spaces_api_spec.rb +141 -0
- data/spec/api/style_guides_api_spec.rb +95 -0
- data/spec/api/tags_api_spec.rb +83 -0
- data/spec/api/teams_api_spec.rb +185 -0
- data/spec/api/translations_api_spec.rb +287 -0
- data/spec/api/uploads_api_spec.rb +82 -0
- data/spec/api/users_api_spec.rb +35 -0
- data/spec/api/versions_history_api_spec.rb +56 -0
- data/spec/api/webhooks_api_spec.rb +109 -0
- data/spec/api_client_spec.rb +214 -0
- data/spec/configuration_spec.rb +30 -0
- data/spec/models/account_details1_spec.rb +29 -0
- data/spec/models/account_details_spec.rb +59 -0
- data/spec/models/account_spec.rb +59 -0
- data/spec/models/affected_count_spec.rb +29 -0
- data/spec/models/affected_resources_spec.rb +29 -0
- data/spec/models/authorization_create_parameters_spec.rb +41 -0
- data/spec/models/authorization_spec.rb +71 -0
- data/spec/models/authorization_update_parameters_spec.rb +41 -0
- data/spec/models/authorization_with_token1_spec.rb +29 -0
- data/spec/models/authorization_with_token_spec.rb +77 -0
- data/spec/models/bitbucket_sync_export_parameters_spec.rb +29 -0
- data/spec/models/bitbucket_sync_export_response_spec.rb +29 -0
- data/spec/models/bitbucket_sync_import_parameters_spec.rb +29 -0
- data/spec/models/bitbucket_sync_spec.rb +59 -0
- data/spec/models/blacklisted_key_create_parameters_spec.rb +29 -0
- data/spec/models/blacklisted_key_spec.rb +47 -0
- data/spec/models/blacklisted_key_update_parameters_spec.rb +29 -0
- data/spec/models/branch_create_parameters_spec.rb +29 -0
- data/spec/models/branch_merge_parameters_spec.rb +29 -0
- data/spec/models/branch_spec.rb +65 -0
- data/spec/models/branch_update_parameters_spec.rb +29 -0
- data/spec/models/comment_create_parameters_spec.rb +35 -0
- data/spec/models/comment_mark_read_parameters_spec.rb +29 -0
- data/spec/models/comment_spec.rb +53 -0
- data/spec/models/comment_update_parameters_spec.rb +35 -0
- data/spec/models/distribution_create_parameters_spec.rb +65 -0
- data/spec/models/distribution_preview_spec.rb +65 -0
- data/spec/models/distribution_spec.rb +65 -0
- data/spec/models/distribution_update_parameters_spec.rb +65 -0
- data/spec/models/document_spec.rb +47 -0
- data/spec/models/format_spec.rb +83 -0
- data/spec/models/github_sync_export_parameters_spec.rb +29 -0
- data/spec/models/github_sync_import_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_export_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_export_spec.rb +35 -0
- data/spec/models/gitlab_sync_history_spec.rb +53 -0
- data/spec/models/gitlab_sync_import_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_spec.rb +89 -0
- data/spec/models/glossary_create_parameters_spec.rb +41 -0
- data/spec/models/glossary_spec.rb +53 -0
- data/spec/models/glossary_term_create_parameters_spec.rb +47 -0
- data/spec/models/glossary_term_spec.rb +71 -0
- data/spec/models/glossary_term_translation_create_parameters_spec.rb +35 -0
- data/spec/models/glossary_term_translation_spec.rb +53 -0
- data/spec/models/glossary_term_translation_update_parameters_spec.rb +35 -0
- data/spec/models/glossary_term_update_parameters_spec.rb +47 -0
- data/spec/models/glossary_update_parameters_spec.rb +41 -0
- data/spec/models/inline_response422_errors_spec.rb +41 -0
- data/spec/models/inline_response422_spec.rb +35 -0
- data/spec/models/invitation_create_parameters_spec.rb +53 -0
- data/spec/models/invitation_spec.rb +83 -0
- data/spec/models/invitation_update_parameters_spec.rb +47 -0
- data/spec/models/job_complete_parameters_spec.rb +29 -0
- data/spec/models/job_create_parameters_spec.rb +59 -0
- data/spec/models/job_details1_spec.rb +47 -0
- data/spec/models/job_details_spec.rb +89 -0
- data/spec/models/job_keys_create_parameters_spec.rb +35 -0
- data/spec/models/job_locale_complete_parameters_spec.rb +29 -0
- data/spec/models/job_locale_reopen_parameters_spec.rb +29 -0
- data/spec/models/job_locale_spec.rb +47 -0
- data/spec/models/job_locale_update_parameters_spec.rb +41 -0
- data/spec/models/job_locales_create_parameters_spec.rb +41 -0
- data/spec/models/job_preview_spec.rb +41 -0
- data/spec/models/job_reopen_parameters_spec.rb +29 -0
- data/spec/models/job_spec.rb +65 -0
- data/spec/models/job_start_parameters_spec.rb +29 -0
- data/spec/models/job_update_parameters_spec.rb +47 -0
- data/spec/models/key_create_parameters_spec.rb +113 -0
- data/spec/models/key_preview_spec.rb +41 -0
- data/spec/models/key_update_parameters_spec.rb +113 -0
- data/spec/models/keys_search_parameters_spec.rb +53 -0
- data/spec/models/keys_tag_parameters_spec.rb +47 -0
- data/spec/models/keys_untag_parameters_spec.rb +47 -0
- data/spec/models/locale_create_parameters_spec.rb +83 -0
- data/spec/models/locale_details1_spec.rb +29 -0
- data/spec/models/locale_details_spec.rb +89 -0
- data/spec/models/locale_preview_spec.rb +41 -0
- data/spec/models/locale_spec.rb +83 -0
- data/spec/models/locale_statistics_spec.rb +65 -0
- data/spec/models/locale_update_parameters_spec.rb +83 -0
- data/spec/models/member_spec.rb +53 -0
- data/spec/models/member_update_parameters_spec.rb +47 -0
- data/spec/models/order_confirm_parameters_spec.rb +29 -0
- data/spec/models/order_create_parameters_spec.rb +107 -0
- data/spec/models/project_create_parameters_spec.rb +65 -0
- data/spec/models/project_details1_spec.rb +35 -0
- data/spec/models/project_details_spec.rb +77 -0
- data/spec/models/project_locales1_spec.rb +29 -0
- data/spec/models/project_locales_spec.rb +59 -0
- data/spec/models/project_short_spec.rb +53 -0
- data/spec/models/project_spec.rb +71 -0
- data/spec/models/project_update_parameters_spec.rb +59 -0
- data/spec/models/release_create_parameters_spec.rb +41 -0
- data/spec/models/release_preview_spec.rb +89 -0
- data/spec/models/release_spec.rb +89 -0
- data/spec/models/release_update_parameters_spec.rb +41 -0
- data/spec/models/screenshot_create_parameters_spec.rb +41 -0
- data/spec/models/screenshot_marker_create_parameters_spec.rb +35 -0
- data/spec/models/screenshot_marker_spec.rb +59 -0
- data/spec/models/screenshot_marker_update_parameters_spec.rb +35 -0
- data/spec/models/screenshot_spec.rb +65 -0
- data/spec/models/screenshot_update_parameters_spec.rb +41 -0
- data/spec/models/space_create_parameters_spec.rb +29 -0
- data/spec/models/space_spec.rb +59 -0
- data/spec/models/space_update_parameters_spec.rb +29 -0
- data/spec/models/spaces_projects_create_parameters_spec.rb +29 -0
- data/spec/models/styleguide_create_parameters_spec.rb +101 -0
- data/spec/models/styleguide_details1_spec.rb +101 -0
- data/spec/models/styleguide_details_spec.rb +125 -0
- data/spec/models/styleguide_preview_spec.rb +35 -0
- data/spec/models/styleguide_spec.rb +47 -0
- data/spec/models/styleguide_update_parameters_spec.rb +101 -0
- data/spec/models/tag_create_parameters_spec.rb +35 -0
- data/spec/models/tag_spec.rb +47 -0
- data/spec/models/tag_with_stats1_spec.rb +29 -0
- data/spec/models/tag_with_stats1_statistics1_spec.rb +35 -0
- data/spec/models/tag_with_stats1_statistics_spec.rb +47 -0
- data/spec/models/tag_with_stats_spec.rb +53 -0
- data/spec/models/team_create_parameters_spec.rb +29 -0
- data/spec/models/team_detail_spec.rb +65 -0
- data/spec/models/team_spec.rb +65 -0
- data/spec/models/team_update_parameters_spec.rb +29 -0
- data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
- data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
- data/spec/models/teams_users_create_parameters_spec.rb +29 -0
- data/spec/models/translation_create_parameters_spec.rb +71 -0
- data/spec/models/translation_details1_spec.rb +35 -0
- data/spec/models/translation_details_spec.rb +101 -0
- data/spec/models/translation_exclude_parameters_spec.rb +29 -0
- data/spec/models/translation_include_parameters_spec.rb +29 -0
- data/spec/models/translation_key_details1_spec.rb +77 -0
- data/spec/models/translation_key_details_spec.rb +131 -0
- data/spec/models/translation_key_spec.rb +77 -0
- data/spec/models/translation_order_spec.rb +125 -0
- data/spec/models/translation_review_parameters_spec.rb +29 -0
- data/spec/models/translation_spec.rb +89 -0
- data/spec/models/translation_unverify_parameters_spec.rb +29 -0
- data/spec/models/translation_update_parameters_spec.rb +59 -0
- data/spec/models/translation_verify_parameters_spec.rb +29 -0
- data/spec/models/translation_version_spec.rb +71 -0
- data/spec/models/translation_version_with_user1_spec.rb +29 -0
- data/spec/models/translation_version_with_user_spec.rb +77 -0
- data/spec/models/translations_exclude_parameters_spec.rb +47 -0
- data/spec/models/translations_include_parameters_spec.rb +47 -0
- data/spec/models/translations_review_parameters_spec.rb +35 -0
- data/spec/models/translations_search_parameters_spec.rb +47 -0
- data/spec/models/translations_unverify_parameters_spec.rb +47 -0
- data/spec/models/translations_verify_parameters_spec.rb +47 -0
- data/spec/models/upload_create_parameters_spec.rb +113 -0
- data/spec/models/upload_spec.rb +71 -0
- data/spec/models/upload_summary_spec.rb +71 -0
- data/spec/models/user_preview_spec.rb +41 -0
- data/spec/models/user_spec.rb +65 -0
- data/spec/models/webhook_create_parameters_spec.rb +47 -0
- data/spec/models/webhook_spec.rb +65 -0
- data/spec/models/webhook_update_parameters_spec.rb +47 -0
- data/spec/spec_helper.rb +99 -0
- metadata +819 -188
- data/.gitignore +0 -25
- data/.travis.yml +0 -4
- data/Guardfile +0 -29
- data/bin/phrase +0 -8
- data/cacert.pem +0 -3366
- data/lib/ext/all.rb +0 -5
- data/lib/ext/hash.rb +0 -8
- data/lib/ext/object.rb +0 -130
- data/lib/ext/try.rb +0 -57
- data/lib/generators/phrase/install_generator.rb +0 -37
- data/lib/generators/templates/README +0 -11
- data/lib/generators/templates/phrase.rb +0 -21
- data/lib/phrase/adapters/fast_gettext.rb +0 -25
- data/lib/phrase/adapters/i18n.rb +0 -12
- data/lib/phrase/api.rb +0 -7
- data/lib/phrase/api/client.rb +0 -308
- data/lib/phrase/api/client/http.rb +0 -56
- data/lib/phrase/api/config.rb +0 -34
- data/lib/phrase/api/exceptions.rb +0 -9
- data/lib/phrase/api/query_params.rb +0 -22
- data/lib/phrase/backend.rb +0 -7
- data/lib/phrase/backend/base.rb +0 -6
- data/lib/phrase/backend/phrase_service.rb +0 -163
- data/lib/phrase/cache.rb +0 -34
- data/lib/phrase/config.rb +0 -94
- data/lib/phrase/delegate.rb +0 -36
- data/lib/phrase/delegate/fast_gettext.rb +0 -27
- data/lib/phrase/delegate/i18n.rb +0 -166
- data/lib/phrase/engine.rb +0 -14
- data/lib/phrase/formats.rb +0 -172
- data/lib/phrase/formats/angular_translate.rb +0 -19
- data/lib/phrase/formats/csv.rb +0 -19
- data/lib/phrase/formats/custom.rb +0 -40
- data/lib/phrase/formats/gettext.rb +0 -27
- data/lib/phrase/formats/gettext_template.rb +0 -19
- data/lib/phrase/formats/ini.rb +0 -19
- data/lib/phrase/formats/json.rb +0 -19
- data/lib/phrase/formats/laravel.rb +0 -19
- data/lib/phrase/formats/mozilla_properties.rb +0 -8
- data/lib/phrase/formats/nested_json.rb +0 -19
- data/lib/phrase/formats/node_json.rb +0 -23
- data/lib/phrase/formats/php_array.rb +0 -19
- data/lib/phrase/formats/play_properties.rb +0 -15
- data/lib/phrase/formats/plist.rb +0 -19
- data/lib/phrase/formats/properties.rb +0 -19
- data/lib/phrase/formats/properties_xml.rb +0 -19
- data/lib/phrase/formats/qt_phrase_book.rb +0 -19
- data/lib/phrase/formats/qt_translation_source.rb +0 -19
- data/lib/phrase/formats/resx.rb +0 -19
- data/lib/phrase/formats/resx_windowsphone.rb +0 -19
- data/lib/phrase/formats/simple_json.rb +0 -19
- data/lib/phrase/formats/strings.rb +0 -45
- data/lib/phrase/formats/tmx.rb +0 -19
- data/lib/phrase/formats/windows8_resource.rb +0 -19
- data/lib/phrase/formats/xliff.rb +0 -19
- data/lib/phrase/formats/xml.rb +0 -49
- data/lib/phrase/formats/yaml.rb +0 -19
- data/lib/phrase/formats/yaml_symfony.rb +0 -19
- data/lib/phrase/formats/yaml_symfony2.rb +0 -8
- data/lib/phrase/hash_flattener.rb +0 -21
- data/lib/phrase/tool.rb +0 -46
- data/lib/phrase/tool/commands.rb +0 -56
- data/lib/phrase/tool/commands/base.rb +0 -73
- data/lib/phrase/tool/commands/init.rb +0 -51
- data/lib/phrase/tool/commands/pull.rb +0 -109
- data/lib/phrase/tool/commands/push.rb +0 -163
- data/lib/phrase/tool/commands/show_help.rb +0 -26
- data/lib/phrase/tool/commands/show_version.rb +0 -17
- data/lib/phrase/tool/commands/tags.rb +0 -29
- data/lib/phrase/tool/config.rb +0 -120
- data/lib/phrase/tool/encoding_detector.rb +0 -17
- data/lib/phrase/tool/locale.rb +0 -41
- data/lib/phrase/tool/options.rb +0 -32
- data/lib/phrase/tool/options_factory.rb +0 -150
- data/lib/phrase/tool/tag_validator.rb +0 -9
- data/lib/phrase/view_helpers.rb +0 -19
|
@@ -0,0 +1,1353 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class TranslationsApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Create a translation
|
|
11
|
+
# Create a translation.
|
|
12
|
+
# @param project_id [String] Project ID
|
|
13
|
+
# @param translation_create_parameters [TranslationCreateParameters]
|
|
14
|
+
# @param [Hash] opts the optional parameters
|
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
+
# @return [TranslationDetails]
|
|
17
|
+
def translation_create(project_id, translation_create_parameters, opts = {})
|
|
18
|
+
data, _status_code, _headers = translation_create_with_http_info(project_id, translation_create_parameters, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Create a translation
|
|
23
|
+
# Create a translation.
|
|
24
|
+
# @param project_id [String] Project ID
|
|
25
|
+
# @param translation_create_parameters [TranslationCreateParameters]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
29
|
+
def translation_create_with_http_info(project_id, translation_create_parameters, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_create ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'project_id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
35
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_create"
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'translation_create_parameters' is set
|
|
38
|
+
if @api_client.config.client_side_validation && translation_create_parameters.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'translation_create_parameters' when calling TranslationsApi.translation_create"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/projects/{project_id}/translations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
53
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_create_parameters)
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
response = ::Phrase::Response.new(data, headers)
|
|
81
|
+
return response, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Exclude a translation from export
|
|
85
|
+
# Set exclude from export flag on an existing translation.
|
|
86
|
+
# @param project_id [String] Project ID
|
|
87
|
+
# @param id [String] ID
|
|
88
|
+
# @param translation_exclude_parameters [TranslationExcludeParameters]
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
91
|
+
# @return [TranslationDetails]
|
|
92
|
+
def translation_exclude(project_id, id, translation_exclude_parameters, opts = {})
|
|
93
|
+
data, _status_code, _headers = translation_exclude_with_http_info(project_id, id, translation_exclude_parameters, opts)
|
|
94
|
+
data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Exclude a translation from export
|
|
98
|
+
# Set exclude from export flag on an existing translation.
|
|
99
|
+
# @param project_id [String] Project ID
|
|
100
|
+
# @param id [String] ID
|
|
101
|
+
# @param translation_exclude_parameters [TranslationExcludeParameters]
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
104
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
105
|
+
def translation_exclude_with_http_info(project_id, id, translation_exclude_parameters, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_exclude ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'project_id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_exclude"
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_exclude"
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'translation_exclude_parameters' is set
|
|
118
|
+
if @api_client.config.client_side_validation && translation_exclude_parameters.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'translation_exclude_parameters' when calling TranslationsApi.translation_exclude"
|
|
120
|
+
end
|
|
121
|
+
# resource path
|
|
122
|
+
local_var_path = '/projects/{project_id}/translations/{id}/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
123
|
+
|
|
124
|
+
# query parameters
|
|
125
|
+
query_params = opts[:query_params] || {}
|
|
126
|
+
|
|
127
|
+
# header parameters
|
|
128
|
+
header_params = opts[:header_params] || {}
|
|
129
|
+
# HTTP header 'Accept' (if needed)
|
|
130
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
131
|
+
# HTTP header 'Content-Type'
|
|
132
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
133
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
134
|
+
|
|
135
|
+
# form parameters
|
|
136
|
+
form_params = opts[:form_params] || {}
|
|
137
|
+
|
|
138
|
+
# http body (model)
|
|
139
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_exclude_parameters)
|
|
140
|
+
|
|
141
|
+
# return_type
|
|
142
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
143
|
+
|
|
144
|
+
# auth_names
|
|
145
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
146
|
+
|
|
147
|
+
new_options = opts.merge(
|
|
148
|
+
:header_params => header_params,
|
|
149
|
+
:query_params => query_params,
|
|
150
|
+
:form_params => form_params,
|
|
151
|
+
:body => post_body,
|
|
152
|
+
:auth_names => auth_names,
|
|
153
|
+
:return_type => return_type
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
157
|
+
if @api_client.config.debugging
|
|
158
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_exclude\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
159
|
+
end
|
|
160
|
+
response = ::Phrase::Response.new(data, headers)
|
|
161
|
+
return response, status_code, headers
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Revoke exclusion of a translation in export
|
|
165
|
+
# Remove exclude from export flag from an existing translation.
|
|
166
|
+
# @param project_id [String] Project ID
|
|
167
|
+
# @param id [String] ID
|
|
168
|
+
# @param translation_include_parameters [TranslationIncludeParameters]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
171
|
+
# @return [TranslationDetails]
|
|
172
|
+
def translation_include(project_id, id, translation_include_parameters, opts = {})
|
|
173
|
+
data, _status_code, _headers = translation_include_with_http_info(project_id, id, translation_include_parameters, opts)
|
|
174
|
+
data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Revoke exclusion of a translation in export
|
|
178
|
+
# Remove exclude from export flag from an existing translation.
|
|
179
|
+
# @param project_id [String] Project ID
|
|
180
|
+
# @param id [String] ID
|
|
181
|
+
# @param translation_include_parameters [TranslationIncludeParameters]
|
|
182
|
+
# @param [Hash] opts the optional parameters
|
|
183
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
184
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
185
|
+
def translation_include_with_http_info(project_id, id, translation_include_parameters, opts = {})
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_include ...'
|
|
188
|
+
end
|
|
189
|
+
# verify the required parameter 'project_id' is set
|
|
190
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
191
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_include"
|
|
192
|
+
end
|
|
193
|
+
# verify the required parameter 'id' is set
|
|
194
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
195
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_include"
|
|
196
|
+
end
|
|
197
|
+
# verify the required parameter 'translation_include_parameters' is set
|
|
198
|
+
if @api_client.config.client_side_validation && translation_include_parameters.nil?
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'translation_include_parameters' when calling TranslationsApi.translation_include"
|
|
200
|
+
end
|
|
201
|
+
# resource path
|
|
202
|
+
local_var_path = '/projects/{project_id}/translations/{id}/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
203
|
+
|
|
204
|
+
# query parameters
|
|
205
|
+
query_params = opts[:query_params] || {}
|
|
206
|
+
|
|
207
|
+
# header parameters
|
|
208
|
+
header_params = opts[:header_params] || {}
|
|
209
|
+
# HTTP header 'Accept' (if needed)
|
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
211
|
+
# HTTP header 'Content-Type'
|
|
212
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
213
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
|
|
218
|
+
# http body (model)
|
|
219
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_include_parameters)
|
|
220
|
+
|
|
221
|
+
# return_type
|
|
222
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
223
|
+
|
|
224
|
+
# auth_names
|
|
225
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
226
|
+
|
|
227
|
+
new_options = opts.merge(
|
|
228
|
+
:header_params => header_params,
|
|
229
|
+
:query_params => query_params,
|
|
230
|
+
:form_params => form_params,
|
|
231
|
+
:body => post_body,
|
|
232
|
+
:auth_names => auth_names,
|
|
233
|
+
:return_type => return_type
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_include\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
239
|
+
end
|
|
240
|
+
response = ::Phrase::Response.new(data, headers)
|
|
241
|
+
return response, status_code, headers
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Review a translation
|
|
245
|
+
# Mark an existing translation as reviewed.
|
|
246
|
+
# @param project_id [String] Project ID
|
|
247
|
+
# @param id [String] ID
|
|
248
|
+
# @param translation_review_parameters [TranslationReviewParameters]
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
251
|
+
# @return [TranslationDetails]
|
|
252
|
+
def translation_review(project_id, id, translation_review_parameters, opts = {})
|
|
253
|
+
data, _status_code, _headers = translation_review_with_http_info(project_id, id, translation_review_parameters, opts)
|
|
254
|
+
data
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Review a translation
|
|
258
|
+
# Mark an existing translation as reviewed.
|
|
259
|
+
# @param project_id [String] Project ID
|
|
260
|
+
# @param id [String] ID
|
|
261
|
+
# @param translation_review_parameters [TranslationReviewParameters]
|
|
262
|
+
# @param [Hash] opts the optional parameters
|
|
263
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
264
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
265
|
+
def translation_review_with_http_info(project_id, id, translation_review_parameters, opts = {})
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_review ...'
|
|
268
|
+
end
|
|
269
|
+
# verify the required parameter 'project_id' is set
|
|
270
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
271
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_review"
|
|
272
|
+
end
|
|
273
|
+
# verify the required parameter 'id' is set
|
|
274
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
275
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_review"
|
|
276
|
+
end
|
|
277
|
+
# verify the required parameter 'translation_review_parameters' is set
|
|
278
|
+
if @api_client.config.client_side_validation && translation_review_parameters.nil?
|
|
279
|
+
fail ArgumentError, "Missing the required parameter 'translation_review_parameters' when calling TranslationsApi.translation_review"
|
|
280
|
+
end
|
|
281
|
+
# resource path
|
|
282
|
+
local_var_path = '/projects/{project_id}/translations/{id}/review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
283
|
+
|
|
284
|
+
# query parameters
|
|
285
|
+
query_params = opts[:query_params] || {}
|
|
286
|
+
|
|
287
|
+
# header parameters
|
|
288
|
+
header_params = opts[:header_params] || {}
|
|
289
|
+
# HTTP header 'Accept' (if needed)
|
|
290
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
291
|
+
# HTTP header 'Content-Type'
|
|
292
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
293
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
294
|
+
|
|
295
|
+
# form parameters
|
|
296
|
+
form_params = opts[:form_params] || {}
|
|
297
|
+
|
|
298
|
+
# http body (model)
|
|
299
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_review_parameters)
|
|
300
|
+
|
|
301
|
+
# return_type
|
|
302
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
303
|
+
|
|
304
|
+
# auth_names
|
|
305
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
306
|
+
|
|
307
|
+
new_options = opts.merge(
|
|
308
|
+
:header_params => header_params,
|
|
309
|
+
:query_params => query_params,
|
|
310
|
+
:form_params => form_params,
|
|
311
|
+
:body => post_body,
|
|
312
|
+
:auth_names => auth_names,
|
|
313
|
+
:return_type => return_type
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
319
|
+
end
|
|
320
|
+
response = ::Phrase::Response.new(data, headers)
|
|
321
|
+
return response, status_code, headers
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Get a single translation
|
|
325
|
+
# Get details on a single translation.
|
|
326
|
+
# @param project_id [String] Project ID
|
|
327
|
+
# @param id [String] ID
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
330
|
+
# @option opts [String] :branch specify the branch to use
|
|
331
|
+
# @return [TranslationDetails]
|
|
332
|
+
def translation_show(project_id, id, opts = {})
|
|
333
|
+
data, _status_code, _headers = translation_show_with_http_info(project_id, id, opts)
|
|
334
|
+
data
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Get a single translation
|
|
338
|
+
# Get details on a single translation.
|
|
339
|
+
# @param project_id [String] Project ID
|
|
340
|
+
# @param id [String] ID
|
|
341
|
+
# @param [Hash] opts the optional parameters
|
|
342
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
343
|
+
# @option opts [String] :branch specify the branch to use
|
|
344
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
345
|
+
def translation_show_with_http_info(project_id, id, opts = {})
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_show ...'
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'project_id' is set
|
|
350
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_show"
|
|
352
|
+
end
|
|
353
|
+
# verify the required parameter 'id' is set
|
|
354
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
355
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_show"
|
|
356
|
+
end
|
|
357
|
+
# resource path
|
|
358
|
+
local_var_path = '/projects/{project_id}/translations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
359
|
+
|
|
360
|
+
# query parameters
|
|
361
|
+
query_params = opts[:query_params] || {}
|
|
362
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
363
|
+
|
|
364
|
+
# header parameters
|
|
365
|
+
header_params = opts[:header_params] || {}
|
|
366
|
+
# HTTP header 'Accept' (if needed)
|
|
367
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
368
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
369
|
+
|
|
370
|
+
# form parameters
|
|
371
|
+
form_params = opts[:form_params] || {}
|
|
372
|
+
|
|
373
|
+
# http body (model)
|
|
374
|
+
post_body = opts[:body]
|
|
375
|
+
|
|
376
|
+
# return_type
|
|
377
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
378
|
+
|
|
379
|
+
# auth_names
|
|
380
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
381
|
+
|
|
382
|
+
new_options = opts.merge(
|
|
383
|
+
:header_params => header_params,
|
|
384
|
+
:query_params => query_params,
|
|
385
|
+
:form_params => form_params,
|
|
386
|
+
:body => post_body,
|
|
387
|
+
:auth_names => auth_names,
|
|
388
|
+
:return_type => return_type
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
392
|
+
if @api_client.config.debugging
|
|
393
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
394
|
+
end
|
|
395
|
+
response = ::Phrase::Response.new(data, headers)
|
|
396
|
+
return response, status_code, headers
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Mark a translation as unverified
|
|
400
|
+
# Mark an existing translation as unverified.
|
|
401
|
+
# @param project_id [String] Project ID
|
|
402
|
+
# @param id [String] ID
|
|
403
|
+
# @param translation_unverify_parameters [TranslationUnverifyParameters]
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
406
|
+
# @return [TranslationDetails]
|
|
407
|
+
def translation_unverify(project_id, id, translation_unverify_parameters, opts = {})
|
|
408
|
+
data, _status_code, _headers = translation_unverify_with_http_info(project_id, id, translation_unverify_parameters, opts)
|
|
409
|
+
data
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Mark a translation as unverified
|
|
413
|
+
# Mark an existing translation as unverified.
|
|
414
|
+
# @param project_id [String] Project ID
|
|
415
|
+
# @param id [String] ID
|
|
416
|
+
# @param translation_unverify_parameters [TranslationUnverifyParameters]
|
|
417
|
+
# @param [Hash] opts the optional parameters
|
|
418
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
419
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
420
|
+
def translation_unverify_with_http_info(project_id, id, translation_unverify_parameters, opts = {})
|
|
421
|
+
if @api_client.config.debugging
|
|
422
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_unverify ...'
|
|
423
|
+
end
|
|
424
|
+
# verify the required parameter 'project_id' is set
|
|
425
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
426
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_unverify"
|
|
427
|
+
end
|
|
428
|
+
# verify the required parameter 'id' is set
|
|
429
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
430
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_unverify"
|
|
431
|
+
end
|
|
432
|
+
# verify the required parameter 'translation_unverify_parameters' is set
|
|
433
|
+
if @api_client.config.client_side_validation && translation_unverify_parameters.nil?
|
|
434
|
+
fail ArgumentError, "Missing the required parameter 'translation_unverify_parameters' when calling TranslationsApi.translation_unverify"
|
|
435
|
+
end
|
|
436
|
+
# resource path
|
|
437
|
+
local_var_path = '/projects/{project_id}/translations/{id}/unverify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
438
|
+
|
|
439
|
+
# query parameters
|
|
440
|
+
query_params = opts[:query_params] || {}
|
|
441
|
+
|
|
442
|
+
# header parameters
|
|
443
|
+
header_params = opts[:header_params] || {}
|
|
444
|
+
# HTTP header 'Accept' (if needed)
|
|
445
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
446
|
+
# HTTP header 'Content-Type'
|
|
447
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
448
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
449
|
+
|
|
450
|
+
# form parameters
|
|
451
|
+
form_params = opts[:form_params] || {}
|
|
452
|
+
|
|
453
|
+
# http body (model)
|
|
454
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_unverify_parameters)
|
|
455
|
+
|
|
456
|
+
# return_type
|
|
457
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
458
|
+
|
|
459
|
+
# auth_names
|
|
460
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
461
|
+
|
|
462
|
+
new_options = opts.merge(
|
|
463
|
+
:header_params => header_params,
|
|
464
|
+
:query_params => query_params,
|
|
465
|
+
:form_params => form_params,
|
|
466
|
+
:body => post_body,
|
|
467
|
+
:auth_names => auth_names,
|
|
468
|
+
:return_type => return_type
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
472
|
+
if @api_client.config.debugging
|
|
473
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_unverify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
474
|
+
end
|
|
475
|
+
response = ::Phrase::Response.new(data, headers)
|
|
476
|
+
return response, status_code, headers
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# Update a translation
|
|
480
|
+
# Update an existing translation.
|
|
481
|
+
# @param project_id [String] Project ID
|
|
482
|
+
# @param id [String] ID
|
|
483
|
+
# @param translation_update_parameters [TranslationUpdateParameters]
|
|
484
|
+
# @param [Hash] opts the optional parameters
|
|
485
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
486
|
+
# @return [TranslationDetails]
|
|
487
|
+
def translation_update(project_id, id, translation_update_parameters, opts = {})
|
|
488
|
+
data, _status_code, _headers = translation_update_with_http_info(project_id, id, translation_update_parameters, opts)
|
|
489
|
+
data
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Update a translation
|
|
493
|
+
# Update an existing translation.
|
|
494
|
+
# @param project_id [String] Project ID
|
|
495
|
+
# @param id [String] ID
|
|
496
|
+
# @param translation_update_parameters [TranslationUpdateParameters]
|
|
497
|
+
# @param [Hash] opts the optional parameters
|
|
498
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
499
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
500
|
+
def translation_update_with_http_info(project_id, id, translation_update_parameters, opts = {})
|
|
501
|
+
if @api_client.config.debugging
|
|
502
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_update ...'
|
|
503
|
+
end
|
|
504
|
+
# verify the required parameter 'project_id' is set
|
|
505
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
506
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_update"
|
|
507
|
+
end
|
|
508
|
+
# verify the required parameter 'id' is set
|
|
509
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
510
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_update"
|
|
511
|
+
end
|
|
512
|
+
# verify the required parameter 'translation_update_parameters' is set
|
|
513
|
+
if @api_client.config.client_side_validation && translation_update_parameters.nil?
|
|
514
|
+
fail ArgumentError, "Missing the required parameter 'translation_update_parameters' when calling TranslationsApi.translation_update"
|
|
515
|
+
end
|
|
516
|
+
# resource path
|
|
517
|
+
local_var_path = '/projects/{project_id}/translations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
518
|
+
|
|
519
|
+
# query parameters
|
|
520
|
+
query_params = opts[:query_params] || {}
|
|
521
|
+
|
|
522
|
+
# header parameters
|
|
523
|
+
header_params = opts[:header_params] || {}
|
|
524
|
+
# HTTP header 'Accept' (if needed)
|
|
525
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
526
|
+
# HTTP header 'Content-Type'
|
|
527
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
528
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
529
|
+
|
|
530
|
+
# form parameters
|
|
531
|
+
form_params = opts[:form_params] || {}
|
|
532
|
+
|
|
533
|
+
# http body (model)
|
|
534
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_update_parameters)
|
|
535
|
+
|
|
536
|
+
# return_type
|
|
537
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
538
|
+
|
|
539
|
+
# auth_names
|
|
540
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
541
|
+
|
|
542
|
+
new_options = opts.merge(
|
|
543
|
+
:header_params => header_params,
|
|
544
|
+
:query_params => query_params,
|
|
545
|
+
:form_params => form_params,
|
|
546
|
+
:body => post_body,
|
|
547
|
+
:auth_names => auth_names,
|
|
548
|
+
:return_type => return_type
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
552
|
+
if @api_client.config.debugging
|
|
553
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
554
|
+
end
|
|
555
|
+
response = ::Phrase::Response.new(data, headers)
|
|
556
|
+
return response, status_code, headers
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# Verify a translation
|
|
560
|
+
# Verify an existing translation.
|
|
561
|
+
# @param project_id [String] Project ID
|
|
562
|
+
# @param id [String] ID
|
|
563
|
+
# @param translation_verify_parameters [TranslationVerifyParameters]
|
|
564
|
+
# @param [Hash] opts the optional parameters
|
|
565
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
566
|
+
# @return [TranslationDetails]
|
|
567
|
+
def translation_verify(project_id, id, translation_verify_parameters, opts = {})
|
|
568
|
+
data, _status_code, _headers = translation_verify_with_http_info(project_id, id, translation_verify_parameters, opts)
|
|
569
|
+
data
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# Verify a translation
|
|
573
|
+
# Verify an existing translation.
|
|
574
|
+
# @param project_id [String] Project ID
|
|
575
|
+
# @param id [String] ID
|
|
576
|
+
# @param translation_verify_parameters [TranslationVerifyParameters]
|
|
577
|
+
# @param [Hash] opts the optional parameters
|
|
578
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
579
|
+
# @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
|
|
580
|
+
def translation_verify_with_http_info(project_id, id, translation_verify_parameters, opts = {})
|
|
581
|
+
if @api_client.config.debugging
|
|
582
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_verify ...'
|
|
583
|
+
end
|
|
584
|
+
# verify the required parameter 'project_id' is set
|
|
585
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
586
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translation_verify"
|
|
587
|
+
end
|
|
588
|
+
# verify the required parameter 'id' is set
|
|
589
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
590
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TranslationsApi.translation_verify"
|
|
591
|
+
end
|
|
592
|
+
# verify the required parameter 'translation_verify_parameters' is set
|
|
593
|
+
if @api_client.config.client_side_validation && translation_verify_parameters.nil?
|
|
594
|
+
fail ArgumentError, "Missing the required parameter 'translation_verify_parameters' when calling TranslationsApi.translation_verify"
|
|
595
|
+
end
|
|
596
|
+
# resource path
|
|
597
|
+
local_var_path = '/projects/{project_id}/translations/{id}/verify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
598
|
+
|
|
599
|
+
# query parameters
|
|
600
|
+
query_params = opts[:query_params] || {}
|
|
601
|
+
|
|
602
|
+
# header parameters
|
|
603
|
+
header_params = opts[:header_params] || {}
|
|
604
|
+
# HTTP header 'Accept' (if needed)
|
|
605
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
606
|
+
# HTTP header 'Content-Type'
|
|
607
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
608
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
609
|
+
|
|
610
|
+
# form parameters
|
|
611
|
+
form_params = opts[:form_params] || {}
|
|
612
|
+
|
|
613
|
+
# http body (model)
|
|
614
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translation_verify_parameters)
|
|
615
|
+
|
|
616
|
+
# return_type
|
|
617
|
+
return_type = opts[:return_type] || 'TranslationDetails'
|
|
618
|
+
|
|
619
|
+
# auth_names
|
|
620
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
621
|
+
|
|
622
|
+
new_options = opts.merge(
|
|
623
|
+
:header_params => header_params,
|
|
624
|
+
:query_params => query_params,
|
|
625
|
+
:form_params => form_params,
|
|
626
|
+
:body => post_body,
|
|
627
|
+
:auth_names => auth_names,
|
|
628
|
+
:return_type => return_type
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
632
|
+
if @api_client.config.debugging
|
|
633
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translation_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
634
|
+
end
|
|
635
|
+
response = ::Phrase::Response.new(data, headers)
|
|
636
|
+
return response, status_code, headers
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
# List translations by key
|
|
640
|
+
# List translations for a specific key.
|
|
641
|
+
# @param project_id [String] Project ID
|
|
642
|
+
# @param key_id [String] Translation Key ID
|
|
643
|
+
# @param [Hash] opts the optional parameters
|
|
644
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
645
|
+
# @option opts [Integer] :page Page number
|
|
646
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
647
|
+
# @option opts [String] :branch specify the branch to use
|
|
648
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
649
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
650
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
651
|
+
# @return [Array<Translation>]
|
|
652
|
+
def translations_by_key(project_id, key_id, opts = {})
|
|
653
|
+
data, _status_code, _headers = translations_by_key_with_http_info(project_id, key_id, opts)
|
|
654
|
+
data
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
# List translations by key
|
|
658
|
+
# List translations for a specific key.
|
|
659
|
+
# @param project_id [String] Project ID
|
|
660
|
+
# @param key_id [String] Translation Key ID
|
|
661
|
+
# @param [Hash] opts the optional parameters
|
|
662
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
663
|
+
# @option opts [Integer] :page Page number
|
|
664
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
665
|
+
# @option opts [String] :branch specify the branch to use
|
|
666
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
667
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
668
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
669
|
+
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
|
|
670
|
+
def translations_by_key_with_http_info(project_id, key_id, opts = {})
|
|
671
|
+
if @api_client.config.debugging
|
|
672
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_by_key ...'
|
|
673
|
+
end
|
|
674
|
+
# verify the required parameter 'project_id' is set
|
|
675
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
676
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_by_key"
|
|
677
|
+
end
|
|
678
|
+
# verify the required parameter 'key_id' is set
|
|
679
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
680
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling TranslationsApi.translations_by_key"
|
|
681
|
+
end
|
|
682
|
+
# resource path
|
|
683
|
+
local_var_path = '/projects/{project_id}/keys/{key_id}/translations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s))
|
|
684
|
+
|
|
685
|
+
# query parameters
|
|
686
|
+
query_params = opts[:query_params] || {}
|
|
687
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
688
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
689
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
690
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
691
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
692
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
693
|
+
|
|
694
|
+
# header parameters
|
|
695
|
+
header_params = opts[:header_params] || {}
|
|
696
|
+
# HTTP header 'Accept' (if needed)
|
|
697
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
698
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
699
|
+
|
|
700
|
+
# form parameters
|
|
701
|
+
form_params = opts[:form_params] || {}
|
|
702
|
+
|
|
703
|
+
# http body (model)
|
|
704
|
+
post_body = opts[:body]
|
|
705
|
+
|
|
706
|
+
# return_type
|
|
707
|
+
return_type = opts[:return_type] || 'Array<Translation>'
|
|
708
|
+
|
|
709
|
+
# auth_names
|
|
710
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
711
|
+
|
|
712
|
+
new_options = opts.merge(
|
|
713
|
+
:header_params => header_params,
|
|
714
|
+
:query_params => query_params,
|
|
715
|
+
:form_params => form_params,
|
|
716
|
+
:body => post_body,
|
|
717
|
+
:auth_names => auth_names,
|
|
718
|
+
:return_type => return_type
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
722
|
+
if @api_client.config.debugging
|
|
723
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
724
|
+
end
|
|
725
|
+
response = ::Phrase::Response.new(data, headers)
|
|
726
|
+
return response, status_code, headers
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
# List translations by locale
|
|
730
|
+
# List translations for a specific locale. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
731
|
+
# @param project_id [String] Project ID
|
|
732
|
+
# @param locale_id [String] Locale ID
|
|
733
|
+
# @param [Hash] opts the optional parameters
|
|
734
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
735
|
+
# @option opts [Integer] :page Page number
|
|
736
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
737
|
+
# @option opts [String] :branch specify the branch to use
|
|
738
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
739
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
740
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
741
|
+
# @return [Array<Translation>]
|
|
742
|
+
def translations_by_locale(project_id, locale_id, opts = {})
|
|
743
|
+
data, _status_code, _headers = translations_by_locale_with_http_info(project_id, locale_id, opts)
|
|
744
|
+
data
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# List translations by locale
|
|
748
|
+
# List translations for a specific locale. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
749
|
+
# @param project_id [String] Project ID
|
|
750
|
+
# @param locale_id [String] Locale ID
|
|
751
|
+
# @param [Hash] opts the optional parameters
|
|
752
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
753
|
+
# @option opts [Integer] :page Page number
|
|
754
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
755
|
+
# @option opts [String] :branch specify the branch to use
|
|
756
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
757
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
758
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
759
|
+
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
|
|
760
|
+
def translations_by_locale_with_http_info(project_id, locale_id, opts = {})
|
|
761
|
+
if @api_client.config.debugging
|
|
762
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_by_locale ...'
|
|
763
|
+
end
|
|
764
|
+
# verify the required parameter 'project_id' is set
|
|
765
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
766
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_by_locale"
|
|
767
|
+
end
|
|
768
|
+
# verify the required parameter 'locale_id' is set
|
|
769
|
+
if @api_client.config.client_side_validation && locale_id.nil?
|
|
770
|
+
fail ArgumentError, "Missing the required parameter 'locale_id' when calling TranslationsApi.translations_by_locale"
|
|
771
|
+
end
|
|
772
|
+
# resource path
|
|
773
|
+
local_var_path = '/projects/{project_id}/locales/{locale_id}/translations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'locale_id' + '}', CGI.escape(locale_id.to_s))
|
|
774
|
+
|
|
775
|
+
# query parameters
|
|
776
|
+
query_params = opts[:query_params] || {}
|
|
777
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
778
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
779
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
780
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
781
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
782
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
783
|
+
|
|
784
|
+
# header parameters
|
|
785
|
+
header_params = opts[:header_params] || {}
|
|
786
|
+
# HTTP header 'Accept' (if needed)
|
|
787
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
788
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
789
|
+
|
|
790
|
+
# form parameters
|
|
791
|
+
form_params = opts[:form_params] || {}
|
|
792
|
+
|
|
793
|
+
# http body (model)
|
|
794
|
+
post_body = opts[:body]
|
|
795
|
+
|
|
796
|
+
# return_type
|
|
797
|
+
return_type = opts[:return_type] || 'Array<Translation>'
|
|
798
|
+
|
|
799
|
+
# auth_names
|
|
800
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
801
|
+
|
|
802
|
+
new_options = opts.merge(
|
|
803
|
+
:header_params => header_params,
|
|
804
|
+
:query_params => query_params,
|
|
805
|
+
:form_params => form_params,
|
|
806
|
+
:body => post_body,
|
|
807
|
+
:auth_names => auth_names,
|
|
808
|
+
:return_type => return_type
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
812
|
+
if @api_client.config.debugging
|
|
813
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_by_locale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
814
|
+
end
|
|
815
|
+
response = ::Phrase::Response.new(data, headers)
|
|
816
|
+
return response, status_code, headers
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
# Set exclude from export flag on translations selected by query
|
|
820
|
+
# Exclude translations matching query from locale export.
|
|
821
|
+
# @param project_id [String] Project ID
|
|
822
|
+
# @param translations_exclude_parameters [TranslationsExcludeParameters]
|
|
823
|
+
# @param [Hash] opts the optional parameters
|
|
824
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
825
|
+
# @return [AffectedCount]
|
|
826
|
+
def translations_exclude(project_id, translations_exclude_parameters, opts = {})
|
|
827
|
+
data, _status_code, _headers = translations_exclude_with_http_info(project_id, translations_exclude_parameters, opts)
|
|
828
|
+
data
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# Set exclude from export flag on translations selected by query
|
|
832
|
+
# Exclude translations matching query from locale export.
|
|
833
|
+
# @param project_id [String] Project ID
|
|
834
|
+
# @param translations_exclude_parameters [TranslationsExcludeParameters]
|
|
835
|
+
# @param [Hash] opts the optional parameters
|
|
836
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
837
|
+
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
|
838
|
+
def translations_exclude_with_http_info(project_id, translations_exclude_parameters, opts = {})
|
|
839
|
+
if @api_client.config.debugging
|
|
840
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_exclude ...'
|
|
841
|
+
end
|
|
842
|
+
# verify the required parameter 'project_id' is set
|
|
843
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
844
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_exclude"
|
|
845
|
+
end
|
|
846
|
+
# verify the required parameter 'translations_exclude_parameters' is set
|
|
847
|
+
if @api_client.config.client_side_validation && translations_exclude_parameters.nil?
|
|
848
|
+
fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.translations_exclude"
|
|
849
|
+
end
|
|
850
|
+
# resource path
|
|
851
|
+
local_var_path = '/projects/{project_id}/translations/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
852
|
+
|
|
853
|
+
# query parameters
|
|
854
|
+
query_params = opts[:query_params] || {}
|
|
855
|
+
|
|
856
|
+
# header parameters
|
|
857
|
+
header_params = opts[:header_params] || {}
|
|
858
|
+
# HTTP header 'Accept' (if needed)
|
|
859
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
860
|
+
# HTTP header 'Content-Type'
|
|
861
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
862
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
863
|
+
|
|
864
|
+
# form parameters
|
|
865
|
+
form_params = opts[:form_params] || {}
|
|
866
|
+
|
|
867
|
+
# http body (model)
|
|
868
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_exclude_parameters)
|
|
869
|
+
|
|
870
|
+
# return_type
|
|
871
|
+
return_type = opts[:return_type] || 'AffectedCount'
|
|
872
|
+
|
|
873
|
+
# auth_names
|
|
874
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
875
|
+
|
|
876
|
+
new_options = opts.merge(
|
|
877
|
+
:header_params => header_params,
|
|
878
|
+
:query_params => query_params,
|
|
879
|
+
:form_params => form_params,
|
|
880
|
+
:body => post_body,
|
|
881
|
+
:auth_names => auth_names,
|
|
882
|
+
:return_type => return_type
|
|
883
|
+
)
|
|
884
|
+
|
|
885
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
886
|
+
if @api_client.config.debugging
|
|
887
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_exclude\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
888
|
+
end
|
|
889
|
+
response = ::Phrase::Response.new(data, headers)
|
|
890
|
+
return response, status_code, headers
|
|
891
|
+
end
|
|
892
|
+
|
|
893
|
+
# Remove exlude from import flag from translations selected by query
|
|
894
|
+
# Include translations matching query in locale export.
|
|
895
|
+
# @param project_id [String] Project ID
|
|
896
|
+
# @param translations_include_parameters [TranslationsIncludeParameters]
|
|
897
|
+
# @param [Hash] opts the optional parameters
|
|
898
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
899
|
+
# @return [AffectedCount]
|
|
900
|
+
def translations_include(project_id, translations_include_parameters, opts = {})
|
|
901
|
+
data, _status_code, _headers = translations_include_with_http_info(project_id, translations_include_parameters, opts)
|
|
902
|
+
data
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
# Remove exlude from import flag from translations selected by query
|
|
906
|
+
# Include translations matching query in locale export.
|
|
907
|
+
# @param project_id [String] Project ID
|
|
908
|
+
# @param translations_include_parameters [TranslationsIncludeParameters]
|
|
909
|
+
# @param [Hash] opts the optional parameters
|
|
910
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
911
|
+
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
|
912
|
+
def translations_include_with_http_info(project_id, translations_include_parameters, opts = {})
|
|
913
|
+
if @api_client.config.debugging
|
|
914
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_include ...'
|
|
915
|
+
end
|
|
916
|
+
# verify the required parameter 'project_id' is set
|
|
917
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
918
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_include"
|
|
919
|
+
end
|
|
920
|
+
# verify the required parameter 'translations_include_parameters' is set
|
|
921
|
+
if @api_client.config.client_side_validation && translations_include_parameters.nil?
|
|
922
|
+
fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.translations_include"
|
|
923
|
+
end
|
|
924
|
+
# resource path
|
|
925
|
+
local_var_path = '/projects/{project_id}/translations/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
926
|
+
|
|
927
|
+
# query parameters
|
|
928
|
+
query_params = opts[:query_params] || {}
|
|
929
|
+
|
|
930
|
+
# header parameters
|
|
931
|
+
header_params = opts[:header_params] || {}
|
|
932
|
+
# HTTP header 'Accept' (if needed)
|
|
933
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
934
|
+
# HTTP header 'Content-Type'
|
|
935
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
936
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
937
|
+
|
|
938
|
+
# form parameters
|
|
939
|
+
form_params = opts[:form_params] || {}
|
|
940
|
+
|
|
941
|
+
# http body (model)
|
|
942
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_include_parameters)
|
|
943
|
+
|
|
944
|
+
# return_type
|
|
945
|
+
return_type = opts[:return_type] || 'AffectedCount'
|
|
946
|
+
|
|
947
|
+
# auth_names
|
|
948
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
949
|
+
|
|
950
|
+
new_options = opts.merge(
|
|
951
|
+
:header_params => header_params,
|
|
952
|
+
:query_params => query_params,
|
|
953
|
+
:form_params => form_params,
|
|
954
|
+
:body => post_body,
|
|
955
|
+
:auth_names => auth_names,
|
|
956
|
+
:return_type => return_type
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
960
|
+
if @api_client.config.debugging
|
|
961
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_include\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
962
|
+
end
|
|
963
|
+
response = ::Phrase::Response.new(data, headers)
|
|
964
|
+
return response, status_code, headers
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# List all translations
|
|
968
|
+
# List translations for the given project. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
969
|
+
# @param project_id [String] Project ID
|
|
970
|
+
# @param [Hash] opts the optional parameters
|
|
971
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
972
|
+
# @option opts [Integer] :page Page number
|
|
973
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
974
|
+
# @option opts [String] :branch specify the branch to use
|
|
975
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
976
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
977
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
978
|
+
# @return [Array<Translation>]
|
|
979
|
+
def translations_list(project_id, opts = {})
|
|
980
|
+
data, _status_code, _headers = translations_list_with_http_info(project_id, opts)
|
|
981
|
+
data
|
|
982
|
+
end
|
|
983
|
+
|
|
984
|
+
# List all translations
|
|
985
|
+
# List translations for the given project. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
986
|
+
# @param project_id [String] Project ID
|
|
987
|
+
# @param [Hash] opts the optional parameters
|
|
988
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
989
|
+
# @option opts [Integer] :page Page number
|
|
990
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
991
|
+
# @option opts [String] :branch specify the branch to use
|
|
992
|
+
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
|
|
993
|
+
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
|
994
|
+
# @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
|
995
|
+
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
|
|
996
|
+
def translations_list_with_http_info(project_id, opts = {})
|
|
997
|
+
if @api_client.config.debugging
|
|
998
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_list ...'
|
|
999
|
+
end
|
|
1000
|
+
# verify the required parameter 'project_id' is set
|
|
1001
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1002
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_list"
|
|
1003
|
+
end
|
|
1004
|
+
# resource path
|
|
1005
|
+
local_var_path = '/projects/{project_id}/translations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
1006
|
+
|
|
1007
|
+
# query parameters
|
|
1008
|
+
query_params = opts[:query_params] || {}
|
|
1009
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1010
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
1011
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
1012
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1013
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1014
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
1015
|
+
|
|
1016
|
+
# header parameters
|
|
1017
|
+
header_params = opts[:header_params] || {}
|
|
1018
|
+
# HTTP header 'Accept' (if needed)
|
|
1019
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1020
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
1021
|
+
|
|
1022
|
+
# form parameters
|
|
1023
|
+
form_params = opts[:form_params] || {}
|
|
1024
|
+
|
|
1025
|
+
# http body (model)
|
|
1026
|
+
post_body = opts[:body]
|
|
1027
|
+
|
|
1028
|
+
# return_type
|
|
1029
|
+
return_type = opts[:return_type] || 'Array<Translation>'
|
|
1030
|
+
|
|
1031
|
+
# auth_names
|
|
1032
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
1033
|
+
|
|
1034
|
+
new_options = opts.merge(
|
|
1035
|
+
:header_params => header_params,
|
|
1036
|
+
:query_params => query_params,
|
|
1037
|
+
:form_params => form_params,
|
|
1038
|
+
:body => post_body,
|
|
1039
|
+
:auth_names => auth_names,
|
|
1040
|
+
:return_type => return_type
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1044
|
+
if @api_client.config.debugging
|
|
1045
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1046
|
+
end
|
|
1047
|
+
response = ::Phrase::Response.new(data, headers)
|
|
1048
|
+
return response, status_code, headers
|
|
1049
|
+
end
|
|
1050
|
+
|
|
1051
|
+
# Review translations selected by query
|
|
1052
|
+
# Review translations matching query.
|
|
1053
|
+
# @param project_id [String] Project ID
|
|
1054
|
+
# @param translations_review_parameters [TranslationsReviewParameters]
|
|
1055
|
+
# @param [Hash] opts the optional parameters
|
|
1056
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1057
|
+
# @return [AffectedCount]
|
|
1058
|
+
def translations_review(project_id, translations_review_parameters, opts = {})
|
|
1059
|
+
data, _status_code, _headers = translations_review_with_http_info(project_id, translations_review_parameters, opts)
|
|
1060
|
+
data
|
|
1061
|
+
end
|
|
1062
|
+
|
|
1063
|
+
# Review translations selected by query
|
|
1064
|
+
# Review translations matching query.
|
|
1065
|
+
# @param project_id [String] Project ID
|
|
1066
|
+
# @param translations_review_parameters [TranslationsReviewParameters]
|
|
1067
|
+
# @param [Hash] opts the optional parameters
|
|
1068
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1069
|
+
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
|
1070
|
+
def translations_review_with_http_info(project_id, translations_review_parameters, opts = {})
|
|
1071
|
+
if @api_client.config.debugging
|
|
1072
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_review ...'
|
|
1073
|
+
end
|
|
1074
|
+
# verify the required parameter 'project_id' is set
|
|
1075
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_review"
|
|
1077
|
+
end
|
|
1078
|
+
# verify the required parameter 'translations_review_parameters' is set
|
|
1079
|
+
if @api_client.config.client_side_validation && translations_review_parameters.nil?
|
|
1080
|
+
fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.translations_review"
|
|
1081
|
+
end
|
|
1082
|
+
# resource path
|
|
1083
|
+
local_var_path = '/projects/{project_id}/translations/review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
1084
|
+
|
|
1085
|
+
# query parameters
|
|
1086
|
+
query_params = opts[:query_params] || {}
|
|
1087
|
+
|
|
1088
|
+
# header parameters
|
|
1089
|
+
header_params = opts[:header_params] || {}
|
|
1090
|
+
# HTTP header 'Accept' (if needed)
|
|
1091
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1092
|
+
# HTTP header 'Content-Type'
|
|
1093
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1094
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
1095
|
+
|
|
1096
|
+
# form parameters
|
|
1097
|
+
form_params = opts[:form_params] || {}
|
|
1098
|
+
|
|
1099
|
+
# http body (model)
|
|
1100
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_review_parameters)
|
|
1101
|
+
|
|
1102
|
+
# return_type
|
|
1103
|
+
return_type = opts[:return_type] || 'AffectedCount'
|
|
1104
|
+
|
|
1105
|
+
# auth_names
|
|
1106
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
1107
|
+
|
|
1108
|
+
new_options = opts.merge(
|
|
1109
|
+
:header_params => header_params,
|
|
1110
|
+
:query_params => query_params,
|
|
1111
|
+
:form_params => form_params,
|
|
1112
|
+
:body => post_body,
|
|
1113
|
+
:auth_names => auth_names,
|
|
1114
|
+
:return_type => return_type
|
|
1115
|
+
)
|
|
1116
|
+
|
|
1117
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1118
|
+
if @api_client.config.debugging
|
|
1119
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1120
|
+
end
|
|
1121
|
+
response = ::Phrase::Response.new(data, headers)
|
|
1122
|
+
return response, status_code, headers
|
|
1123
|
+
end
|
|
1124
|
+
|
|
1125
|
+
# Search translations
|
|
1126
|
+
# Search translations for the given project. Provides the same search interface as <code>translations#index</code> but allows POST requests to avoid limitations imposed by GET requests. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
1127
|
+
# @param project_id [String] Project ID
|
|
1128
|
+
# @param translations_search_parameters [TranslationsSearchParameters]
|
|
1129
|
+
# @param [Hash] opts the optional parameters
|
|
1130
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1131
|
+
# @option opts [Integer] :page Page number
|
|
1132
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
1133
|
+
# @return [Array<Translation>]
|
|
1134
|
+
def translations_search(project_id, translations_search_parameters, opts = {})
|
|
1135
|
+
data, _status_code, _headers = translations_search_with_http_info(project_id, translations_search_parameters, opts)
|
|
1136
|
+
data
|
|
1137
|
+
end
|
|
1138
|
+
|
|
1139
|
+
# Search translations
|
|
1140
|
+
# Search translations for the given project. Provides the same search interface as <code>translations#index</code> but allows POST requests to avoid limitations imposed by GET requests. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
|
|
1141
|
+
# @param project_id [String] Project ID
|
|
1142
|
+
# @param translations_search_parameters [TranslationsSearchParameters]
|
|
1143
|
+
# @param [Hash] opts the optional parameters
|
|
1144
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1145
|
+
# @option opts [Integer] :page Page number
|
|
1146
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
1147
|
+
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
|
|
1148
|
+
def translations_search_with_http_info(project_id, translations_search_parameters, opts = {})
|
|
1149
|
+
if @api_client.config.debugging
|
|
1150
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_search ...'
|
|
1151
|
+
end
|
|
1152
|
+
# verify the required parameter 'project_id' is set
|
|
1153
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1154
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_search"
|
|
1155
|
+
end
|
|
1156
|
+
# verify the required parameter 'translations_search_parameters' is set
|
|
1157
|
+
if @api_client.config.client_side_validation && translations_search_parameters.nil?
|
|
1158
|
+
fail ArgumentError, "Missing the required parameter 'translations_search_parameters' when calling TranslationsApi.translations_search"
|
|
1159
|
+
end
|
|
1160
|
+
# resource path
|
|
1161
|
+
local_var_path = '/projects/{project_id}/translations/search'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
1162
|
+
|
|
1163
|
+
# query parameters
|
|
1164
|
+
query_params = opts[:query_params] || {}
|
|
1165
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1166
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
1167
|
+
|
|
1168
|
+
# header parameters
|
|
1169
|
+
header_params = opts[:header_params] || {}
|
|
1170
|
+
# HTTP header 'Accept' (if needed)
|
|
1171
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1172
|
+
# HTTP header 'Content-Type'
|
|
1173
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1174
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
1175
|
+
|
|
1176
|
+
# form parameters
|
|
1177
|
+
form_params = opts[:form_params] || {}
|
|
1178
|
+
|
|
1179
|
+
# http body (model)
|
|
1180
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_search_parameters)
|
|
1181
|
+
|
|
1182
|
+
# return_type
|
|
1183
|
+
return_type = opts[:return_type] || 'Array<Translation>'
|
|
1184
|
+
|
|
1185
|
+
# auth_names
|
|
1186
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
1187
|
+
|
|
1188
|
+
new_options = opts.merge(
|
|
1189
|
+
:header_params => header_params,
|
|
1190
|
+
:query_params => query_params,
|
|
1191
|
+
:form_params => form_params,
|
|
1192
|
+
:body => post_body,
|
|
1193
|
+
:auth_names => auth_names,
|
|
1194
|
+
:return_type => return_type
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1198
|
+
if @api_client.config.debugging
|
|
1199
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1200
|
+
end
|
|
1201
|
+
response = ::Phrase::Response.new(data, headers)
|
|
1202
|
+
return response, status_code, headers
|
|
1203
|
+
end
|
|
1204
|
+
|
|
1205
|
+
# Mark translations selected by query as unverified
|
|
1206
|
+
# Mark translations matching query as unverified.
|
|
1207
|
+
# @param project_id [String] Project ID
|
|
1208
|
+
# @param translations_unverify_parameters [TranslationsUnverifyParameters]
|
|
1209
|
+
# @param [Hash] opts the optional parameters
|
|
1210
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1211
|
+
# @return [AffectedCount]
|
|
1212
|
+
def translations_unverify(project_id, translations_unverify_parameters, opts = {})
|
|
1213
|
+
data, _status_code, _headers = translations_unverify_with_http_info(project_id, translations_unverify_parameters, opts)
|
|
1214
|
+
data
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1217
|
+
# Mark translations selected by query as unverified
|
|
1218
|
+
# Mark translations matching query as unverified.
|
|
1219
|
+
# @param project_id [String] Project ID
|
|
1220
|
+
# @param translations_unverify_parameters [TranslationsUnverifyParameters]
|
|
1221
|
+
# @param [Hash] opts the optional parameters
|
|
1222
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1223
|
+
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
|
1224
|
+
def translations_unverify_with_http_info(project_id, translations_unverify_parameters, opts = {})
|
|
1225
|
+
if @api_client.config.debugging
|
|
1226
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unverify ...'
|
|
1227
|
+
end
|
|
1228
|
+
# verify the required parameter 'project_id' is set
|
|
1229
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1230
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unverify"
|
|
1231
|
+
end
|
|
1232
|
+
# verify the required parameter 'translations_unverify_parameters' is set
|
|
1233
|
+
if @api_client.config.client_side_validation && translations_unverify_parameters.nil?
|
|
1234
|
+
fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.translations_unverify"
|
|
1235
|
+
end
|
|
1236
|
+
# resource path
|
|
1237
|
+
local_var_path = '/projects/{project_id}/translations/unverify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
1238
|
+
|
|
1239
|
+
# query parameters
|
|
1240
|
+
query_params = opts[:query_params] || {}
|
|
1241
|
+
|
|
1242
|
+
# header parameters
|
|
1243
|
+
header_params = opts[:header_params] || {}
|
|
1244
|
+
# HTTP header 'Accept' (if needed)
|
|
1245
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1246
|
+
# HTTP header 'Content-Type'
|
|
1247
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1248
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
1249
|
+
|
|
1250
|
+
# form parameters
|
|
1251
|
+
form_params = opts[:form_params] || {}
|
|
1252
|
+
|
|
1253
|
+
# http body (model)
|
|
1254
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_unverify_parameters)
|
|
1255
|
+
|
|
1256
|
+
# return_type
|
|
1257
|
+
return_type = opts[:return_type] || 'AffectedCount'
|
|
1258
|
+
|
|
1259
|
+
# auth_names
|
|
1260
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
1261
|
+
|
|
1262
|
+
new_options = opts.merge(
|
|
1263
|
+
:header_params => header_params,
|
|
1264
|
+
:query_params => query_params,
|
|
1265
|
+
:form_params => form_params,
|
|
1266
|
+
:body => post_body,
|
|
1267
|
+
:auth_names => auth_names,
|
|
1268
|
+
:return_type => return_type
|
|
1269
|
+
)
|
|
1270
|
+
|
|
1271
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1272
|
+
if @api_client.config.debugging
|
|
1273
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_unverify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1274
|
+
end
|
|
1275
|
+
response = ::Phrase::Response.new(data, headers)
|
|
1276
|
+
return response, status_code, headers
|
|
1277
|
+
end
|
|
1278
|
+
|
|
1279
|
+
# Verify translations selected by query
|
|
1280
|
+
# Verify translations matching query.
|
|
1281
|
+
# @param project_id [String] Project ID
|
|
1282
|
+
# @param translations_verify_parameters [TranslationsVerifyParameters]
|
|
1283
|
+
# @param [Hash] opts the optional parameters
|
|
1284
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1285
|
+
# @return [AffectedCount]
|
|
1286
|
+
def translations_verify(project_id, translations_verify_parameters, opts = {})
|
|
1287
|
+
data, _status_code, _headers = translations_verify_with_http_info(project_id, translations_verify_parameters, opts)
|
|
1288
|
+
data
|
|
1289
|
+
end
|
|
1290
|
+
|
|
1291
|
+
# Verify translations selected by query
|
|
1292
|
+
# Verify translations matching query.
|
|
1293
|
+
# @param project_id [String] Project ID
|
|
1294
|
+
# @param translations_verify_parameters [TranslationsVerifyParameters]
|
|
1295
|
+
# @param [Hash] opts the optional parameters
|
|
1296
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
1297
|
+
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
|
1298
|
+
def translations_verify_with_http_info(project_id, translations_verify_parameters, opts = {})
|
|
1299
|
+
if @api_client.config.debugging
|
|
1300
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_verify ...'
|
|
1301
|
+
end
|
|
1302
|
+
# verify the required parameter 'project_id' is set
|
|
1303
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1304
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_verify"
|
|
1305
|
+
end
|
|
1306
|
+
# verify the required parameter 'translations_verify_parameters' is set
|
|
1307
|
+
if @api_client.config.client_side_validation && translations_verify_parameters.nil?
|
|
1308
|
+
fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.translations_verify"
|
|
1309
|
+
end
|
|
1310
|
+
# resource path
|
|
1311
|
+
local_var_path = '/projects/{project_id}/translations/verify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
1312
|
+
|
|
1313
|
+
# query parameters
|
|
1314
|
+
query_params = opts[:query_params] || {}
|
|
1315
|
+
|
|
1316
|
+
# header parameters
|
|
1317
|
+
header_params = opts[:header_params] || {}
|
|
1318
|
+
# HTTP header 'Accept' (if needed)
|
|
1319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1320
|
+
# HTTP header 'Content-Type'
|
|
1321
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1322
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
1323
|
+
|
|
1324
|
+
# form parameters
|
|
1325
|
+
form_params = opts[:form_params] || {}
|
|
1326
|
+
|
|
1327
|
+
# http body (model)
|
|
1328
|
+
post_body = opts[:body] || @api_client.object_to_http_body(translations_verify_parameters)
|
|
1329
|
+
|
|
1330
|
+
# return_type
|
|
1331
|
+
return_type = opts[:return_type] || 'AffectedCount'
|
|
1332
|
+
|
|
1333
|
+
# auth_names
|
|
1334
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
1335
|
+
|
|
1336
|
+
new_options = opts.merge(
|
|
1337
|
+
:header_params => header_params,
|
|
1338
|
+
:query_params => query_params,
|
|
1339
|
+
:form_params => form_params,
|
|
1340
|
+
:body => post_body,
|
|
1341
|
+
:auth_names => auth_names,
|
|
1342
|
+
:return_type => return_type
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1346
|
+
if @api_client.config.debugging
|
|
1347
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1348
|
+
end
|
|
1349
|
+
response = ::Phrase::Response.new(data, headers)
|
|
1350
|
+
return response, status_code, headers
|
|
1351
|
+
end
|
|
1352
|
+
end
|
|
1353
|
+
end
|