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,70 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class FormatsApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# List formats
|
|
11
|
+
# Get a handy list of all localization file formats supported in Phrase.
|
|
12
|
+
# @param [Hash] opts the optional parameters
|
|
13
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
14
|
+
# @return [Array<Format>]
|
|
15
|
+
def formats_list(opts = {})
|
|
16
|
+
data, _status_code, _headers = formats_list_with_http_info(opts)
|
|
17
|
+
data
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# List formats
|
|
21
|
+
# Get a handy list of all localization file formats supported in Phrase.
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
24
|
+
# @return [Array<(Response<(Array<Format>)>, Integer, Hash)>] Response<(Array<Format>)> data, response status code and response headers
|
|
25
|
+
def formats_list_with_http_info(opts = {})
|
|
26
|
+
if @api_client.config.debugging
|
|
27
|
+
@api_client.config.logger.debug 'Calling API: FormatsApi.formats_list ...'
|
|
28
|
+
end
|
|
29
|
+
# resource path
|
|
30
|
+
local_var_path = '/formats'
|
|
31
|
+
|
|
32
|
+
# query parameters
|
|
33
|
+
query_params = opts[:query_params] || {}
|
|
34
|
+
|
|
35
|
+
# header parameters
|
|
36
|
+
header_params = opts[:header_params] || {}
|
|
37
|
+
# HTTP header 'Accept' (if needed)
|
|
38
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
39
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
40
|
+
|
|
41
|
+
# form parameters
|
|
42
|
+
form_params = opts[:form_params] || {}
|
|
43
|
+
|
|
44
|
+
# http body (model)
|
|
45
|
+
post_body = opts[:body]
|
|
46
|
+
|
|
47
|
+
# return_type
|
|
48
|
+
return_type = opts[:return_type] || 'Array<Format>'
|
|
49
|
+
|
|
50
|
+
# auth_names
|
|
51
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
52
|
+
|
|
53
|
+
new_options = opts.merge(
|
|
54
|
+
:header_params => header_params,
|
|
55
|
+
:query_params => query_params,
|
|
56
|
+
:form_params => form_params,
|
|
57
|
+
:body => post_body,
|
|
58
|
+
:auth_names => auth_names,
|
|
59
|
+
:return_type => return_type
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
63
|
+
if @api_client.config.debugging
|
|
64
|
+
@api_client.config.logger.debug "API called: FormatsApi#formats_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
65
|
+
end
|
|
66
|
+
response = ::Phrase::Response.new(data, headers)
|
|
67
|
+
return response, status_code, headers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class GitHubSyncApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Export from Phrase to GitHub
|
|
11
|
+
# Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.
|
|
12
|
+
# @param github_sync_export_parameters [GithubSyncExportParameters]
|
|
13
|
+
# @param [Hash] opts the optional parameters
|
|
14
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
15
|
+
# @return [nil]
|
|
16
|
+
def github_sync_export(github_sync_export_parameters, opts = {})
|
|
17
|
+
data, _status_code, _headers = github_sync_export_with_http_info(github_sync_export_parameters, opts)
|
|
18
|
+
data
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Export from Phrase to GitHub
|
|
22
|
+
# Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.
|
|
23
|
+
# @param github_sync_export_parameters [GithubSyncExportParameters]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
26
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
27
|
+
def github_sync_export_with_http_info(github_sync_export_parameters, opts = {})
|
|
28
|
+
if @api_client.config.debugging
|
|
29
|
+
@api_client.config.logger.debug 'Calling API: GitHubSyncApi.github_sync_export ...'
|
|
30
|
+
end
|
|
31
|
+
# verify the required parameter 'github_sync_export_parameters' is set
|
|
32
|
+
if @api_client.config.client_side_validation && github_sync_export_parameters.nil?
|
|
33
|
+
fail ArgumentError, "Missing the required parameter 'github_sync_export_parameters' when calling GitHubSyncApi.github_sync_export"
|
|
34
|
+
end
|
|
35
|
+
# resource path
|
|
36
|
+
local_var_path = '/github_syncs/export'
|
|
37
|
+
|
|
38
|
+
# query parameters
|
|
39
|
+
query_params = opts[:query_params] || {}
|
|
40
|
+
|
|
41
|
+
# header parameters
|
|
42
|
+
header_params = opts[:header_params] || {}
|
|
43
|
+
# HTTP header 'Accept' (if needed)
|
|
44
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
45
|
+
# HTTP header 'Content-Type'
|
|
46
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
47
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
48
|
+
|
|
49
|
+
# form parameters
|
|
50
|
+
form_params = opts[:form_params] || {}
|
|
51
|
+
|
|
52
|
+
# http body (model)
|
|
53
|
+
post_body = opts[:body] || @api_client.object_to_http_body(github_sync_export_parameters)
|
|
54
|
+
|
|
55
|
+
# return_type
|
|
56
|
+
return_type = opts[:return_type]
|
|
57
|
+
|
|
58
|
+
# auth_names
|
|
59
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
60
|
+
|
|
61
|
+
new_options = opts.merge(
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: GitHubSyncApi#github_sync_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
response = ::Phrase::Response.new(data, headers)
|
|
75
|
+
return response, status_code, headers
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Import to Phrase from GitHub
|
|
79
|
+
# Import files to Phrase from your connected GitHub repository.
|
|
80
|
+
# @param github_sync_import_parameters [GithubSyncImportParameters]
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
83
|
+
# @return [nil]
|
|
84
|
+
def github_sync_import(github_sync_import_parameters, opts = {})
|
|
85
|
+
data, _status_code, _headers = github_sync_import_with_http_info(github_sync_import_parameters, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Import to Phrase from GitHub
|
|
90
|
+
# Import files to Phrase from your connected GitHub repository.
|
|
91
|
+
# @param github_sync_import_parameters [GithubSyncImportParameters]
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
94
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
95
|
+
def github_sync_import_with_http_info(github_sync_import_parameters, opts = {})
|
|
96
|
+
if @api_client.config.debugging
|
|
97
|
+
@api_client.config.logger.debug 'Calling API: GitHubSyncApi.github_sync_import ...'
|
|
98
|
+
end
|
|
99
|
+
# verify the required parameter 'github_sync_import_parameters' is set
|
|
100
|
+
if @api_client.config.client_side_validation && github_sync_import_parameters.nil?
|
|
101
|
+
fail ArgumentError, "Missing the required parameter 'github_sync_import_parameters' when calling GitHubSyncApi.github_sync_import"
|
|
102
|
+
end
|
|
103
|
+
# resource path
|
|
104
|
+
local_var_path = '/github_syncs/import'
|
|
105
|
+
|
|
106
|
+
# query parameters
|
|
107
|
+
query_params = opts[:query_params] || {}
|
|
108
|
+
|
|
109
|
+
# header parameters
|
|
110
|
+
header_params = opts[:header_params] || {}
|
|
111
|
+
# HTTP header 'Accept' (if needed)
|
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
113
|
+
# HTTP header 'Content-Type'
|
|
114
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
115
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:body] || @api_client.object_to_http_body(github_sync_import_parameters)
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:return_type]
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:header_params => header_params,
|
|
131
|
+
:query_params => query_params,
|
|
132
|
+
:form_params => form_params,
|
|
133
|
+
:body => post_body,
|
|
134
|
+
:auth_names => auth_names,
|
|
135
|
+
:return_type => return_type
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug "API called: GitHubSyncApi#github_sync_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
141
|
+
end
|
|
142
|
+
response = ::Phrase::Response.new(data, headers)
|
|
143
|
+
return response, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class GitLabSyncApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Delete single Sync Setting
|
|
11
|
+
# Deletes a single GitLab Sync Setting.
|
|
12
|
+
# @param id [String] ID
|
|
13
|
+
# @param [Hash] opts the optional parameters
|
|
14
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
15
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
16
|
+
# @return [nil]
|
|
17
|
+
def gitlab_sync_delete(id, opts = {})
|
|
18
|
+
data, _status_code, _headers = gitlab_sync_delete_with_http_info(id, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Delete single Sync Setting
|
|
23
|
+
# Deletes a single GitLab Sync Setting.
|
|
24
|
+
# @param id [String] ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
27
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
28
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
29
|
+
def gitlab_sync_delete_with_http_info(id, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_delete ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
35
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_delete"
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
43
|
+
|
|
44
|
+
# header parameters
|
|
45
|
+
header_params = opts[:header_params] || {}
|
|
46
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:return_type]
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => return_type
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
70
|
+
if @api_client.config.debugging
|
|
71
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
72
|
+
end
|
|
73
|
+
response = ::Phrase::Response.new(data, headers)
|
|
74
|
+
return response, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Export from Phrase to GitLab
|
|
78
|
+
# Export translations from Phrase to GitLab according to the .phraseapp.yml file within the GitLab repository.
|
|
79
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
80
|
+
# @param gitlab_sync_export_parameters [GitlabSyncExportParameters]
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
83
|
+
# @return [GitlabSyncExport]
|
|
84
|
+
def gitlab_sync_export(gitlab_sync_id, gitlab_sync_export_parameters, opts = {})
|
|
85
|
+
data, _status_code, _headers = gitlab_sync_export_with_http_info(gitlab_sync_id, gitlab_sync_export_parameters, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Export from Phrase to GitLab
|
|
90
|
+
# Export translations from Phrase to GitLab according to the .phraseapp.yml file within the GitLab repository.
|
|
91
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
92
|
+
# @param gitlab_sync_export_parameters [GitlabSyncExportParameters]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
95
|
+
# @return [Array<(Response<(GitlabSyncExport)>, Integer, Hash)>] Response<(GitlabSyncExport)> data, response status code and response headers
|
|
96
|
+
def gitlab_sync_export_with_http_info(gitlab_sync_id, gitlab_sync_export_parameters, opts = {})
|
|
97
|
+
if @api_client.config.debugging
|
|
98
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_export ...'
|
|
99
|
+
end
|
|
100
|
+
# verify the required parameter 'gitlab_sync_id' is set
|
|
101
|
+
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
|
102
|
+
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_export"
|
|
103
|
+
end
|
|
104
|
+
# verify the required parameter 'gitlab_sync_export_parameters' is set
|
|
105
|
+
if @api_client.config.client_side_validation && gitlab_sync_export_parameters.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'gitlab_sync_export_parameters' when calling GitLabSyncApi.gitlab_sync_export"
|
|
107
|
+
end
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/export'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
|
110
|
+
|
|
111
|
+
# query parameters
|
|
112
|
+
query_params = opts[:query_params] || {}
|
|
113
|
+
|
|
114
|
+
# header parameters
|
|
115
|
+
header_params = opts[:header_params] || {}
|
|
116
|
+
# HTTP header 'Accept' (if needed)
|
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
118
|
+
# HTTP header 'Content-Type'
|
|
119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
120
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:body] || @api_client.object_to_http_body(gitlab_sync_export_parameters)
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:return_type] || 'GitlabSyncExport'
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:header_params => header_params,
|
|
136
|
+
:query_params => query_params,
|
|
137
|
+
:form_params => form_params,
|
|
138
|
+
:body => post_body,
|
|
139
|
+
:auth_names => auth_names,
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
146
|
+
end
|
|
147
|
+
response = ::Phrase::Response.new(data, headers)
|
|
148
|
+
return response, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# History of single Sync Setting
|
|
152
|
+
# List history for a single Sync Setting.
|
|
153
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
156
|
+
# @option opts [Integer] :page Page number
|
|
157
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
158
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
159
|
+
# @return [Array<GitlabSyncHistory>]
|
|
160
|
+
def gitlab_sync_history(gitlab_sync_id, opts = {})
|
|
161
|
+
data, _status_code, _headers = gitlab_sync_history_with_http_info(gitlab_sync_id, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# History of single Sync Setting
|
|
166
|
+
# List history for a single Sync Setting.
|
|
167
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
170
|
+
# @option opts [Integer] :page Page number
|
|
171
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
172
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
173
|
+
# @return [Array<(Response<(Array<GitlabSyncHistory>)>, Integer, Hash)>] Response<(Array<GitlabSyncHistory>)> data, response status code and response headers
|
|
174
|
+
def gitlab_sync_history_with_http_info(gitlab_sync_id, opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_history ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'gitlab_sync_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_history"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/history'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
188
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
189
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
# HTTP header 'Accept' (if needed)
|
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
195
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
196
|
+
|
|
197
|
+
# form parameters
|
|
198
|
+
form_params = opts[:form_params] || {}
|
|
199
|
+
|
|
200
|
+
# http body (model)
|
|
201
|
+
post_body = opts[:body]
|
|
202
|
+
|
|
203
|
+
# return_type
|
|
204
|
+
return_type = opts[:return_type] || 'Array<GitlabSyncHistory>'
|
|
205
|
+
|
|
206
|
+
# auth_names
|
|
207
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
208
|
+
|
|
209
|
+
new_options = opts.merge(
|
|
210
|
+
:header_params => header_params,
|
|
211
|
+
:query_params => query_params,
|
|
212
|
+
:form_params => form_params,
|
|
213
|
+
:body => post_body,
|
|
214
|
+
:auth_names => auth_names,
|
|
215
|
+
:return_type => return_type
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
219
|
+
if @api_client.config.debugging
|
|
220
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
221
|
+
end
|
|
222
|
+
response = ::Phrase::Response.new(data, headers)
|
|
223
|
+
return response, status_code, headers
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Import from GitLab to Phrase
|
|
227
|
+
# Import translations from GitLab to Phrase according to the .phraseapp.yml file within the GitLab repository.
|
|
228
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
229
|
+
# @param gitlab_sync_import_parameters [GitlabSyncImportParameters]
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
232
|
+
# @return [Array<Upload>]
|
|
233
|
+
def gitlab_sync_import(gitlab_sync_id, gitlab_sync_import_parameters, opts = {})
|
|
234
|
+
data, _status_code, _headers = gitlab_sync_import_with_http_info(gitlab_sync_id, gitlab_sync_import_parameters, opts)
|
|
235
|
+
data
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Import from GitLab to Phrase
|
|
239
|
+
# Import translations from GitLab to Phrase according to the .phraseapp.yml file within the GitLab repository.
|
|
240
|
+
# @param gitlab_sync_id [String] Gitlab Sync ID
|
|
241
|
+
# @param gitlab_sync_import_parameters [GitlabSyncImportParameters]
|
|
242
|
+
# @param [Hash] opts the optional parameters
|
|
243
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
244
|
+
# @return [Array<(Response<(Array<Upload>)>, Integer, Hash)>] Response<(Array<Upload>)> data, response status code and response headers
|
|
245
|
+
def gitlab_sync_import_with_http_info(gitlab_sync_id, gitlab_sync_import_parameters, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_import ...'
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'gitlab_sync_id' is set
|
|
250
|
+
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_import"
|
|
252
|
+
end
|
|
253
|
+
# verify the required parameter 'gitlab_sync_import_parameters' is set
|
|
254
|
+
if @api_client.config.client_side_validation && gitlab_sync_import_parameters.nil?
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'gitlab_sync_import_parameters' when calling GitLabSyncApi.gitlab_sync_import"
|
|
256
|
+
end
|
|
257
|
+
# resource path
|
|
258
|
+
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/import'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
|
259
|
+
|
|
260
|
+
# query parameters
|
|
261
|
+
query_params = opts[:query_params] || {}
|
|
262
|
+
|
|
263
|
+
# header parameters
|
|
264
|
+
header_params = opts[:header_params] || {}
|
|
265
|
+
# HTTP header 'Accept' (if needed)
|
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
267
|
+
# HTTP header 'Content-Type'
|
|
268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
269
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
270
|
+
|
|
271
|
+
# form parameters
|
|
272
|
+
form_params = opts[:form_params] || {}
|
|
273
|
+
|
|
274
|
+
# http body (model)
|
|
275
|
+
post_body = opts[:body] || @api_client.object_to_http_body(gitlab_sync_import_parameters)
|
|
276
|
+
|
|
277
|
+
# return_type
|
|
278
|
+
return_type = opts[:return_type] || 'Array<Upload>'
|
|
279
|
+
|
|
280
|
+
# auth_names
|
|
281
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
282
|
+
|
|
283
|
+
new_options = opts.merge(
|
|
284
|
+
:header_params => header_params,
|
|
285
|
+
:query_params => query_params,
|
|
286
|
+
:form_params => form_params,
|
|
287
|
+
:body => post_body,
|
|
288
|
+
:auth_names => auth_names,
|
|
289
|
+
:return_type => return_type
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
293
|
+
if @api_client.config.debugging
|
|
294
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
295
|
+
end
|
|
296
|
+
response = ::Phrase::Response.new(data, headers)
|
|
297
|
+
return response, status_code, headers
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# List GitLab syncs
|
|
301
|
+
# List all GitLab Sync Settings for which synchronisation with Phrase and GitLab is activated.
|
|
302
|
+
# @param [Hash] opts the optional parameters
|
|
303
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
304
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
305
|
+
# @return [Array<GitlabSync>]
|
|
306
|
+
def gitlab_sync_list(opts = {})
|
|
307
|
+
data, _status_code, _headers = gitlab_sync_list_with_http_info(opts)
|
|
308
|
+
data
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# List GitLab syncs
|
|
312
|
+
# List all GitLab Sync Settings for which synchronisation with Phrase and GitLab is activated.
|
|
313
|
+
# @param [Hash] opts the optional parameters
|
|
314
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
315
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
316
|
+
# @return [Array<(Response<(Array<GitlabSync>)>, Integer, Hash)>] Response<(Array<GitlabSync>)> data, response status code and response headers
|
|
317
|
+
def gitlab_sync_list_with_http_info(opts = {})
|
|
318
|
+
if @api_client.config.debugging
|
|
319
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_list ...'
|
|
320
|
+
end
|
|
321
|
+
# resource path
|
|
322
|
+
local_var_path = '/gitlab_syncs'
|
|
323
|
+
|
|
324
|
+
# query parameters
|
|
325
|
+
query_params = opts[:query_params] || {}
|
|
326
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
327
|
+
|
|
328
|
+
# header parameters
|
|
329
|
+
header_params = opts[:header_params] || {}
|
|
330
|
+
# HTTP header 'Accept' (if needed)
|
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
332
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
333
|
+
|
|
334
|
+
# form parameters
|
|
335
|
+
form_params = opts[:form_params] || {}
|
|
336
|
+
|
|
337
|
+
# http body (model)
|
|
338
|
+
post_body = opts[:body]
|
|
339
|
+
|
|
340
|
+
# return_type
|
|
341
|
+
return_type = opts[:return_type] || 'Array<GitlabSync>'
|
|
342
|
+
|
|
343
|
+
# auth_names
|
|
344
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
345
|
+
|
|
346
|
+
new_options = opts.merge(
|
|
347
|
+
:header_params => header_params,
|
|
348
|
+
:query_params => query_params,
|
|
349
|
+
:form_params => form_params,
|
|
350
|
+
:body => post_body,
|
|
351
|
+
:auth_names => auth_names,
|
|
352
|
+
:return_type => return_type
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
356
|
+
if @api_client.config.debugging
|
|
357
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
358
|
+
end
|
|
359
|
+
response = ::Phrase::Response.new(data, headers)
|
|
360
|
+
return response, status_code, headers
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Get single Sync Setting
|
|
364
|
+
# Shows a single GitLab Sync Setting.
|
|
365
|
+
# @param id [String] ID
|
|
366
|
+
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
368
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
369
|
+
# @return [GitlabSync]
|
|
370
|
+
def gitlab_sync_show(id, opts = {})
|
|
371
|
+
data, _status_code, _headers = gitlab_sync_show_with_http_info(id, opts)
|
|
372
|
+
data
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Get single Sync Setting
|
|
376
|
+
# Shows a single GitLab Sync Setting.
|
|
377
|
+
# @param id [String] ID
|
|
378
|
+
# @param [Hash] opts the optional parameters
|
|
379
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
380
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
381
|
+
# @return [Array<(Response<(GitlabSync)>, Integer, Hash)>] Response<(GitlabSync)> data, response status code and response headers
|
|
382
|
+
def gitlab_sync_show_with_http_info(id, opts = {})
|
|
383
|
+
if @api_client.config.debugging
|
|
384
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_show ...'
|
|
385
|
+
end
|
|
386
|
+
# verify the required parameter 'id' is set
|
|
387
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
388
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_show"
|
|
389
|
+
end
|
|
390
|
+
# resource path
|
|
391
|
+
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
392
|
+
|
|
393
|
+
# query parameters
|
|
394
|
+
query_params = opts[:query_params] || {}
|
|
395
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
396
|
+
|
|
397
|
+
# header parameters
|
|
398
|
+
header_params = opts[:header_params] || {}
|
|
399
|
+
# HTTP header 'Accept' (if needed)
|
|
400
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
401
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
402
|
+
|
|
403
|
+
# form parameters
|
|
404
|
+
form_params = opts[:form_params] || {}
|
|
405
|
+
|
|
406
|
+
# http body (model)
|
|
407
|
+
post_body = opts[:body]
|
|
408
|
+
|
|
409
|
+
# return_type
|
|
410
|
+
return_type = opts[:return_type] || 'GitlabSync'
|
|
411
|
+
|
|
412
|
+
# auth_names
|
|
413
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
414
|
+
|
|
415
|
+
new_options = opts.merge(
|
|
416
|
+
:header_params => header_params,
|
|
417
|
+
:query_params => query_params,
|
|
418
|
+
:form_params => form_params,
|
|
419
|
+
:body => post_body,
|
|
420
|
+
:auth_names => auth_names,
|
|
421
|
+
:return_type => return_type
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
425
|
+
if @api_client.config.debugging
|
|
426
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
427
|
+
end
|
|
428
|
+
response = ::Phrase::Response.new(data, headers)
|
|
429
|
+
return response, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Update single Sync Setting
|
|
433
|
+
# Updates a single GitLab Sync Setting.
|
|
434
|
+
# @param id [String] ID
|
|
435
|
+
# @param [Hash] opts the optional parameters
|
|
436
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
437
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
438
|
+
# @option opts [String] :phrase_project_code Code of the related Phrase Project.
|
|
439
|
+
# @option opts [Integer] :gitlab_project_id ID of the related GitLab Project.
|
|
440
|
+
# @option opts [String] :gitlab_branch_name Name of the GitLab Branch.
|
|
441
|
+
# @return [GitlabSync]
|
|
442
|
+
def gitlab_sync_update(id, opts = {})
|
|
443
|
+
data, _status_code, _headers = gitlab_sync_update_with_http_info(id, opts)
|
|
444
|
+
data
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# Update single Sync Setting
|
|
448
|
+
# Updates a single GitLab Sync Setting.
|
|
449
|
+
# @param id [String] ID
|
|
450
|
+
# @param [Hash] opts the optional parameters
|
|
451
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
452
|
+
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
453
|
+
# @option opts [String] :phrase_project_code Code of the related Phrase Project.
|
|
454
|
+
# @option opts [Integer] :gitlab_project_id ID of the related GitLab Project.
|
|
455
|
+
# @option opts [String] :gitlab_branch_name Name of the GitLab Branch.
|
|
456
|
+
# @return [Array<(Response<(GitlabSync)>, Integer, Hash)>] Response<(GitlabSync)> data, response status code and response headers
|
|
457
|
+
def gitlab_sync_update_with_http_info(id, opts = {})
|
|
458
|
+
if @api_client.config.debugging
|
|
459
|
+
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_update ...'
|
|
460
|
+
end
|
|
461
|
+
# verify the required parameter 'id' is set
|
|
462
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
463
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_update"
|
|
464
|
+
end
|
|
465
|
+
# resource path
|
|
466
|
+
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
467
|
+
|
|
468
|
+
# query parameters
|
|
469
|
+
query_params = opts[:query_params] || {}
|
|
470
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
471
|
+
query_params[:'phrase_project_code'] = opts[:'phrase_project_code'] if !opts[:'phrase_project_code'].nil?
|
|
472
|
+
query_params[:'gitlab_project_id'] = opts[:'gitlab_project_id'] if !opts[:'gitlab_project_id'].nil?
|
|
473
|
+
query_params[:'gitlab_branch_name'] = opts[:'gitlab_branch_name'] if !opts[:'gitlab_branch_name'].nil?
|
|
474
|
+
|
|
475
|
+
# header parameters
|
|
476
|
+
header_params = opts[:header_params] || {}
|
|
477
|
+
# HTTP header 'Accept' (if needed)
|
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
479
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
480
|
+
|
|
481
|
+
# form parameters
|
|
482
|
+
form_params = opts[:form_params] || {}
|
|
483
|
+
|
|
484
|
+
# http body (model)
|
|
485
|
+
post_body = opts[:body]
|
|
486
|
+
|
|
487
|
+
# return_type
|
|
488
|
+
return_type = opts[:return_type] || 'GitlabSync'
|
|
489
|
+
|
|
490
|
+
# auth_names
|
|
491
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
492
|
+
|
|
493
|
+
new_options = opts.merge(
|
|
494
|
+
:header_params => header_params,
|
|
495
|
+
:query_params => query_params,
|
|
496
|
+
:form_params => form_params,
|
|
497
|
+
:body => post_body,
|
|
498
|
+
:auth_names => auth_names,
|
|
499
|
+
:return_type => return_type
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
503
|
+
if @api_client.config.debugging
|
|
504
|
+
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
505
|
+
end
|
|
506
|
+
response = ::Phrase::Response.new(data, headers)
|
|
507
|
+
return response, status_code, headers
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
end
|