phrase 0.4.31 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- 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,792 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class JobsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Complete a job
|
11
|
+
# Mark a job as completed.
|
12
|
+
# @param project_id [String] Project ID
|
13
|
+
# @param id [String] ID
|
14
|
+
# @param job_complete_parameters [JobCompleteParameters]
|
15
|
+
# @param [Hash] opts the optional parameters
|
16
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
|
+
# @return [JobDetails]
|
18
|
+
def job_complete(project_id, id, job_complete_parameters, opts = {})
|
19
|
+
data, _status_code, _headers = job_complete_with_http_info(project_id, id, job_complete_parameters, opts)
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
# Complete a job
|
24
|
+
# Mark a job as completed.
|
25
|
+
# @param project_id [String] Project ID
|
26
|
+
# @param id [String] ID
|
27
|
+
# @param job_complete_parameters [JobCompleteParameters]
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
30
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
31
|
+
def job_complete_with_http_info(project_id, id, job_complete_parameters, opts = {})
|
32
|
+
if @api_client.config.debugging
|
33
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_complete ...'
|
34
|
+
end
|
35
|
+
# verify the required parameter 'project_id' is set
|
36
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
37
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_complete"
|
38
|
+
end
|
39
|
+
# verify the required parameter 'id' is set
|
40
|
+
if @api_client.config.client_side_validation && id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_complete"
|
42
|
+
end
|
43
|
+
# verify the required parameter 'job_complete_parameters' is set
|
44
|
+
if @api_client.config.client_side_validation && job_complete_parameters.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'job_complete_parameters' when calling JobsApi.job_complete"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/complete'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_complete_parameters)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'JobDetails'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: JobsApi#job_complete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
response = ::Phrase::Response.new(data, headers)
|
87
|
+
return response, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Create a job
|
91
|
+
# Create a new job.
|
92
|
+
# @param project_id [String] Project ID
|
93
|
+
# @param job_create_parameters [JobCreateParameters]
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
96
|
+
# @return [JobDetails]
|
97
|
+
def job_create(project_id, job_create_parameters, opts = {})
|
98
|
+
data, _status_code, _headers = job_create_with_http_info(project_id, job_create_parameters, opts)
|
99
|
+
data
|
100
|
+
end
|
101
|
+
|
102
|
+
# Create a job
|
103
|
+
# Create a new job.
|
104
|
+
# @param project_id [String] Project ID
|
105
|
+
# @param job_create_parameters [JobCreateParameters]
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
108
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
109
|
+
def job_create_with_http_info(project_id, job_create_parameters, opts = {})
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_create ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'project_id' is set
|
114
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_create"
|
116
|
+
end
|
117
|
+
# verify the required parameter 'job_create_parameters' is set
|
118
|
+
if @api_client.config.client_side_validation && job_create_parameters.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'job_create_parameters' when calling JobsApi.job_create"
|
120
|
+
end
|
121
|
+
# resource path
|
122
|
+
local_var_path = '/projects/{project_id}/jobs'.sub('{' + 'project_id' + '}', CGI.escape(project_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(job_create_parameters)
|
140
|
+
|
141
|
+
# return_type
|
142
|
+
return_type = opts[:return_type] || 'JobDetails'
|
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(:POST, local_var_path, new_options)
|
157
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug "API called: JobsApi#job_create\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
|
+
# Delete a job
|
165
|
+
# Delete an existing job.
|
166
|
+
# @param project_id [String] Project ID
|
167
|
+
# @param id [String] ID
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
170
|
+
# @option opts [String] :branch specify the branch to use
|
171
|
+
# @return [nil]
|
172
|
+
def job_delete(project_id, id, opts = {})
|
173
|
+
data, _status_code, _headers = job_delete_with_http_info(project_id, id, opts)
|
174
|
+
data
|
175
|
+
end
|
176
|
+
|
177
|
+
# Delete a job
|
178
|
+
# Delete an existing job.
|
179
|
+
# @param project_id [String] Project ID
|
180
|
+
# @param id [String] ID
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
183
|
+
# @option opts [String] :branch specify the branch to use
|
184
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
185
|
+
def job_delete_with_http_info(project_id, id, opts = {})
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_delete ...'
|
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 JobsApi.job_delete"
|
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 JobsApi.job_delete"
|
196
|
+
end
|
197
|
+
# resource path
|
198
|
+
local_var_path = '/projects/{project_id}/jobs/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
199
|
+
|
200
|
+
# query parameters
|
201
|
+
query_params = opts[:query_params] || {}
|
202
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
203
|
+
|
204
|
+
# header parameters
|
205
|
+
header_params = opts[:header_params] || {}
|
206
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
207
|
+
|
208
|
+
# form parameters
|
209
|
+
form_params = opts[:form_params] || {}
|
210
|
+
|
211
|
+
# http body (model)
|
212
|
+
post_body = opts[:body]
|
213
|
+
|
214
|
+
# return_type
|
215
|
+
return_type = opts[:return_type]
|
216
|
+
|
217
|
+
# auth_names
|
218
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
219
|
+
|
220
|
+
new_options = opts.merge(
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => return_type
|
227
|
+
)
|
228
|
+
|
229
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: JobsApi#job_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
response = ::Phrase::Response.new(data, headers)
|
234
|
+
return response, status_code, headers
|
235
|
+
end
|
236
|
+
|
237
|
+
# Add keys to job
|
238
|
+
# Add multiple keys to a existing job.
|
239
|
+
# @param project_id [String] Project ID
|
240
|
+
# @param id [String] ID
|
241
|
+
# @param job_keys_create_parameters [JobKeysCreateParameters]
|
242
|
+
# @param [Hash] opts the optional parameters
|
243
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
244
|
+
# @return [JobDetails]
|
245
|
+
def job_keys_create(project_id, id, job_keys_create_parameters, opts = {})
|
246
|
+
data, _status_code, _headers = job_keys_create_with_http_info(project_id, id, job_keys_create_parameters, opts)
|
247
|
+
data
|
248
|
+
end
|
249
|
+
|
250
|
+
# Add keys to job
|
251
|
+
# Add multiple keys to a existing job.
|
252
|
+
# @param project_id [String] Project ID
|
253
|
+
# @param id [String] ID
|
254
|
+
# @param job_keys_create_parameters [JobKeysCreateParameters]
|
255
|
+
# @param [Hash] opts the optional parameters
|
256
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
257
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
258
|
+
def job_keys_create_with_http_info(project_id, id, job_keys_create_parameters, opts = {})
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_keys_create ...'
|
261
|
+
end
|
262
|
+
# verify the required parameter 'project_id' is set
|
263
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_keys_create"
|
265
|
+
end
|
266
|
+
# verify the required parameter 'id' is set
|
267
|
+
if @api_client.config.client_side_validation && id.nil?
|
268
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_keys_create"
|
269
|
+
end
|
270
|
+
# verify the required parameter 'job_keys_create_parameters' is set
|
271
|
+
if @api_client.config.client_side_validation && job_keys_create_parameters.nil?
|
272
|
+
fail ArgumentError, "Missing the required parameter 'job_keys_create_parameters' when calling JobsApi.job_keys_create"
|
273
|
+
end
|
274
|
+
# resource path
|
275
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
276
|
+
|
277
|
+
# query parameters
|
278
|
+
query_params = opts[:query_params] || {}
|
279
|
+
|
280
|
+
# header parameters
|
281
|
+
header_params = opts[:header_params] || {}
|
282
|
+
# HTTP header 'Accept' (if needed)
|
283
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
284
|
+
# HTTP header 'Content-Type'
|
285
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
286
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
287
|
+
|
288
|
+
# form parameters
|
289
|
+
form_params = opts[:form_params] || {}
|
290
|
+
|
291
|
+
# http body (model)
|
292
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_keys_create_parameters)
|
293
|
+
|
294
|
+
# return_type
|
295
|
+
return_type = opts[:return_type] || 'JobDetails'
|
296
|
+
|
297
|
+
# auth_names
|
298
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
299
|
+
|
300
|
+
new_options = opts.merge(
|
301
|
+
:header_params => header_params,
|
302
|
+
:query_params => query_params,
|
303
|
+
:form_params => form_params,
|
304
|
+
:body => post_body,
|
305
|
+
:auth_names => auth_names,
|
306
|
+
:return_type => return_type
|
307
|
+
)
|
308
|
+
|
309
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
310
|
+
if @api_client.config.debugging
|
311
|
+
@api_client.config.logger.debug "API called: JobsApi#job_keys_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
312
|
+
end
|
313
|
+
response = ::Phrase::Response.new(data, headers)
|
314
|
+
return response, status_code, headers
|
315
|
+
end
|
316
|
+
|
317
|
+
# Remove keys from job
|
318
|
+
# Remove multiple keys from existing job.
|
319
|
+
# @param project_id [String] Project ID
|
320
|
+
# @param id [String] ID
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
323
|
+
# @option opts [String] :branch specify the branch to use
|
324
|
+
# @option opts [Array<String>] :translation_key_ids ids of keys that should added to the job
|
325
|
+
# @return [nil]
|
326
|
+
def job_keys_delete(project_id, id, opts = {})
|
327
|
+
data, _status_code, _headers = job_keys_delete_with_http_info(project_id, id, opts)
|
328
|
+
data
|
329
|
+
end
|
330
|
+
|
331
|
+
# Remove keys from job
|
332
|
+
# Remove multiple keys from existing job.
|
333
|
+
# @param project_id [String] Project ID
|
334
|
+
# @param id [String] ID
|
335
|
+
# @param [Hash] opts the optional parameters
|
336
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
337
|
+
# @option opts [String] :branch specify the branch to use
|
338
|
+
# @option opts [Array<String>] :translation_key_ids ids of keys that should added to the job
|
339
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
340
|
+
def job_keys_delete_with_http_info(project_id, id, opts = {})
|
341
|
+
if @api_client.config.debugging
|
342
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_keys_delete ...'
|
343
|
+
end
|
344
|
+
# verify the required parameter 'project_id' is set
|
345
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
346
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_keys_delete"
|
347
|
+
end
|
348
|
+
# verify the required parameter 'id' is set
|
349
|
+
if @api_client.config.client_side_validation && id.nil?
|
350
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_keys_delete"
|
351
|
+
end
|
352
|
+
# resource path
|
353
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
354
|
+
|
355
|
+
# query parameters
|
356
|
+
query_params = opts[:query_params] || {}
|
357
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
358
|
+
query_params[:'translation_key_ids'] = @api_client.build_collection_param(opts[:'translation_key_ids'], :multi) if !opts[:'translation_key_ids'].nil?
|
359
|
+
|
360
|
+
# header parameters
|
361
|
+
header_params = opts[:header_params] || {}
|
362
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
363
|
+
|
364
|
+
# form parameters
|
365
|
+
form_params = opts[:form_params] || {}
|
366
|
+
|
367
|
+
# http body (model)
|
368
|
+
post_body = opts[:body]
|
369
|
+
|
370
|
+
# return_type
|
371
|
+
return_type = opts[:return_type]
|
372
|
+
|
373
|
+
# auth_names
|
374
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
375
|
+
|
376
|
+
new_options = opts.merge(
|
377
|
+
:header_params => header_params,
|
378
|
+
:query_params => query_params,
|
379
|
+
:form_params => form_params,
|
380
|
+
:body => post_body,
|
381
|
+
:auth_names => auth_names,
|
382
|
+
:return_type => return_type
|
383
|
+
)
|
384
|
+
|
385
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
386
|
+
if @api_client.config.debugging
|
387
|
+
@api_client.config.logger.debug "API called: JobsApi#job_keys_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
388
|
+
end
|
389
|
+
response = ::Phrase::Response.new(data, headers)
|
390
|
+
return response, status_code, headers
|
391
|
+
end
|
392
|
+
|
393
|
+
# Reopen a job
|
394
|
+
# Mark a job as uncompleted.
|
395
|
+
# @param project_id [String] Project ID
|
396
|
+
# @param id [String] ID
|
397
|
+
# @param job_reopen_parameters [JobReopenParameters]
|
398
|
+
# @param [Hash] opts the optional parameters
|
399
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
400
|
+
# @return [JobDetails]
|
401
|
+
def job_reopen(project_id, id, job_reopen_parameters, opts = {})
|
402
|
+
data, _status_code, _headers = job_reopen_with_http_info(project_id, id, job_reopen_parameters, opts)
|
403
|
+
data
|
404
|
+
end
|
405
|
+
|
406
|
+
# Reopen a job
|
407
|
+
# Mark a job as uncompleted.
|
408
|
+
# @param project_id [String] Project ID
|
409
|
+
# @param id [String] ID
|
410
|
+
# @param job_reopen_parameters [JobReopenParameters]
|
411
|
+
# @param [Hash] opts the optional parameters
|
412
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
413
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
414
|
+
def job_reopen_with_http_info(project_id, id, job_reopen_parameters, opts = {})
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_reopen ...'
|
417
|
+
end
|
418
|
+
# verify the required parameter 'project_id' is set
|
419
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
420
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_reopen"
|
421
|
+
end
|
422
|
+
# verify the required parameter 'id' is set
|
423
|
+
if @api_client.config.client_side_validation && id.nil?
|
424
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_reopen"
|
425
|
+
end
|
426
|
+
# verify the required parameter 'job_reopen_parameters' is set
|
427
|
+
if @api_client.config.client_side_validation && job_reopen_parameters.nil?
|
428
|
+
fail ArgumentError, "Missing the required parameter 'job_reopen_parameters' when calling JobsApi.job_reopen"
|
429
|
+
end
|
430
|
+
# resource path
|
431
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/reopen'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
432
|
+
|
433
|
+
# query parameters
|
434
|
+
query_params = opts[:query_params] || {}
|
435
|
+
|
436
|
+
# header parameters
|
437
|
+
header_params = opts[:header_params] || {}
|
438
|
+
# HTTP header 'Accept' (if needed)
|
439
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
440
|
+
# HTTP header 'Content-Type'
|
441
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
442
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
443
|
+
|
444
|
+
# form parameters
|
445
|
+
form_params = opts[:form_params] || {}
|
446
|
+
|
447
|
+
# http body (model)
|
448
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_reopen_parameters)
|
449
|
+
|
450
|
+
# return_type
|
451
|
+
return_type = opts[:return_type] || 'JobDetails'
|
452
|
+
|
453
|
+
# auth_names
|
454
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
455
|
+
|
456
|
+
new_options = opts.merge(
|
457
|
+
:header_params => header_params,
|
458
|
+
:query_params => query_params,
|
459
|
+
:form_params => form_params,
|
460
|
+
:body => post_body,
|
461
|
+
:auth_names => auth_names,
|
462
|
+
:return_type => return_type
|
463
|
+
)
|
464
|
+
|
465
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug "API called: JobsApi#job_reopen\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
468
|
+
end
|
469
|
+
response = ::Phrase::Response.new(data, headers)
|
470
|
+
return response, status_code, headers
|
471
|
+
end
|
472
|
+
|
473
|
+
# Get a single job
|
474
|
+
# Get details on a single job for a given project.
|
475
|
+
# @param project_id [String] Project ID
|
476
|
+
# @param id [String] ID
|
477
|
+
# @param [Hash] opts the optional parameters
|
478
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
479
|
+
# @option opts [String] :branch specify the branch to use
|
480
|
+
# @return [JobDetails]
|
481
|
+
def job_show(project_id, id, opts = {})
|
482
|
+
data, _status_code, _headers = job_show_with_http_info(project_id, id, opts)
|
483
|
+
data
|
484
|
+
end
|
485
|
+
|
486
|
+
# Get a single job
|
487
|
+
# Get details on a single job for a given project.
|
488
|
+
# @param project_id [String] Project ID
|
489
|
+
# @param id [String] ID
|
490
|
+
# @param [Hash] opts the optional parameters
|
491
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
492
|
+
# @option opts [String] :branch specify the branch to use
|
493
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
494
|
+
def job_show_with_http_info(project_id, id, opts = {})
|
495
|
+
if @api_client.config.debugging
|
496
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_show ...'
|
497
|
+
end
|
498
|
+
# verify the required parameter 'project_id' is set
|
499
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
500
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_show"
|
501
|
+
end
|
502
|
+
# verify the required parameter 'id' is set
|
503
|
+
if @api_client.config.client_side_validation && id.nil?
|
504
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_show"
|
505
|
+
end
|
506
|
+
# resource path
|
507
|
+
local_var_path = '/projects/{project_id}/jobs/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
508
|
+
|
509
|
+
# query parameters
|
510
|
+
query_params = opts[:query_params] || {}
|
511
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = opts[:header_params] || {}
|
515
|
+
# HTTP header 'Accept' (if needed)
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
517
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
518
|
+
|
519
|
+
# form parameters
|
520
|
+
form_params = opts[:form_params] || {}
|
521
|
+
|
522
|
+
# http body (model)
|
523
|
+
post_body = opts[:body]
|
524
|
+
|
525
|
+
# return_type
|
526
|
+
return_type = opts[:return_type] || 'JobDetails'
|
527
|
+
|
528
|
+
# auth_names
|
529
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
530
|
+
|
531
|
+
new_options = opts.merge(
|
532
|
+
:header_params => header_params,
|
533
|
+
:query_params => query_params,
|
534
|
+
:form_params => form_params,
|
535
|
+
:body => post_body,
|
536
|
+
:auth_names => auth_names,
|
537
|
+
:return_type => return_type
|
538
|
+
)
|
539
|
+
|
540
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
541
|
+
if @api_client.config.debugging
|
542
|
+
@api_client.config.logger.debug "API called: JobsApi#job_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
543
|
+
end
|
544
|
+
response = ::Phrase::Response.new(data, headers)
|
545
|
+
return response, status_code, headers
|
546
|
+
end
|
547
|
+
|
548
|
+
# Start a job
|
549
|
+
# Starts an existing job in state draft.
|
550
|
+
# @param project_id [String] Project ID
|
551
|
+
# @param id [String] ID
|
552
|
+
# @param job_start_parameters [JobStartParameters]
|
553
|
+
# @param [Hash] opts the optional parameters
|
554
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
555
|
+
# @return [JobDetails]
|
556
|
+
def job_start(project_id, id, job_start_parameters, opts = {})
|
557
|
+
data, _status_code, _headers = job_start_with_http_info(project_id, id, job_start_parameters, opts)
|
558
|
+
data
|
559
|
+
end
|
560
|
+
|
561
|
+
# Start a job
|
562
|
+
# Starts an existing job in state draft.
|
563
|
+
# @param project_id [String] Project ID
|
564
|
+
# @param id [String] ID
|
565
|
+
# @param job_start_parameters [JobStartParameters]
|
566
|
+
# @param [Hash] opts the optional parameters
|
567
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
568
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
569
|
+
def job_start_with_http_info(project_id, id, job_start_parameters, opts = {})
|
570
|
+
if @api_client.config.debugging
|
571
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_start ...'
|
572
|
+
end
|
573
|
+
# verify the required parameter 'project_id' is set
|
574
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
575
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_start"
|
576
|
+
end
|
577
|
+
# verify the required parameter 'id' is set
|
578
|
+
if @api_client.config.client_side_validation && id.nil?
|
579
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_start"
|
580
|
+
end
|
581
|
+
# verify the required parameter 'job_start_parameters' is set
|
582
|
+
if @api_client.config.client_side_validation && job_start_parameters.nil?
|
583
|
+
fail ArgumentError, "Missing the required parameter 'job_start_parameters' when calling JobsApi.job_start"
|
584
|
+
end
|
585
|
+
# resource path
|
586
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/start'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
587
|
+
|
588
|
+
# query parameters
|
589
|
+
query_params = opts[:query_params] || {}
|
590
|
+
|
591
|
+
# header parameters
|
592
|
+
header_params = opts[:header_params] || {}
|
593
|
+
# HTTP header 'Accept' (if needed)
|
594
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
595
|
+
# HTTP header 'Content-Type'
|
596
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
597
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
598
|
+
|
599
|
+
# form parameters
|
600
|
+
form_params = opts[:form_params] || {}
|
601
|
+
|
602
|
+
# http body (model)
|
603
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_start_parameters)
|
604
|
+
|
605
|
+
# return_type
|
606
|
+
return_type = opts[:return_type] || 'JobDetails'
|
607
|
+
|
608
|
+
# auth_names
|
609
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
610
|
+
|
611
|
+
new_options = opts.merge(
|
612
|
+
:header_params => header_params,
|
613
|
+
:query_params => query_params,
|
614
|
+
:form_params => form_params,
|
615
|
+
:body => post_body,
|
616
|
+
:auth_names => auth_names,
|
617
|
+
:return_type => return_type
|
618
|
+
)
|
619
|
+
|
620
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
621
|
+
if @api_client.config.debugging
|
622
|
+
@api_client.config.logger.debug "API called: JobsApi#job_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
623
|
+
end
|
624
|
+
response = ::Phrase::Response.new(data, headers)
|
625
|
+
return response, status_code, headers
|
626
|
+
end
|
627
|
+
|
628
|
+
# Update a job
|
629
|
+
# Update an existing job.
|
630
|
+
# @param project_id [String] Project ID
|
631
|
+
# @param id [String] ID
|
632
|
+
# @param job_update_parameters [JobUpdateParameters]
|
633
|
+
# @param [Hash] opts the optional parameters
|
634
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
635
|
+
# @return [JobDetails]
|
636
|
+
def job_update(project_id, id, job_update_parameters, opts = {})
|
637
|
+
data, _status_code, _headers = job_update_with_http_info(project_id, id, job_update_parameters, opts)
|
638
|
+
data
|
639
|
+
end
|
640
|
+
|
641
|
+
# Update a job
|
642
|
+
# Update an existing job.
|
643
|
+
# @param project_id [String] Project ID
|
644
|
+
# @param id [String] ID
|
645
|
+
# @param job_update_parameters [JobUpdateParameters]
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
648
|
+
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
649
|
+
def job_update_with_http_info(project_id, id, job_update_parameters, opts = {})
|
650
|
+
if @api_client.config.debugging
|
651
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_update ...'
|
652
|
+
end
|
653
|
+
# verify the required parameter 'project_id' is set
|
654
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
655
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_update"
|
656
|
+
end
|
657
|
+
# verify the required parameter 'id' is set
|
658
|
+
if @api_client.config.client_side_validation && id.nil?
|
659
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_update"
|
660
|
+
end
|
661
|
+
# verify the required parameter 'job_update_parameters' is set
|
662
|
+
if @api_client.config.client_side_validation && job_update_parameters.nil?
|
663
|
+
fail ArgumentError, "Missing the required parameter 'job_update_parameters' when calling JobsApi.job_update"
|
664
|
+
end
|
665
|
+
# resource path
|
666
|
+
local_var_path = '/projects/{project_id}/jobs/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
667
|
+
|
668
|
+
# query parameters
|
669
|
+
query_params = opts[:query_params] || {}
|
670
|
+
|
671
|
+
# header parameters
|
672
|
+
header_params = opts[:header_params] || {}
|
673
|
+
# HTTP header 'Accept' (if needed)
|
674
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
675
|
+
# HTTP header 'Content-Type'
|
676
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
677
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
678
|
+
|
679
|
+
# form parameters
|
680
|
+
form_params = opts[:form_params] || {}
|
681
|
+
|
682
|
+
# http body (model)
|
683
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_update_parameters)
|
684
|
+
|
685
|
+
# return_type
|
686
|
+
return_type = opts[:return_type] || 'JobDetails'
|
687
|
+
|
688
|
+
# auth_names
|
689
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
690
|
+
|
691
|
+
new_options = opts.merge(
|
692
|
+
:header_params => header_params,
|
693
|
+
:query_params => query_params,
|
694
|
+
:form_params => form_params,
|
695
|
+
:body => post_body,
|
696
|
+
:auth_names => auth_names,
|
697
|
+
:return_type => return_type
|
698
|
+
)
|
699
|
+
|
700
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
701
|
+
if @api_client.config.debugging
|
702
|
+
@api_client.config.logger.debug "API called: JobsApi#job_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
703
|
+
end
|
704
|
+
response = ::Phrase::Response.new(data, headers)
|
705
|
+
return response, status_code, headers
|
706
|
+
end
|
707
|
+
|
708
|
+
# List jobs
|
709
|
+
# List all jobs for the given project.
|
710
|
+
# @param project_id [String] Project ID
|
711
|
+
# @param [Hash] opts the optional parameters
|
712
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
713
|
+
# @option opts [Integer] :page Page number
|
714
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
715
|
+
# @option opts [String] :branch specify the branch to use
|
716
|
+
# @option opts [String] :owned_by filter by user owning job
|
717
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
718
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
719
|
+
# @return [Array<Job>]
|
720
|
+
def jobs_list(project_id, opts = {})
|
721
|
+
data, _status_code, _headers = jobs_list_with_http_info(project_id, opts)
|
722
|
+
data
|
723
|
+
end
|
724
|
+
|
725
|
+
# List jobs
|
726
|
+
# List all jobs for the given project.
|
727
|
+
# @param project_id [String] Project ID
|
728
|
+
# @param [Hash] opts the optional parameters
|
729
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
730
|
+
# @option opts [Integer] :page Page number
|
731
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
732
|
+
# @option opts [String] :branch specify the branch to use
|
733
|
+
# @option opts [String] :owned_by filter by user owning job
|
734
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
735
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
736
|
+
# @return [Array<(Response<(Array<Job>)>, Integer, Hash)>] Response<(Array<Job>)> data, response status code and response headers
|
737
|
+
def jobs_list_with_http_info(project_id, opts = {})
|
738
|
+
if @api_client.config.debugging
|
739
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.jobs_list ...'
|
740
|
+
end
|
741
|
+
# verify the required parameter 'project_id' is set
|
742
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
743
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.jobs_list"
|
744
|
+
end
|
745
|
+
# resource path
|
746
|
+
local_var_path = '/projects/{project_id}/jobs'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
747
|
+
|
748
|
+
# query parameters
|
749
|
+
query_params = opts[:query_params] || {}
|
750
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
751
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
752
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
753
|
+
query_params[:'owned_by'] = opts[:'owned_by'] if !opts[:'owned_by'].nil?
|
754
|
+
query_params[:'assigned_to'] = opts[:'assigned_to'] if !opts[:'assigned_to'].nil?
|
755
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
756
|
+
|
757
|
+
# header parameters
|
758
|
+
header_params = opts[:header_params] || {}
|
759
|
+
# HTTP header 'Accept' (if needed)
|
760
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
761
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
762
|
+
|
763
|
+
# form parameters
|
764
|
+
form_params = opts[:form_params] || {}
|
765
|
+
|
766
|
+
# http body (model)
|
767
|
+
post_body = opts[:body]
|
768
|
+
|
769
|
+
# return_type
|
770
|
+
return_type = opts[:return_type] || 'Array<Job>'
|
771
|
+
|
772
|
+
# auth_names
|
773
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
774
|
+
|
775
|
+
new_options = opts.merge(
|
776
|
+
:header_params => header_params,
|
777
|
+
:query_params => query_params,
|
778
|
+
:form_params => form_params,
|
779
|
+
:body => post_body,
|
780
|
+
:auth_names => auth_names,
|
781
|
+
:return_type => return_type
|
782
|
+
)
|
783
|
+
|
784
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
785
|
+
if @api_client.config.debugging
|
786
|
+
@api_client.config.logger.debug "API called: JobsApi#jobs_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
787
|
+
end
|
788
|
+
response = ::Phrase::Response.new(data, headers)
|
789
|
+
return response, status_code, headers
|
790
|
+
end
|
791
|
+
end
|
792
|
+
end
|