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,381 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class BlacklistedKeysApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Create a blacklisted key
|
|
11
|
+
# Create a new rule for blacklisting keys.
|
|
12
|
+
# @param project_id [String] Project ID
|
|
13
|
+
# @param blacklisted_key_create_parameters [BlacklistedKeyCreateParameters]
|
|
14
|
+
# @param [Hash] opts the optional parameters
|
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
+
# @return [BlacklistedKey]
|
|
17
|
+
def blacklisted_key_create(project_id, blacklisted_key_create_parameters, opts = {})
|
|
18
|
+
data, _status_code, _headers = blacklisted_key_create_with_http_info(project_id, blacklisted_key_create_parameters, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Create a blacklisted key
|
|
23
|
+
# Create a new rule for blacklisting keys.
|
|
24
|
+
# @param project_id [String] Project ID
|
|
25
|
+
# @param blacklisted_key_create_parameters [BlacklistedKeyCreateParameters]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
+
# @return [Array<(Response<(BlacklistedKey)>, Integer, Hash)>] Response<(BlacklistedKey)> data, response status code and response headers
|
|
29
|
+
def blacklisted_key_create_with_http_info(project_id, blacklisted_key_create_parameters, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: BlacklistedKeysApi.blacklisted_key_create ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'project_id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
35
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BlacklistedKeysApi.blacklisted_key_create"
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'blacklisted_key_create_parameters' is set
|
|
38
|
+
if @api_client.config.client_side_validation && blacklisted_key_create_parameters.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'blacklisted_key_create_parameters' when calling BlacklistedKeysApi.blacklisted_key_create"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/projects/{project_id}/blacklisted_keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
53
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(blacklisted_key_create_parameters)
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:return_type] || 'BlacklistedKey'
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: BlacklistedKeysApi#blacklisted_key_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
response = ::Phrase::Response.new(data, headers)
|
|
81
|
+
return response, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Delete a blacklisted key
|
|
85
|
+
# Delete an existing rule for blacklisting keys.
|
|
86
|
+
# @param project_id [String] Project ID
|
|
87
|
+
# @param id [String] ID
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
90
|
+
# @return [nil]
|
|
91
|
+
def blacklisted_key_delete(project_id, id, opts = {})
|
|
92
|
+
data, _status_code, _headers = blacklisted_key_delete_with_http_info(project_id, id, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete a blacklisted key
|
|
97
|
+
# Delete an existing rule for blacklisting keys.
|
|
98
|
+
# @param project_id [String] Project ID
|
|
99
|
+
# @param id [String] ID
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
103
|
+
def blacklisted_key_delete_with_http_info(project_id, id, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: BlacklistedKeysApi.blacklisted_key_delete ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'project_id' is set
|
|
108
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BlacklistedKeysApi.blacklisted_key_delete"
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'id' is set
|
|
112
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BlacklistedKeysApi.blacklisted_key_delete"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/projects/{project_id}/blacklisted_keys/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:return_type]
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: BlacklistedKeysApi#blacklisted_key_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
response = ::Phrase::Response.new(data, headers)
|
|
151
|
+
return response, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Get a single blacklisted key
|
|
155
|
+
# Get details on a single rule for blacklisting keys for a given project.
|
|
156
|
+
# @param project_id [String] Project ID
|
|
157
|
+
# @param id [String] ID
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
160
|
+
# @return [BlacklistedKey]
|
|
161
|
+
def blacklisted_key_show(project_id, id, opts = {})
|
|
162
|
+
data, _status_code, _headers = blacklisted_key_show_with_http_info(project_id, id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get a single blacklisted key
|
|
167
|
+
# Get details on a single rule for blacklisting keys for a given project.
|
|
168
|
+
# @param project_id [String] Project ID
|
|
169
|
+
# @param id [String] ID
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
172
|
+
# @return [Array<(Response<(BlacklistedKey)>, Integer, Hash)>] Response<(BlacklistedKey)> data, response status code and response headers
|
|
173
|
+
def blacklisted_key_show_with_http_info(project_id, id, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: BlacklistedKeysApi.blacklisted_key_show ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'project_id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BlacklistedKeysApi.blacklisted_key_show"
|
|
180
|
+
end
|
|
181
|
+
# verify the required parameter 'id' is set
|
|
182
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BlacklistedKeysApi.blacklisted_key_show"
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/projects/{project_id}/blacklisted_keys/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
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] || 'BlacklistedKey'
|
|
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: BlacklistedKeysApi#blacklisted_key_show\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
|
+
# Update a blacklisted key
|
|
227
|
+
# Update an existing rule for blacklisting keys.
|
|
228
|
+
# @param project_id [String] Project ID
|
|
229
|
+
# @param id [String] ID
|
|
230
|
+
# @param blacklisted_key_update_parameters [BlacklistedKeyUpdateParameters]
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
233
|
+
# @return [BlacklistedKey]
|
|
234
|
+
def blacklisted_key_update(project_id, id, blacklisted_key_update_parameters, opts = {})
|
|
235
|
+
data, _status_code, _headers = blacklisted_key_update_with_http_info(project_id, id, blacklisted_key_update_parameters, opts)
|
|
236
|
+
data
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Update a blacklisted key
|
|
240
|
+
# Update an existing rule for blacklisting keys.
|
|
241
|
+
# @param project_id [String] Project ID
|
|
242
|
+
# @param id [String] ID
|
|
243
|
+
# @param blacklisted_key_update_parameters [BlacklistedKeyUpdateParameters]
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
246
|
+
# @return [Array<(Response<(BlacklistedKey)>, Integer, Hash)>] Response<(BlacklistedKey)> data, response status code and response headers
|
|
247
|
+
def blacklisted_key_update_with_http_info(project_id, id, blacklisted_key_update_parameters, opts = {})
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug 'Calling API: BlacklistedKeysApi.blacklisted_key_update ...'
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'project_id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BlacklistedKeysApi.blacklisted_key_update"
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'id' is set
|
|
256
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BlacklistedKeysApi.blacklisted_key_update"
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'blacklisted_key_update_parameters' is set
|
|
260
|
+
if @api_client.config.client_side_validation && blacklisted_key_update_parameters.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'blacklisted_key_update_parameters' when calling BlacklistedKeysApi.blacklisted_key_update"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/projects/{project_id}/blacklisted_keys/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
273
|
+
# HTTP header 'Content-Type'
|
|
274
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
275
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = opts[:form_params] || {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = opts[:body] || @api_client.object_to_http_body(blacklisted_key_update_parameters)
|
|
282
|
+
|
|
283
|
+
# return_type
|
|
284
|
+
return_type = opts[:return_type] || 'BlacklistedKey'
|
|
285
|
+
|
|
286
|
+
# auth_names
|
|
287
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
288
|
+
|
|
289
|
+
new_options = opts.merge(
|
|
290
|
+
:header_params => header_params,
|
|
291
|
+
:query_params => query_params,
|
|
292
|
+
:form_params => form_params,
|
|
293
|
+
:body => post_body,
|
|
294
|
+
:auth_names => auth_names,
|
|
295
|
+
:return_type => return_type
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug "API called: BlacklistedKeysApi#blacklisted_key_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
301
|
+
end
|
|
302
|
+
response = ::Phrase::Response.new(data, headers)
|
|
303
|
+
return response, status_code, headers
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# List blacklisted keys
|
|
307
|
+
# List all rules for blacklisting keys for the given project.
|
|
308
|
+
# @param project_id [String] Project ID
|
|
309
|
+
# @param [Hash] opts the optional parameters
|
|
310
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
311
|
+
# @option opts [Integer] :page Page number
|
|
312
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
313
|
+
# @option opts [String] :branch specify the branch to use
|
|
314
|
+
# @return [Array<BlacklistedKey>]
|
|
315
|
+
def blacklisted_keys_list(project_id, opts = {})
|
|
316
|
+
data, _status_code, _headers = blacklisted_keys_list_with_http_info(project_id, opts)
|
|
317
|
+
data
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# List blacklisted keys
|
|
321
|
+
# List all rules for blacklisting keys for the given project.
|
|
322
|
+
# @param project_id [String] Project ID
|
|
323
|
+
# @param [Hash] opts the optional parameters
|
|
324
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
325
|
+
# @option opts [Integer] :page Page number
|
|
326
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
327
|
+
# @option opts [String] :branch specify the branch to use
|
|
328
|
+
# @return [Array<(Response<(Array<BlacklistedKey>)>, Integer, Hash)>] Response<(Array<BlacklistedKey>)> data, response status code and response headers
|
|
329
|
+
def blacklisted_keys_list_with_http_info(project_id, opts = {})
|
|
330
|
+
if @api_client.config.debugging
|
|
331
|
+
@api_client.config.logger.debug 'Calling API: BlacklistedKeysApi.blacklisted_keys_list ...'
|
|
332
|
+
end
|
|
333
|
+
# verify the required parameter 'project_id' is set
|
|
334
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
335
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BlacklistedKeysApi.blacklisted_keys_list"
|
|
336
|
+
end
|
|
337
|
+
# resource path
|
|
338
|
+
local_var_path = '/projects/{project_id}/blacklisted_keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
339
|
+
|
|
340
|
+
# query parameters
|
|
341
|
+
query_params = opts[:query_params] || {}
|
|
342
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
343
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
344
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
345
|
+
|
|
346
|
+
# header parameters
|
|
347
|
+
header_params = opts[:header_params] || {}
|
|
348
|
+
# HTTP header 'Accept' (if needed)
|
|
349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
350
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
351
|
+
|
|
352
|
+
# form parameters
|
|
353
|
+
form_params = opts[:form_params] || {}
|
|
354
|
+
|
|
355
|
+
# http body (model)
|
|
356
|
+
post_body = opts[:body]
|
|
357
|
+
|
|
358
|
+
# return_type
|
|
359
|
+
return_type = opts[:return_type] || 'Array<BlacklistedKey>'
|
|
360
|
+
|
|
361
|
+
# auth_names
|
|
362
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
363
|
+
|
|
364
|
+
new_options = opts.merge(
|
|
365
|
+
:header_params => header_params,
|
|
366
|
+
:query_params => query_params,
|
|
367
|
+
:form_params => form_params,
|
|
368
|
+
:body => post_body,
|
|
369
|
+
:auth_names => auth_names,
|
|
370
|
+
:return_type => return_type
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
374
|
+
if @api_client.config.debugging
|
|
375
|
+
@api_client.config.logger.debug "API called: BlacklistedKeysApi#blacklisted_keys_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
376
|
+
end
|
|
377
|
+
response = ::Phrase::Response.new(data, headers)
|
|
378
|
+
return response, status_code, headers
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
end
|
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class BranchesApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Compare branches
|
|
11
|
+
# Compare branch with main branch.
|
|
12
|
+
# @param project_id [String] Project ID
|
|
13
|
+
# @param name [String] name
|
|
14
|
+
# @param [Hash] opts the optional parameters
|
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
+
# @return [nil]
|
|
17
|
+
def branch_compare(project_id, name, opts = {})
|
|
18
|
+
data, _status_code, _headers = branch_compare_with_http_info(project_id, name, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Compare branches
|
|
23
|
+
# Compare branch with main branch.
|
|
24
|
+
# @param project_id [String] Project ID
|
|
25
|
+
# @param name [String] name
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
29
|
+
def branch_compare_with_http_info(project_id, name, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_compare ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'project_id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
35
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_compare"
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'name' is set
|
|
38
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_compare"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/projects/{project_id}/branches/{name}/compare'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = opts[:query_params] || {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = opts[:header_params] || {}
|
|
49
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body]
|
|
56
|
+
|
|
57
|
+
# return_type
|
|
58
|
+
return_type = opts[:return_type]
|
|
59
|
+
|
|
60
|
+
# auth_names
|
|
61
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
62
|
+
|
|
63
|
+
new_options = opts.merge(
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_compare\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
response = ::Phrase::Response.new(data, headers)
|
|
77
|
+
return response, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Create a branch
|
|
81
|
+
# Create a new branch.
|
|
82
|
+
# @param project_id [String] Project ID
|
|
83
|
+
# @param branch_create_parameters [BranchCreateParameters]
|
|
84
|
+
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
86
|
+
# @return [Branch]
|
|
87
|
+
def branch_create(project_id, branch_create_parameters, opts = {})
|
|
88
|
+
data, _status_code, _headers = branch_create_with_http_info(project_id, branch_create_parameters, opts)
|
|
89
|
+
data
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Create a branch
|
|
93
|
+
# Create a new branch.
|
|
94
|
+
# @param project_id [String] Project ID
|
|
95
|
+
# @param branch_create_parameters [BranchCreateParameters]
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
98
|
+
# @return [Array<(Response<(Branch)>, Integer, Hash)>] Response<(Branch)> data, response status code and response headers
|
|
99
|
+
def branch_create_with_http_info(project_id, branch_create_parameters, opts = {})
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_create ...'
|
|
102
|
+
end
|
|
103
|
+
# verify the required parameter 'project_id' is set
|
|
104
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_create"
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'branch_create_parameters' is set
|
|
108
|
+
if @api_client.config.client_side_validation && branch_create_parameters.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'branch_create_parameters' when calling BranchesApi.branch_create"
|
|
110
|
+
end
|
|
111
|
+
# resource path
|
|
112
|
+
local_var_path = '/projects/{project_id}/branches'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
113
|
+
|
|
114
|
+
# query parameters
|
|
115
|
+
query_params = opts[:query_params] || {}
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:body] || @api_client.object_to_http_body(branch_create_parameters)
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:return_type] || 'Branch'
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
response = ::Phrase::Response.new(data, headers)
|
|
151
|
+
return response, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Delete a branch
|
|
155
|
+
# Delete an existing branch.
|
|
156
|
+
# @param project_id [String] Project ID
|
|
157
|
+
# @param name [String] name
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
160
|
+
# @return [nil]
|
|
161
|
+
def branch_delete(project_id, name, opts = {})
|
|
162
|
+
data, _status_code, _headers = branch_delete_with_http_info(project_id, name, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Delete a branch
|
|
167
|
+
# Delete an existing branch.
|
|
168
|
+
# @param project_id [String] Project ID
|
|
169
|
+
# @param name [String] name
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
172
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
173
|
+
def branch_delete_with_http_info(project_id, name, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_delete ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'project_id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_delete"
|
|
180
|
+
end
|
|
181
|
+
# verify the required parameter 'name' is set
|
|
182
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_delete"
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/projects/{project_id}/branches/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
194
|
+
|
|
195
|
+
# form parameters
|
|
196
|
+
form_params = opts[:form_params] || {}
|
|
197
|
+
|
|
198
|
+
# http body (model)
|
|
199
|
+
post_body = opts[:body]
|
|
200
|
+
|
|
201
|
+
# return_type
|
|
202
|
+
return_type = opts[:return_type]
|
|
203
|
+
|
|
204
|
+
# auth_names
|
|
205
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
206
|
+
|
|
207
|
+
new_options = opts.merge(
|
|
208
|
+
:header_params => header_params,
|
|
209
|
+
:query_params => query_params,
|
|
210
|
+
:form_params => form_params,
|
|
211
|
+
:body => post_body,
|
|
212
|
+
:auth_names => auth_names,
|
|
213
|
+
:return_type => return_type
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
response = ::Phrase::Response.new(data, headers)
|
|
221
|
+
return response, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Merge a branch
|
|
225
|
+
# Merge an existing branch.
|
|
226
|
+
# @param project_id [String] Project ID
|
|
227
|
+
# @param name [String] name
|
|
228
|
+
# @param branch_merge_parameters [BranchMergeParameters]
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
231
|
+
# @return [nil]
|
|
232
|
+
def branch_merge(project_id, name, branch_merge_parameters, opts = {})
|
|
233
|
+
data, _status_code, _headers = branch_merge_with_http_info(project_id, name, branch_merge_parameters, opts)
|
|
234
|
+
data
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Merge a branch
|
|
238
|
+
# Merge an existing branch.
|
|
239
|
+
# @param project_id [String] Project ID
|
|
240
|
+
# @param name [String] name
|
|
241
|
+
# @param branch_merge_parameters [BranchMergeParameters]
|
|
242
|
+
# @param [Hash] opts the optional parameters
|
|
243
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
244
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
245
|
+
def branch_merge_with_http_info(project_id, name, branch_merge_parameters, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_merge ...'
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'project_id' is set
|
|
250
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_merge"
|
|
252
|
+
end
|
|
253
|
+
# verify the required parameter 'name' is set
|
|
254
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_merge"
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'branch_merge_parameters' is set
|
|
258
|
+
if @api_client.config.client_side_validation && branch_merge_parameters.nil?
|
|
259
|
+
fail ArgumentError, "Missing the required parameter 'branch_merge_parameters' when calling BranchesApi.branch_merge"
|
|
260
|
+
end
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = '/projects/{project_id}/branches/{name}/merge'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = opts[:query_params] || {}
|
|
266
|
+
|
|
267
|
+
# header parameters
|
|
268
|
+
header_params = opts[:header_params] || {}
|
|
269
|
+
# HTTP header 'Content-Type'
|
|
270
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
271
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
272
|
+
|
|
273
|
+
# form parameters
|
|
274
|
+
form_params = opts[:form_params] || {}
|
|
275
|
+
|
|
276
|
+
# http body (model)
|
|
277
|
+
post_body = opts[:body] || @api_client.object_to_http_body(branch_merge_parameters)
|
|
278
|
+
|
|
279
|
+
# return_type
|
|
280
|
+
return_type = opts[:return_type]
|
|
281
|
+
|
|
282
|
+
# auth_names
|
|
283
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
284
|
+
|
|
285
|
+
new_options = opts.merge(
|
|
286
|
+
:header_params => header_params,
|
|
287
|
+
:query_params => query_params,
|
|
288
|
+
:form_params => form_params,
|
|
289
|
+
:body => post_body,
|
|
290
|
+
:auth_names => auth_names,
|
|
291
|
+
:return_type => return_type
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
response = ::Phrase::Response.new(data, headers)
|
|
299
|
+
return response, status_code, headers
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Get a single branch
|
|
303
|
+
# Get details on a single branch for a given project.
|
|
304
|
+
# @param project_id [String] Project ID
|
|
305
|
+
# @param name [String] name
|
|
306
|
+
# @param [Hash] opts the optional parameters
|
|
307
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
308
|
+
# @return [Branch]
|
|
309
|
+
def branch_show(project_id, name, opts = {})
|
|
310
|
+
data, _status_code, _headers = branch_show_with_http_info(project_id, name, opts)
|
|
311
|
+
data
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Get a single branch
|
|
315
|
+
# Get details on a single branch for a given project.
|
|
316
|
+
# @param project_id [String] Project ID
|
|
317
|
+
# @param name [String] name
|
|
318
|
+
# @param [Hash] opts the optional parameters
|
|
319
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
320
|
+
# @return [Array<(Response<(Branch)>, Integer, Hash)>] Response<(Branch)> data, response status code and response headers
|
|
321
|
+
def branch_show_with_http_info(project_id, name, opts = {})
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_show ...'
|
|
324
|
+
end
|
|
325
|
+
# verify the required parameter 'project_id' is set
|
|
326
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
327
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_show"
|
|
328
|
+
end
|
|
329
|
+
# verify the required parameter 'name' is set
|
|
330
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
331
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_show"
|
|
332
|
+
end
|
|
333
|
+
# resource path
|
|
334
|
+
local_var_path = '/projects/{project_id}/branches/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
335
|
+
|
|
336
|
+
# query parameters
|
|
337
|
+
query_params = opts[:query_params] || {}
|
|
338
|
+
|
|
339
|
+
# header parameters
|
|
340
|
+
header_params = opts[:header_params] || {}
|
|
341
|
+
# HTTP header 'Accept' (if needed)
|
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
343
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
344
|
+
|
|
345
|
+
# form parameters
|
|
346
|
+
form_params = opts[:form_params] || {}
|
|
347
|
+
|
|
348
|
+
# http body (model)
|
|
349
|
+
post_body = opts[:body]
|
|
350
|
+
|
|
351
|
+
# return_type
|
|
352
|
+
return_type = opts[:return_type] || 'Branch'
|
|
353
|
+
|
|
354
|
+
# auth_names
|
|
355
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
356
|
+
|
|
357
|
+
new_options = opts.merge(
|
|
358
|
+
:header_params => header_params,
|
|
359
|
+
:query_params => query_params,
|
|
360
|
+
:form_params => form_params,
|
|
361
|
+
:body => post_body,
|
|
362
|
+
:auth_names => auth_names,
|
|
363
|
+
:return_type => return_type
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
369
|
+
end
|
|
370
|
+
response = ::Phrase::Response.new(data, headers)
|
|
371
|
+
return response, status_code, headers
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Update a branch
|
|
375
|
+
# Update an existing branch.
|
|
376
|
+
# @param project_id [String] Project ID
|
|
377
|
+
# @param name [String] name
|
|
378
|
+
# @param branch_update_parameters [BranchUpdateParameters]
|
|
379
|
+
# @param [Hash] opts the optional parameters
|
|
380
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
381
|
+
# @return [Branch]
|
|
382
|
+
def branch_update(project_id, name, branch_update_parameters, opts = {})
|
|
383
|
+
data, _status_code, _headers = branch_update_with_http_info(project_id, name, branch_update_parameters, opts)
|
|
384
|
+
data
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Update a branch
|
|
388
|
+
# Update an existing branch.
|
|
389
|
+
# @param project_id [String] Project ID
|
|
390
|
+
# @param name [String] name
|
|
391
|
+
# @param branch_update_parameters [BranchUpdateParameters]
|
|
392
|
+
# @param [Hash] opts the optional parameters
|
|
393
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
394
|
+
# @return [Array<(Response<(Branch)>, Integer, Hash)>] Response<(Branch)> data, response status code and response headers
|
|
395
|
+
def branch_update_with_http_info(project_id, name, branch_update_parameters, opts = {})
|
|
396
|
+
if @api_client.config.debugging
|
|
397
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branch_update ...'
|
|
398
|
+
end
|
|
399
|
+
# verify the required parameter 'project_id' is set
|
|
400
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
401
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_update"
|
|
402
|
+
end
|
|
403
|
+
# verify the required parameter 'name' is set
|
|
404
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
405
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_update"
|
|
406
|
+
end
|
|
407
|
+
# verify the required parameter 'branch_update_parameters' is set
|
|
408
|
+
if @api_client.config.client_side_validation && branch_update_parameters.nil?
|
|
409
|
+
fail ArgumentError, "Missing the required parameter 'branch_update_parameters' when calling BranchesApi.branch_update"
|
|
410
|
+
end
|
|
411
|
+
# resource path
|
|
412
|
+
local_var_path = '/projects/{project_id}/branches/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
413
|
+
|
|
414
|
+
# query parameters
|
|
415
|
+
query_params = opts[:query_params] || {}
|
|
416
|
+
|
|
417
|
+
# header parameters
|
|
418
|
+
header_params = opts[:header_params] || {}
|
|
419
|
+
# HTTP header 'Accept' (if needed)
|
|
420
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
421
|
+
# HTTP header 'Content-Type'
|
|
422
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
423
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
424
|
+
|
|
425
|
+
# form parameters
|
|
426
|
+
form_params = opts[:form_params] || {}
|
|
427
|
+
|
|
428
|
+
# http body (model)
|
|
429
|
+
post_body = opts[:body] || @api_client.object_to_http_body(branch_update_parameters)
|
|
430
|
+
|
|
431
|
+
# return_type
|
|
432
|
+
return_type = opts[:return_type] || 'Branch'
|
|
433
|
+
|
|
434
|
+
# auth_names
|
|
435
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
436
|
+
|
|
437
|
+
new_options = opts.merge(
|
|
438
|
+
:header_params => header_params,
|
|
439
|
+
:query_params => query_params,
|
|
440
|
+
:form_params => form_params,
|
|
441
|
+
:body => post_body,
|
|
442
|
+
:auth_names => auth_names,
|
|
443
|
+
:return_type => return_type
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug "API called: BranchesApi#branch_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
449
|
+
end
|
|
450
|
+
response = ::Phrase::Response.new(data, headers)
|
|
451
|
+
return response, status_code, headers
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# List branches
|
|
455
|
+
# List all branches the of the current project.
|
|
456
|
+
# @param project_id [String] Project ID
|
|
457
|
+
# @param [Hash] opts the optional parameters
|
|
458
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
459
|
+
# @option opts [Integer] :page Page number
|
|
460
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
461
|
+
# @return [Array<Branch>]
|
|
462
|
+
def branches_list(project_id, opts = {})
|
|
463
|
+
data, _status_code, _headers = branches_list_with_http_info(project_id, opts)
|
|
464
|
+
data
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# List branches
|
|
468
|
+
# List all branches the of the current project.
|
|
469
|
+
# @param project_id [String] Project ID
|
|
470
|
+
# @param [Hash] opts the optional parameters
|
|
471
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
472
|
+
# @option opts [Integer] :page Page number
|
|
473
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
474
|
+
# @return [Array<(Response<(Array<Branch>)>, Integer, Hash)>] Response<(Array<Branch>)> data, response status code and response headers
|
|
475
|
+
def branches_list_with_http_info(project_id, opts = {})
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug 'Calling API: BranchesApi.branches_list ...'
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'project_id' is set
|
|
480
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branches_list"
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/projects/{project_id}/branches'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
489
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
490
|
+
|
|
491
|
+
# header parameters
|
|
492
|
+
header_params = opts[:header_params] || {}
|
|
493
|
+
# HTTP header 'Accept' (if needed)
|
|
494
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
495
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
496
|
+
|
|
497
|
+
# form parameters
|
|
498
|
+
form_params = opts[:form_params] || {}
|
|
499
|
+
|
|
500
|
+
# http body (model)
|
|
501
|
+
post_body = opts[:body]
|
|
502
|
+
|
|
503
|
+
# return_type
|
|
504
|
+
return_type = opts[:return_type] || 'Array<Branch>'
|
|
505
|
+
|
|
506
|
+
# auth_names
|
|
507
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
508
|
+
|
|
509
|
+
new_options = opts.merge(
|
|
510
|
+
:header_params => header_params,
|
|
511
|
+
:query_params => query_params,
|
|
512
|
+
:form_params => form_params,
|
|
513
|
+
:body => post_body,
|
|
514
|
+
:auth_names => auth_names,
|
|
515
|
+
:return_type => return_type
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
519
|
+
if @api_client.config.debugging
|
|
520
|
+
@api_client.config.logger.debug "API called: BranchesApi#branches_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
521
|
+
end
|
|
522
|
+
response = ::Phrase::Response.new(data, headers)
|
|
523
|
+
return response, status_code, headers
|
|
524
|
+
end
|
|
525
|
+
end
|
|
526
|
+
end
|