phrase 0.4.31 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +6 -0
- data/LICENSE +17 -18
- data/README.md +449 -280
- data/Rakefile +7 -4
- data/docs/Account.md +27 -0
- data/docs/AccountDetails.md +27 -0
- data/docs/AccountDetails1.md +17 -0
- data/docs/AccountsApi.md +134 -0
- data/docs/AffectedCount.md +17 -0
- data/docs/AffectedResources.md +17 -0
- data/docs/Authorization.md +31 -0
- data/docs/AuthorizationCreateParameters.md +21 -0
- data/docs/AuthorizationUpdateParameters.md +21 -0
- data/docs/AuthorizationWithToken.md +33 -0
- data/docs/AuthorizationWithToken1.md +17 -0
- data/docs/AuthorizationsApi.md +321 -0
- data/docs/BitbucketSync.md +27 -0
- data/docs/BitbucketSyncApi.md +197 -0
- data/docs/BitbucketSyncExportParameters.md +17 -0
- data/docs/BitbucketSyncExportResponse.md +17 -0
- data/docs/BitbucketSyncImportParameters.md +17 -0
- data/docs/BlacklistedKey.md +23 -0
- data/docs/BlacklistedKeyCreateParameters.md +17 -0
- data/docs/BlacklistedKeyUpdateParameters.md +17 -0
- data/docs/BlacklistedKeysApi.md +333 -0
- data/docs/Branch.md +29 -0
- data/docs/BranchCreateParameters.md +17 -0
- data/docs/BranchMergeParameters.md +17 -0
- data/docs/BranchUpdateParameters.md +17 -0
- data/docs/BranchesApi.md +459 -0
- data/docs/Comment.md +25 -0
- data/docs/CommentCreateParameters.md +19 -0
- data/docs/CommentMarkReadParameters.md +17 -0
- data/docs/CommentUpdateParameters.md +19 -0
- data/docs/CommentsApi.md +548 -0
- data/docs/Distribution.md +29 -0
- data/docs/DistributionCreateParameters.md +29 -0
- data/docs/DistributionPreview.md +29 -0
- data/docs/DistributionUpdateParameters.md +29 -0
- data/docs/DistributionsApi.md +331 -0
- data/docs/Document.md +23 -0
- data/docs/DocumentsApi.md +137 -0
- data/docs/Format.md +35 -0
- data/docs/FormatsApi.md +68 -0
- data/docs/GitHubSyncApi.md +130 -0
- data/docs/GitLabSyncApi.md +463 -0
- data/docs/GithubSyncExportParameters.md +17 -0
- data/docs/GithubSyncImportParameters.md +17 -0
- data/docs/GitlabSync.md +37 -0
- data/docs/GitlabSyncExport.md +19 -0
- data/docs/GitlabSyncExportParameters.md +17 -0
- data/docs/GitlabSyncHistory.md +25 -0
- data/docs/GitlabSyncImportParameters.md +17 -0
- data/docs/GlossariesApi.md +331 -0
- data/docs/Glossary.md +25 -0
- data/docs/GlossaryCreateParameters.md +21 -0
- data/docs/GlossaryTerm.md +31 -0
- data/docs/GlossaryTermCreateParameters.md +23 -0
- data/docs/GlossaryTermTranslation.md +25 -0
- data/docs/GlossaryTermTranslationCreateParameters.md +19 -0
- data/docs/GlossaryTermTranslationUpdateParameters.md +19 -0
- data/docs/GlossaryTermTranslationsApi.md +213 -0
- data/docs/GlossaryTermUpdateParameters.md +23 -0
- data/docs/GlossaryTermsApi.md +341 -0
- data/docs/GlossaryUpdateParameters.md +21 -0
- data/docs/InlineResponse422.md +19 -0
- data/docs/InlineResponse422Errors.md +21 -0
- data/docs/Invitation.md +35 -0
- data/docs/InvitationCreateParameters.md +25 -0
- data/docs/InvitationUpdateParameters.md +23 -0
- data/docs/InvitationsApi.md +395 -0
- data/docs/Job.md +29 -0
- data/docs/JobCompleteParameters.md +17 -0
- data/docs/JobCreateParameters.md +27 -0
- data/docs/JobDetails.md +37 -0
- data/docs/JobDetails1.md +23 -0
- data/docs/JobKeysCreateParameters.md +19 -0
- data/docs/JobLocale.md +23 -0
- data/docs/JobLocaleCompleteParameters.md +17 -0
- data/docs/JobLocaleReopenParameters.md +17 -0
- data/docs/JobLocaleUpdateParameters.md +21 -0
- data/docs/JobLocalesApi.md +483 -0
- data/docs/JobLocalesCreateParameters.md +21 -0
- data/docs/JobPreview.md +21 -0
- data/docs/JobReopenParameters.md +17 -0
- data/docs/JobStartParameters.md +17 -0
- data/docs/JobUpdateParameters.md +23 -0
- data/docs/JobsApi.md +674 -0
- data/docs/KeyCreateParameters.md +45 -0
- data/docs/KeyPreview.md +21 -0
- data/docs/KeyUpdateParameters.md +45 -0
- data/docs/KeysApi.md +609 -0
- data/docs/KeysSearchParameters.md +25 -0
- data/docs/KeysTagParameters.md +23 -0
- data/docs/KeysUntagParameters.md +23 -0
- data/docs/Locale.md +35 -0
- data/docs/LocaleCreateParameters.md +35 -0
- data/docs/LocaleDetails.md +37 -0
- data/docs/LocaleDetails1.md +17 -0
- data/docs/LocalePreview.md +21 -0
- data/docs/LocaleStatistics.md +29 -0
- data/docs/LocaleUpdateParameters.md +35 -0
- data/docs/LocalesApi.md +428 -0
- data/docs/Member.md +25 -0
- data/docs/MemberUpdateParameters.md +23 -0
- data/docs/MembersApi.md +267 -0
- data/docs/OrderConfirmParameters.md +17 -0
- data/docs/OrderCreateParameters.md +43 -0
- data/docs/OrdersApi.md +337 -0
- data/docs/Project.md +31 -0
- data/docs/ProjectCreateParameters.md +29 -0
- data/docs/ProjectDetails.md +33 -0
- data/docs/ProjectDetails1.md +19 -0
- data/docs/ProjectLocales.md +27 -0
- data/docs/ProjectLocales1.md +17 -0
- data/docs/ProjectShort.md +25 -0
- data/docs/ProjectUpdateParameters.md +27 -0
- data/docs/ProjectsApi.md +321 -0
- data/docs/Release.md +37 -0
- data/docs/ReleaseCreateParameters.md +21 -0
- data/docs/ReleasePreview.md +37 -0
- data/docs/ReleaseUpdateParameters.md +21 -0
- data/docs/ReleasesApi.md +407 -0
- data/docs/Screenshot.md +29 -0
- data/docs/ScreenshotCreateParameters.md +21 -0
- data/docs/ScreenshotMarker.md +27 -0
- data/docs/ScreenshotMarkerCreateParameters.md +19 -0
- data/docs/ScreenshotMarkerUpdateParameters.md +19 -0
- data/docs/ScreenshotMarkersApi.md +337 -0
- data/docs/ScreenshotUpdateParameters.md +21 -0
- data/docs/ScreenshotsApi.md +331 -0
- data/docs/Space.md +27 -0
- data/docs/SpaceCreateParameters.md +17 -0
- data/docs/SpaceUpdateParameters.md +17 -0
- data/docs/SpacesApi.md +529 -0
- data/docs/SpacesProjectsCreateParameters.md +17 -0
- data/docs/StyleGuidesApi.md +331 -0
- data/docs/Styleguide.md +23 -0
- data/docs/StyleguideCreateParameters.md +41 -0
- data/docs/StyleguideDetails.md +49 -0
- data/docs/StyleguideDetails1.md +41 -0
- data/docs/StyleguidePreview.md +19 -0
- data/docs/StyleguideUpdateParameters.md +41 -0
- data/docs/Tag.md +23 -0
- data/docs/TagCreateParameters.md +19 -0
- data/docs/TagWithStats.md +25 -0
- data/docs/TagWithStats1.md +17 -0
- data/docs/TagWithStats1Statistics.md +23 -0
- data/docs/TagWithStats1Statistics1.md +19 -0
- data/docs/TagsApi.md +271 -0
- data/docs/Team.md +29 -0
- data/docs/TeamCreateParameters.md +17 -0
- data/docs/TeamDetail.md +29 -0
- data/docs/TeamUpdateParameters.md +17 -0
- data/docs/TeamsApi.md +721 -0
- data/docs/TeamsProjectsCreateParameters.md +17 -0
- data/docs/TeamsSpacesCreateParameters.md +17 -0
- data/docs/TeamsUsersCreateParameters.md +17 -0
- data/docs/Translation.md +37 -0
- data/docs/TranslationCreateParameters.md +31 -0
- data/docs/TranslationDetails.md +41 -0
- data/docs/TranslationDetails1.md +19 -0
- data/docs/TranslationExcludeParameters.md +17 -0
- data/docs/TranslationIncludeParameters.md +17 -0
- data/docs/TranslationKey.md +33 -0
- data/docs/TranslationKeyDetails.md +51 -0
- data/docs/TranslationKeyDetails1.md +33 -0
- data/docs/TranslationOrder.md +49 -0
- data/docs/TranslationReviewParameters.md +17 -0
- data/docs/TranslationUnverifyParameters.md +17 -0
- data/docs/TranslationUpdateParameters.md +27 -0
- data/docs/TranslationVerifyParameters.md +17 -0
- data/docs/TranslationVersion.md +31 -0
- data/docs/TranslationVersionWithUser.md +33 -0
- data/docs/TranslationVersionWithUser1.md +17 -0
- data/docs/TranslationsApi.md +1148 -0
- data/docs/TranslationsExcludeParameters.md +23 -0
- data/docs/TranslationsIncludeParameters.md +23 -0
- data/docs/TranslationsReviewParameters.md +19 -0
- data/docs/TranslationsSearchParameters.md +23 -0
- data/docs/TranslationsUnverifyParameters.md +23 -0
- data/docs/TranslationsVerifyParameters.md +23 -0
- data/docs/Upload.md +31 -0
- data/docs/UploadCreateParameters.md +45 -0
- data/docs/UploadSummary.md +31 -0
- data/docs/UploadsApi.md +234 -0
- data/docs/User.md +29 -0
- data/docs/UserPreview.md +21 -0
- data/docs/UsersApi.md +68 -0
- data/docs/VersionsHistoryApi.md +146 -0
- data/docs/Webhook.md +29 -0
- data/docs/WebhookCreateParameters.md +23 -0
- data/docs/WebhookUpdateParameters.md +23 -0
- data/docs/WebhooksApi.md +394 -0
- data/git_push.sh +58 -0
- data/lib/phrase.rb +212 -55
- data/lib/phrase/api/accounts_api.rb +142 -0
- data/lib/phrase/api/authorizations_api.rb +348 -0
- data/lib/phrase/api/bitbucket_sync_api.rb +219 -0
- data/lib/phrase/api/blacklisted_keys_api.rb +381 -0
- data/lib/phrase/api/branches_api.rb +526 -0
- data/lib/phrase/api/comments_api.rb +659 -0
- data/lib/phrase/api/distributions_api.rb +378 -0
- data/lib/phrase/api/documents_api.rb +152 -0
- data/lib/phrase/api/formats_api.rb +70 -0
- data/lib/phrase/api/git_hub_sync_api.rb +146 -0
- data/lib/phrase/api/git_lab_sync_api.rb +510 -0
- data/lib/phrase/api/glossaries_api.rb +378 -0
- data/lib/phrase/api/glossary_term_translations_api.rb +270 -0
- data/lib/phrase/api/glossary_terms_api.rb +408 -0
- data/lib/phrase/api/invitations_api.rb +450 -0
- data/lib/phrase/api/job_locales_api.rb +589 -0
- data/lib/phrase/api/jobs_api.rb +792 -0
- data/lib/phrase/api/keys_api.rb +702 -0
- data/lib/phrase/api/locales_api.rb +499 -0
- data/lib/phrase/api/members_api.rb +304 -0
- data/lib/phrase/api/orders_api.rb +387 -0
- data/lib/phrase/api/projects_api.rb +348 -0
- data/lib/phrase/api/releases_api.rb +486 -0
- data/lib/phrase/api/screenshot_markers_api.rb +396 -0
- data/lib/phrase/api/screenshots_api.rb +378 -0
- data/lib/phrase/api/spaces_api.rb +610 -0
- data/lib/phrase/api/style_guides_api.rb +378 -0
- data/lib/phrase/api/tags_api.rb +307 -0
- data/lib/phrase/api/teams_api.rb +840 -0
- data/lib/phrase/api/translations_api.rb +1353 -0
- data/lib/phrase/api/uploads_api.rb +273 -0
- data/lib/phrase/api/users_api.rb +70 -0
- data/lib/phrase/api/versions_history_api.rb +172 -0
- data/lib/phrase/api/webhooks_api.rb +448 -0
- data/lib/phrase/api_client.rb +376 -0
- data/lib/phrase/api_error.rb +45 -0
- data/lib/phrase/configuration.rb +243 -0
- data/lib/phrase/models/account.rb +239 -0
- data/lib/phrase/models/account_details.rb +247 -0
- data/lib/phrase/models/account_details1.rb +194 -0
- data/lib/phrase/models/affected_count.rb +194 -0
- data/lib/phrase/models/affected_resources.rb +194 -0
- data/lib/phrase/models/authorization.rb +259 -0
- data/lib/phrase/models/authorization_create_parameters.rb +217 -0
- data/lib/phrase/models/authorization_update_parameters.rb +217 -0
- data/lib/phrase/models/authorization_with_token.rb +276 -0
- data/lib/phrase/models/authorization_with_token1.rb +194 -0
- data/lib/phrase/models/bitbucket_sync.rb +241 -0
- data/lib/phrase/models/bitbucket_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/bitbucket_sync_export_response.rb +194 -0
- data/lib/phrase/models/bitbucket_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/blacklisted_key.rb +221 -0
- data/lib/phrase/models/blacklisted_key_create_parameters.rb +195 -0
- data/lib/phrase/models/blacklisted_key_update_parameters.rb +195 -0
- data/lib/phrase/models/branch.rb +248 -0
- data/lib/phrase/models/branch_create_parameters.rb +195 -0
- data/lib/phrase/models/branch_merge_parameters.rb +195 -0
- data/lib/phrase/models/branch_update_parameters.rb +195 -0
- data/lib/phrase/models/comment.rb +230 -0
- data/lib/phrase/models/comment_create_parameters.rb +205 -0
- data/lib/phrase/models/comment_mark_read_parameters.rb +195 -0
- data/lib/phrase/models/comment_update_parameters.rb +205 -0
- data/lib/phrase/models/distribution.rb +252 -0
- data/lib/phrase/models/distribution_create_parameters.rb +259 -0
- data/lib/phrase/models/distribution_preview.rb +250 -0
- data/lib/phrase/models/distribution_update_parameters.rb +259 -0
- data/lib/phrase/models/document.rb +221 -0
- data/lib/phrase/models/format.rb +275 -0
- data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/gitlab_sync.rb +284 -0
- data/lib/phrase/models/gitlab_sync_export.rb +203 -0
- data/lib/phrase/models/gitlab_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/gitlab_sync_history.rb +232 -0
- data/lib/phrase/models/gitlab_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/glossary.rb +232 -0
- data/lib/phrase/models/glossary_create_parameters.rb +217 -0
- data/lib/phrase/models/glossary_term.rb +259 -0
- data/lib/phrase/models/glossary_term_create_parameters.rb +225 -0
- data/lib/phrase/models/glossary_term_translation.rb +230 -0
- data/lib/phrase/models/glossary_term_translation_create_parameters.rb +205 -0
- data/lib/phrase/models/glossary_term_translation_update_parameters.rb +205 -0
- data/lib/phrase/models/glossary_term_update_parameters.rb +225 -0
- data/lib/phrase/models/glossary_update_parameters.rb +217 -0
- data/lib/phrase/models/inline_response422.rb +205 -0
- data/lib/phrase/models/inline_response422_errors.rb +212 -0
- data/lib/phrase/models/invitation.rb +279 -0
- data/lib/phrase/models/invitation_create_parameters.rb +237 -0
- data/lib/phrase/models/invitation_update_parameters.rb +227 -0
- data/lib/phrase/models/job.rb +248 -0
- data/lib/phrase/models/job_complete_parameters.rb +195 -0
- data/lib/phrase/models/job_create_parameters.rb +249 -0
- data/lib/phrase/models/job_details.rb +296 -0
- data/lib/phrase/models/job_details1.rb +225 -0
- data/lib/phrase/models/job_keys_create_parameters.rb +207 -0
- data/lib/phrase/models/job_locale.rb +223 -0
- data/lib/phrase/models/job_locale_complete_parameters.rb +195 -0
- data/lib/phrase/models/job_locale_reopen_parameters.rb +195 -0
- data/lib/phrase/models/job_locale_update_parameters.rb +217 -0
- data/lib/phrase/models/job_locales_create_parameters.rb +217 -0
- data/lib/phrase/models/job_preview.rb +212 -0
- data/lib/phrase/models/job_reopen_parameters.rb +195 -0
- data/lib/phrase/models/job_start_parameters.rb +195 -0
- data/lib/phrase/models/job_update_parameters.rb +225 -0
- data/lib/phrase/models/key_create_parameters.rb +335 -0
- data/lib/phrase/models/key_preview.rb +212 -0
- data/lib/phrase/models/key_update_parameters.rb +335 -0
- data/lib/phrase/models/keys_search_parameters.rb +235 -0
- data/lib/phrase/models/keys_tag_parameters.rb +225 -0
- data/lib/phrase/models/keys_untag_parameters.rb +225 -0
- data/lib/phrase/models/locale.rb +277 -0
- data/lib/phrase/models/locale_create_parameters.rb +285 -0
- data/lib/phrase/models/locale_details.rb +294 -0
- data/lib/phrase/models/locale_details1.rb +194 -0
- data/lib/phrase/models/locale_preview.rb +212 -0
- data/lib/phrase/models/locale_statistics.rb +248 -0
- data/lib/phrase/models/locale_update_parameters.rb +285 -0
- data/lib/phrase/models/member.rb +232 -0
- data/lib/phrase/models/member_update_parameters.rb +227 -0
- data/lib/phrase/models/order_confirm_parameters.rb +195 -0
- data/lib/phrase/models/order_create_parameters.rb +327 -0
- data/lib/phrase/models/project.rb +257 -0
- data/lib/phrase/models/project_create_parameters.rb +255 -0
- data/lib/phrase/models/project_details.rb +274 -0
- data/lib/phrase/models/project_details1.rb +203 -0
- data/lib/phrase/models/project_locales.rb +249 -0
- data/lib/phrase/models/project_locales1.rb +196 -0
- data/lib/phrase/models/project_short.rb +230 -0
- data/lib/phrase/models/project_update_parameters.rb +245 -0
- data/lib/phrase/models/release.rb +290 -0
- data/lib/phrase/models/release_create_parameters.rb +217 -0
- data/lib/phrase/models/release_preview.rb +290 -0
- data/lib/phrase/models/release_update_parameters.rb +217 -0
- data/lib/phrase/models/screenshot.rb +248 -0
- data/lib/phrase/models/screenshot_create_parameters.rb +215 -0
- data/lib/phrase/models/screenshot_marker.rb +239 -0
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +205 -0
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +205 -0
- data/lib/phrase/models/screenshot_update_parameters.rb +215 -0
- data/lib/phrase/models/space.rb +241 -0
- data/lib/phrase/models/space_create_parameters.rb +195 -0
- data/lib/phrase/models/space_update_parameters.rb +195 -0
- data/lib/phrase/models/spaces_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/styleguide.rb +221 -0
- data/lib/phrase/models/styleguide_create_parameters.rb +315 -0
- data/lib/phrase/models/styleguide_details.rb +346 -0
- data/lib/phrase/models/styleguide_details1.rb +302 -0
- data/lib/phrase/models/styleguide_preview.rb +203 -0
- data/lib/phrase/models/styleguide_update_parameters.rb +315 -0
- data/lib/phrase/models/tag.rb +221 -0
- data/lib/phrase/models/tag_create_parameters.rb +205 -0
- data/lib/phrase/models/tag_with_stats.rb +240 -0
- data/lib/phrase/models/tag_with_stats1.rb +196 -0
- data/lib/phrase/models/tag_with_stats1_statistics.rb +221 -0
- data/lib/phrase/models/tag_with_stats1_statistics1.rb +203 -0
- data/lib/phrase/models/team.rb +254 -0
- data/lib/phrase/models/team_create_parameters.rb +195 -0
- data/lib/phrase/models/team_detail.rb +254 -0
- data/lib/phrase/models/team_update_parameters.rb +195 -0
- data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
- data/lib/phrase/models/translation.rb +286 -0
- data/lib/phrase/models/translation_create_parameters.rb +265 -0
- data/lib/phrase/models/translation_details.rb +312 -0
- data/lib/phrase/models/translation_details1.rb +203 -0
- data/lib/phrase/models/translation_exclude_parameters.rb +195 -0
- data/lib/phrase/models/translation_include_parameters.rb +195 -0
- data/lib/phrase/models/translation_key.rb +268 -0
- data/lib/phrase/models/translation_key_details.rb +357 -0
- data/lib/phrase/models/translation_key_details1.rb +266 -0
- data/lib/phrase/models/translation_order.rb +340 -0
- data/lib/phrase/models/translation_review_parameters.rb +195 -0
- data/lib/phrase/models/translation_unverify_parameters.rb +195 -0
- data/lib/phrase/models/translation_update_parameters.rb +245 -0
- data/lib/phrase/models/translation_verify_parameters.rb +195 -0
- data/lib/phrase/models/translation_version.rb +257 -0
- data/lib/phrase/models/translation_version_with_user.rb +274 -0
- data/lib/phrase/models/translation_version_with_user1.rb +194 -0
- data/lib/phrase/models/translations_exclude_parameters.rb +225 -0
- data/lib/phrase/models/translations_include_parameters.rb +225 -0
- data/lib/phrase/models/translations_review_parameters.rb +205 -0
- data/lib/phrase/models/translations_search_parameters.rb +225 -0
- data/lib/phrase/models/translations_unverify_parameters.rb +225 -0
- data/lib/phrase/models/translations_verify_parameters.rb +225 -0
- data/lib/phrase/models/upload.rb +257 -0
- data/lib/phrase/models/upload_create_parameters.rb +335 -0
- data/lib/phrase/models/upload_summary.rb +257 -0
- data/lib/phrase/models/user.rb +248 -0
- data/lib/phrase/models/user_preview.rb +212 -0
- data/lib/phrase/models/webhook.rb +250 -0
- data/lib/phrase/models/webhook_create_parameters.rb +225 -0
- data/lib/phrase/models/webhook_update_parameters.rb +225 -0
- data/lib/phrase/response.rb +41 -0
- data/lib/phrase/version.rb +1 -1
- data/phrase.gemspec +27 -27
- data/spec/api/accounts_api_spec.rb +50 -0
- data/spec/api/authorizations_api_spec.rb +90 -0
- data/spec/api/bitbucket_sync_api_spec.rb +64 -0
- data/spec/api/blacklisted_keys_api_spec.rb +96 -0
- data/spec/api/branches_api_spec.rb +124 -0
- data/spec/api/comments_api_spec.rb +151 -0
- data/spec/api/distributions_api_spec.rb +95 -0
- data/spec/api/documents_api_spec.rb +52 -0
- data/spec/api/formats_api_spec.rb +35 -0
- data/spec/api/git_hub_sync_api_spec.rb +49 -0
- data/spec/api/git_lab_sync_api_spec.rb +125 -0
- data/spec/api/glossaries_api_spec.rb +95 -0
- data/spec/api/glossary_term_translations_api_spec.rb +72 -0
- data/spec/api/glossary_terms_api_spec.rb +100 -0
- data/spec/api/invitations_api_spec.rb +109 -0
- data/spec/api/job_locales_api_spec.rb +135 -0
- data/spec/api/jobs_api_spec.rb +177 -0
- data/spec/api/keys_api_spec.rb +162 -0
- data/spec/api/locales_api_spec.rb +126 -0
- data/spec/api/members_api_spec.rb +81 -0
- data/spec/api/orders_api_spec.rb +98 -0
- data/spec/api/projects_api_spec.rb +90 -0
- data/spec/api/releases_api_spec.rb +115 -0
- data/spec/api/screenshot_markers_api_spec.rb +98 -0
- data/spec/api/screenshots_api_spec.rb +95 -0
- data/spec/api/spaces_api_spec.rb +141 -0
- data/spec/api/style_guides_api_spec.rb +95 -0
- data/spec/api/tags_api_spec.rb +83 -0
- data/spec/api/teams_api_spec.rb +185 -0
- data/spec/api/translations_api_spec.rb +287 -0
- data/spec/api/uploads_api_spec.rb +82 -0
- data/spec/api/users_api_spec.rb +35 -0
- data/spec/api/versions_history_api_spec.rb +56 -0
- data/spec/api/webhooks_api_spec.rb +109 -0
- data/spec/api_client_spec.rb +214 -0
- data/spec/configuration_spec.rb +30 -0
- data/spec/models/account_details1_spec.rb +29 -0
- data/spec/models/account_details_spec.rb +59 -0
- data/spec/models/account_spec.rb +59 -0
- data/spec/models/affected_count_spec.rb +29 -0
- data/spec/models/affected_resources_spec.rb +29 -0
- data/spec/models/authorization_create_parameters_spec.rb +41 -0
- data/spec/models/authorization_spec.rb +71 -0
- data/spec/models/authorization_update_parameters_spec.rb +41 -0
- data/spec/models/authorization_with_token1_spec.rb +29 -0
- data/spec/models/authorization_with_token_spec.rb +77 -0
- data/spec/models/bitbucket_sync_export_parameters_spec.rb +29 -0
- data/spec/models/bitbucket_sync_export_response_spec.rb +29 -0
- data/spec/models/bitbucket_sync_import_parameters_spec.rb +29 -0
- data/spec/models/bitbucket_sync_spec.rb +59 -0
- data/spec/models/blacklisted_key_create_parameters_spec.rb +29 -0
- data/spec/models/blacklisted_key_spec.rb +47 -0
- data/spec/models/blacklisted_key_update_parameters_spec.rb +29 -0
- data/spec/models/branch_create_parameters_spec.rb +29 -0
- data/spec/models/branch_merge_parameters_spec.rb +29 -0
- data/spec/models/branch_spec.rb +65 -0
- data/spec/models/branch_update_parameters_spec.rb +29 -0
- data/spec/models/comment_create_parameters_spec.rb +35 -0
- data/spec/models/comment_mark_read_parameters_spec.rb +29 -0
- data/spec/models/comment_spec.rb +53 -0
- data/spec/models/comment_update_parameters_spec.rb +35 -0
- data/spec/models/distribution_create_parameters_spec.rb +65 -0
- data/spec/models/distribution_preview_spec.rb +65 -0
- data/spec/models/distribution_spec.rb +65 -0
- data/spec/models/distribution_update_parameters_spec.rb +65 -0
- data/spec/models/document_spec.rb +47 -0
- data/spec/models/format_spec.rb +83 -0
- data/spec/models/github_sync_export_parameters_spec.rb +29 -0
- data/spec/models/github_sync_import_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_export_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_export_spec.rb +35 -0
- data/spec/models/gitlab_sync_history_spec.rb +53 -0
- data/spec/models/gitlab_sync_import_parameters_spec.rb +29 -0
- data/spec/models/gitlab_sync_spec.rb +89 -0
- data/spec/models/glossary_create_parameters_spec.rb +41 -0
- data/spec/models/glossary_spec.rb +53 -0
- data/spec/models/glossary_term_create_parameters_spec.rb +47 -0
- data/spec/models/glossary_term_spec.rb +71 -0
- data/spec/models/glossary_term_translation_create_parameters_spec.rb +35 -0
- data/spec/models/glossary_term_translation_spec.rb +53 -0
- data/spec/models/glossary_term_translation_update_parameters_spec.rb +35 -0
- data/spec/models/glossary_term_update_parameters_spec.rb +47 -0
- data/spec/models/glossary_update_parameters_spec.rb +41 -0
- data/spec/models/inline_response422_errors_spec.rb +41 -0
- data/spec/models/inline_response422_spec.rb +35 -0
- data/spec/models/invitation_create_parameters_spec.rb +53 -0
- data/spec/models/invitation_spec.rb +83 -0
- data/spec/models/invitation_update_parameters_spec.rb +47 -0
- data/spec/models/job_complete_parameters_spec.rb +29 -0
- data/spec/models/job_create_parameters_spec.rb +59 -0
- data/spec/models/job_details1_spec.rb +47 -0
- data/spec/models/job_details_spec.rb +89 -0
- data/spec/models/job_keys_create_parameters_spec.rb +35 -0
- data/spec/models/job_locale_complete_parameters_spec.rb +29 -0
- data/spec/models/job_locale_reopen_parameters_spec.rb +29 -0
- data/spec/models/job_locale_spec.rb +47 -0
- data/spec/models/job_locale_update_parameters_spec.rb +41 -0
- data/spec/models/job_locales_create_parameters_spec.rb +41 -0
- data/spec/models/job_preview_spec.rb +41 -0
- data/spec/models/job_reopen_parameters_spec.rb +29 -0
- data/spec/models/job_spec.rb +65 -0
- data/spec/models/job_start_parameters_spec.rb +29 -0
- data/spec/models/job_update_parameters_spec.rb +47 -0
- data/spec/models/key_create_parameters_spec.rb +113 -0
- data/spec/models/key_preview_spec.rb +41 -0
- data/spec/models/key_update_parameters_spec.rb +113 -0
- data/spec/models/keys_search_parameters_spec.rb +53 -0
- data/spec/models/keys_tag_parameters_spec.rb +47 -0
- data/spec/models/keys_untag_parameters_spec.rb +47 -0
- data/spec/models/locale_create_parameters_spec.rb +83 -0
- data/spec/models/locale_details1_spec.rb +29 -0
- data/spec/models/locale_details_spec.rb +89 -0
- data/spec/models/locale_preview_spec.rb +41 -0
- data/spec/models/locale_spec.rb +83 -0
- data/spec/models/locale_statistics_spec.rb +65 -0
- data/spec/models/locale_update_parameters_spec.rb +83 -0
- data/spec/models/member_spec.rb +53 -0
- data/spec/models/member_update_parameters_spec.rb +47 -0
- data/spec/models/order_confirm_parameters_spec.rb +29 -0
- data/spec/models/order_create_parameters_spec.rb +107 -0
- data/spec/models/project_create_parameters_spec.rb +65 -0
- data/spec/models/project_details1_spec.rb +35 -0
- data/spec/models/project_details_spec.rb +77 -0
- data/spec/models/project_locales1_spec.rb +29 -0
- data/spec/models/project_locales_spec.rb +59 -0
- data/spec/models/project_short_spec.rb +53 -0
- data/spec/models/project_spec.rb +71 -0
- data/spec/models/project_update_parameters_spec.rb +59 -0
- data/spec/models/release_create_parameters_spec.rb +41 -0
- data/spec/models/release_preview_spec.rb +89 -0
- data/spec/models/release_spec.rb +89 -0
- data/spec/models/release_update_parameters_spec.rb +41 -0
- data/spec/models/screenshot_create_parameters_spec.rb +41 -0
- data/spec/models/screenshot_marker_create_parameters_spec.rb +35 -0
- data/spec/models/screenshot_marker_spec.rb +59 -0
- data/spec/models/screenshot_marker_update_parameters_spec.rb +35 -0
- data/spec/models/screenshot_spec.rb +65 -0
- data/spec/models/screenshot_update_parameters_spec.rb +41 -0
- data/spec/models/space_create_parameters_spec.rb +29 -0
- data/spec/models/space_spec.rb +59 -0
- data/spec/models/space_update_parameters_spec.rb +29 -0
- data/spec/models/spaces_projects_create_parameters_spec.rb +29 -0
- data/spec/models/styleguide_create_parameters_spec.rb +101 -0
- data/spec/models/styleguide_details1_spec.rb +101 -0
- data/spec/models/styleguide_details_spec.rb +125 -0
- data/spec/models/styleguide_preview_spec.rb +35 -0
- data/spec/models/styleguide_spec.rb +47 -0
- data/spec/models/styleguide_update_parameters_spec.rb +101 -0
- data/spec/models/tag_create_parameters_spec.rb +35 -0
- data/spec/models/tag_spec.rb +47 -0
- data/spec/models/tag_with_stats1_spec.rb +29 -0
- data/spec/models/tag_with_stats1_statistics1_spec.rb +35 -0
- data/spec/models/tag_with_stats1_statistics_spec.rb +47 -0
- data/spec/models/tag_with_stats_spec.rb +53 -0
- data/spec/models/team_create_parameters_spec.rb +29 -0
- data/spec/models/team_detail_spec.rb +65 -0
- data/spec/models/team_spec.rb +65 -0
- data/spec/models/team_update_parameters_spec.rb +29 -0
- data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
- data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
- data/spec/models/teams_users_create_parameters_spec.rb +29 -0
- data/spec/models/translation_create_parameters_spec.rb +71 -0
- data/spec/models/translation_details1_spec.rb +35 -0
- data/spec/models/translation_details_spec.rb +101 -0
- data/spec/models/translation_exclude_parameters_spec.rb +29 -0
- data/spec/models/translation_include_parameters_spec.rb +29 -0
- data/spec/models/translation_key_details1_spec.rb +77 -0
- data/spec/models/translation_key_details_spec.rb +131 -0
- data/spec/models/translation_key_spec.rb +77 -0
- data/spec/models/translation_order_spec.rb +125 -0
- data/spec/models/translation_review_parameters_spec.rb +29 -0
- data/spec/models/translation_spec.rb +89 -0
- data/spec/models/translation_unverify_parameters_spec.rb +29 -0
- data/spec/models/translation_update_parameters_spec.rb +59 -0
- data/spec/models/translation_verify_parameters_spec.rb +29 -0
- data/spec/models/translation_version_spec.rb +71 -0
- data/spec/models/translation_version_with_user1_spec.rb +29 -0
- data/spec/models/translation_version_with_user_spec.rb +77 -0
- data/spec/models/translations_exclude_parameters_spec.rb +47 -0
- data/spec/models/translations_include_parameters_spec.rb +47 -0
- data/spec/models/translations_review_parameters_spec.rb +35 -0
- data/spec/models/translations_search_parameters_spec.rb +47 -0
- data/spec/models/translations_unverify_parameters_spec.rb +47 -0
- data/spec/models/translations_verify_parameters_spec.rb +47 -0
- data/spec/models/upload_create_parameters_spec.rb +113 -0
- data/spec/models/upload_spec.rb +71 -0
- data/spec/models/upload_summary_spec.rb +71 -0
- data/spec/models/user_preview_spec.rb +41 -0
- data/spec/models/user_spec.rb +65 -0
- data/spec/models/webhook_create_parameters_spec.rb +47 -0
- data/spec/models/webhook_spec.rb +65 -0
- data/spec/models/webhook_update_parameters_spec.rb +47 -0
- data/spec/spec_helper.rb +99 -0
- metadata +819 -188
- data/.gitignore +0 -25
- data/.travis.yml +0 -4
- data/Guardfile +0 -29
- data/bin/phrase +0 -8
- data/cacert.pem +0 -3366
- data/lib/ext/all.rb +0 -5
- data/lib/ext/hash.rb +0 -8
- data/lib/ext/object.rb +0 -130
- data/lib/ext/try.rb +0 -57
- data/lib/generators/phrase/install_generator.rb +0 -37
- data/lib/generators/templates/README +0 -11
- data/lib/generators/templates/phrase.rb +0 -21
- data/lib/phrase/adapters/fast_gettext.rb +0 -25
- data/lib/phrase/adapters/i18n.rb +0 -12
- data/lib/phrase/api.rb +0 -7
- data/lib/phrase/api/client.rb +0 -308
- data/lib/phrase/api/client/http.rb +0 -56
- data/lib/phrase/api/config.rb +0 -34
- data/lib/phrase/api/exceptions.rb +0 -9
- data/lib/phrase/api/query_params.rb +0 -22
- data/lib/phrase/backend.rb +0 -7
- data/lib/phrase/backend/base.rb +0 -6
- data/lib/phrase/backend/phrase_service.rb +0 -163
- data/lib/phrase/cache.rb +0 -34
- data/lib/phrase/config.rb +0 -94
- data/lib/phrase/delegate.rb +0 -36
- data/lib/phrase/delegate/fast_gettext.rb +0 -27
- data/lib/phrase/delegate/i18n.rb +0 -166
- data/lib/phrase/engine.rb +0 -14
- data/lib/phrase/formats.rb +0 -172
- data/lib/phrase/formats/angular_translate.rb +0 -19
- data/lib/phrase/formats/csv.rb +0 -19
- data/lib/phrase/formats/custom.rb +0 -40
- data/lib/phrase/formats/gettext.rb +0 -27
- data/lib/phrase/formats/gettext_template.rb +0 -19
- data/lib/phrase/formats/ini.rb +0 -19
- data/lib/phrase/formats/json.rb +0 -19
- data/lib/phrase/formats/laravel.rb +0 -19
- data/lib/phrase/formats/mozilla_properties.rb +0 -8
- data/lib/phrase/formats/nested_json.rb +0 -19
- data/lib/phrase/formats/node_json.rb +0 -23
- data/lib/phrase/formats/php_array.rb +0 -19
- data/lib/phrase/formats/play_properties.rb +0 -15
- data/lib/phrase/formats/plist.rb +0 -19
- data/lib/phrase/formats/properties.rb +0 -19
- data/lib/phrase/formats/properties_xml.rb +0 -19
- data/lib/phrase/formats/qt_phrase_book.rb +0 -19
- data/lib/phrase/formats/qt_translation_source.rb +0 -19
- data/lib/phrase/formats/resx.rb +0 -19
- data/lib/phrase/formats/resx_windowsphone.rb +0 -19
- data/lib/phrase/formats/simple_json.rb +0 -19
- data/lib/phrase/formats/strings.rb +0 -45
- data/lib/phrase/formats/tmx.rb +0 -19
- data/lib/phrase/formats/windows8_resource.rb +0 -19
- data/lib/phrase/formats/xliff.rb +0 -19
- data/lib/phrase/formats/xml.rb +0 -49
- data/lib/phrase/formats/yaml.rb +0 -19
- data/lib/phrase/formats/yaml_symfony.rb +0 -19
- data/lib/phrase/formats/yaml_symfony2.rb +0 -8
- data/lib/phrase/hash_flattener.rb +0 -21
- data/lib/phrase/tool.rb +0 -46
- data/lib/phrase/tool/commands.rb +0 -56
- data/lib/phrase/tool/commands/base.rb +0 -73
- data/lib/phrase/tool/commands/init.rb +0 -51
- data/lib/phrase/tool/commands/pull.rb +0 -109
- data/lib/phrase/tool/commands/push.rb +0 -163
- data/lib/phrase/tool/commands/show_help.rb +0 -26
- data/lib/phrase/tool/commands/show_version.rb +0 -17
- data/lib/phrase/tool/commands/tags.rb +0 -29
- data/lib/phrase/tool/config.rb +0 -120
- data/lib/phrase/tool/encoding_detector.rb +0 -17
- data/lib/phrase/tool/locale.rb +0 -41
- data/lib/phrase/tool/options.rb +0 -32
- data/lib/phrase/tool/options_factory.rb +0 -150
- data/lib/phrase/tool/tag_validator.rb +0 -9
- data/lib/phrase/view_helpers.rb +0 -19
@@ -0,0 +1,348 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class ProjectsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Create a project
|
11
|
+
# Create a new project.
|
12
|
+
# @param project_create_parameters [ProjectCreateParameters]
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
15
|
+
# @return [ProjectDetails]
|
16
|
+
def project_create(project_create_parameters, opts = {})
|
17
|
+
data, _status_code, _headers = project_create_with_http_info(project_create_parameters, opts)
|
18
|
+
data
|
19
|
+
end
|
20
|
+
|
21
|
+
# Create a project
|
22
|
+
# Create a new project.
|
23
|
+
# @param project_create_parameters [ProjectCreateParameters]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
26
|
+
# @return [Array<(Response<(ProjectDetails)>, Integer, Hash)>] Response<(ProjectDetails)> data, response status code and response headers
|
27
|
+
def project_create_with_http_info(project_create_parameters, opts = {})
|
28
|
+
if @api_client.config.debugging
|
29
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_create ...'
|
30
|
+
end
|
31
|
+
# verify the required parameter 'project_create_parameters' is set
|
32
|
+
if @api_client.config.client_side_validation && project_create_parameters.nil?
|
33
|
+
fail ArgumentError, "Missing the required parameter 'project_create_parameters' when calling ProjectsApi.project_create"
|
34
|
+
end
|
35
|
+
# resource path
|
36
|
+
local_var_path = '/projects'
|
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(project_create_parameters)
|
54
|
+
|
55
|
+
# return_type
|
56
|
+
return_type = opts[:return_type] || 'ProjectDetails'
|
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: ProjectsApi#project_create\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
|
+
# Delete a project
|
79
|
+
# Delete an existing project.
|
80
|
+
# @param id [String] ID
|
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 project_delete(id, opts = {})
|
85
|
+
data, _status_code, _headers = project_delete_with_http_info(id, opts)
|
86
|
+
data
|
87
|
+
end
|
88
|
+
|
89
|
+
# Delete a project
|
90
|
+
# Delete an existing project.
|
91
|
+
# @param id [String] ID
|
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 project_delete_with_http_info(id, opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_delete ...'
|
98
|
+
end
|
99
|
+
# verify the required parameter 'id' is set
|
100
|
+
if @api_client.config.client_side_validation && id.nil?
|
101
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.project_delete"
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = opts[:query_params] || {}
|
108
|
+
|
109
|
+
# header parameters
|
110
|
+
header_params = opts[:header_params] || {}
|
111
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
112
|
+
|
113
|
+
# form parameters
|
114
|
+
form_params = opts[:form_params] || {}
|
115
|
+
|
116
|
+
# http body (model)
|
117
|
+
post_body = opts[:body]
|
118
|
+
|
119
|
+
# return_type
|
120
|
+
return_type = opts[:return_type]
|
121
|
+
|
122
|
+
# auth_names
|
123
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
124
|
+
|
125
|
+
new_options = opts.merge(
|
126
|
+
:header_params => header_params,
|
127
|
+
:query_params => query_params,
|
128
|
+
:form_params => form_params,
|
129
|
+
:body => post_body,
|
130
|
+
:auth_names => auth_names,
|
131
|
+
:return_type => return_type
|
132
|
+
)
|
133
|
+
|
134
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
135
|
+
if @api_client.config.debugging
|
136
|
+
@api_client.config.logger.debug "API called: ProjectsApi#project_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
137
|
+
end
|
138
|
+
response = ::Phrase::Response.new(data, headers)
|
139
|
+
return response, status_code, headers
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get a single project
|
143
|
+
# Get details on a single project.
|
144
|
+
# @param id [String] ID
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
147
|
+
# @return [ProjectDetails]
|
148
|
+
def project_show(id, opts = {})
|
149
|
+
data, _status_code, _headers = project_show_with_http_info(id, opts)
|
150
|
+
data
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get a single project
|
154
|
+
# Get details on a single project.
|
155
|
+
# @param id [String] ID
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
158
|
+
# @return [Array<(Response<(ProjectDetails)>, Integer, Hash)>] Response<(ProjectDetails)> data, response status code and response headers
|
159
|
+
def project_show_with_http_info(id, opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_show ...'
|
162
|
+
end
|
163
|
+
# verify the required parameter 'id' is set
|
164
|
+
if @api_client.config.client_side_validation && id.nil?
|
165
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.project_show"
|
166
|
+
end
|
167
|
+
# resource path
|
168
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = opts[:query_params] || {}
|
172
|
+
|
173
|
+
# header parameters
|
174
|
+
header_params = opts[:header_params] || {}
|
175
|
+
# HTTP header 'Accept' (if needed)
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
177
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:return_type] || 'ProjectDetails'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:form_params => form_params,
|
195
|
+
:body => post_body,
|
196
|
+
:auth_names => auth_names,
|
197
|
+
:return_type => return_type
|
198
|
+
)
|
199
|
+
|
200
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
201
|
+
if @api_client.config.debugging
|
202
|
+
@api_client.config.logger.debug "API called: ProjectsApi#project_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
203
|
+
end
|
204
|
+
response = ::Phrase::Response.new(data, headers)
|
205
|
+
return response, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# Update a project
|
209
|
+
# Update an existing project.
|
210
|
+
# @param id [String] ID
|
211
|
+
# @param project_update_parameters [ProjectUpdateParameters]
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
214
|
+
# @return [ProjectDetails]
|
215
|
+
def project_update(id, project_update_parameters, opts = {})
|
216
|
+
data, _status_code, _headers = project_update_with_http_info(id, project_update_parameters, opts)
|
217
|
+
data
|
218
|
+
end
|
219
|
+
|
220
|
+
# Update a project
|
221
|
+
# Update an existing project.
|
222
|
+
# @param id [String] ID
|
223
|
+
# @param project_update_parameters [ProjectUpdateParameters]
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
226
|
+
# @return [Array<(Response<(ProjectDetails)>, Integer, Hash)>] Response<(ProjectDetails)> data, response status code and response headers
|
227
|
+
def project_update_with_http_info(id, project_update_parameters, opts = {})
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_update ...'
|
230
|
+
end
|
231
|
+
# verify the required parameter 'id' is set
|
232
|
+
if @api_client.config.client_side_validation && id.nil?
|
233
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.project_update"
|
234
|
+
end
|
235
|
+
# verify the required parameter 'project_update_parameters' is set
|
236
|
+
if @api_client.config.client_side_validation && project_update_parameters.nil?
|
237
|
+
fail ArgumentError, "Missing the required parameter 'project_update_parameters' when calling ProjectsApi.project_update"
|
238
|
+
end
|
239
|
+
# resource path
|
240
|
+
local_var_path = '/projects/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
241
|
+
|
242
|
+
# query parameters
|
243
|
+
query_params = opts[:query_params] || {}
|
244
|
+
|
245
|
+
# header parameters
|
246
|
+
header_params = opts[:header_params] || {}
|
247
|
+
# HTTP header 'Accept' (if needed)
|
248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
249
|
+
# HTTP header 'Content-Type'
|
250
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
251
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:body] || @api_client.object_to_http_body(project_update_parameters)
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:return_type] || 'ProjectDetails'
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:header_params => header_params,
|
267
|
+
:query_params => query_params,
|
268
|
+
:form_params => form_params,
|
269
|
+
:body => post_body,
|
270
|
+
:auth_names => auth_names,
|
271
|
+
:return_type => return_type
|
272
|
+
)
|
273
|
+
|
274
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
275
|
+
if @api_client.config.debugging
|
276
|
+
@api_client.config.logger.debug "API called: ProjectsApi#project_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
277
|
+
end
|
278
|
+
response = ::Phrase::Response.new(data, headers)
|
279
|
+
return response, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# List projects
|
283
|
+
# List all projects the current user has access to.
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
286
|
+
# @option opts [Integer] :page Page number
|
287
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
288
|
+
# @return [Array<Project>]
|
289
|
+
def projects_list(opts = {})
|
290
|
+
data, _status_code, _headers = projects_list_with_http_info(opts)
|
291
|
+
data
|
292
|
+
end
|
293
|
+
|
294
|
+
# List projects
|
295
|
+
# List all projects the current user has access to.
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
298
|
+
# @option opts [Integer] :page Page number
|
299
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
300
|
+
# @return [Array<(Response<(Array<Project>)>, Integer, Hash)>] Response<(Array<Project>)> data, response status code and response headers
|
301
|
+
def projects_list_with_http_info(opts = {})
|
302
|
+
if @api_client.config.debugging
|
303
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_list ...'
|
304
|
+
end
|
305
|
+
# resource path
|
306
|
+
local_var_path = '/projects'
|
307
|
+
|
308
|
+
# query parameters
|
309
|
+
query_params = opts[:query_params] || {}
|
310
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
311
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
312
|
+
|
313
|
+
# header parameters
|
314
|
+
header_params = opts[:header_params] || {}
|
315
|
+
# HTTP header 'Accept' (if needed)
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
317
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
318
|
+
|
319
|
+
# form parameters
|
320
|
+
form_params = opts[:form_params] || {}
|
321
|
+
|
322
|
+
# http body (model)
|
323
|
+
post_body = opts[:body]
|
324
|
+
|
325
|
+
# return_type
|
326
|
+
return_type = opts[:return_type] || 'Array<Project>'
|
327
|
+
|
328
|
+
# auth_names
|
329
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
330
|
+
|
331
|
+
new_options = opts.merge(
|
332
|
+
:header_params => header_params,
|
333
|
+
:query_params => query_params,
|
334
|
+
:form_params => form_params,
|
335
|
+
:body => post_body,
|
336
|
+
:auth_names => auth_names,
|
337
|
+
:return_type => return_type
|
338
|
+
)
|
339
|
+
|
340
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
341
|
+
if @api_client.config.debugging
|
342
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
343
|
+
end
|
344
|
+
response = ::Phrase::Response.new(data, headers)
|
345
|
+
return response, status_code, headers
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|
@@ -0,0 +1,486 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class ReleasesApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Create a release
|
11
|
+
# Create a new release.
|
12
|
+
# @param account_id [String] Account ID
|
13
|
+
# @param distribution_id [String] Distribution ID
|
14
|
+
# @param release_create_parameters [ReleaseCreateParameters]
|
15
|
+
# @param [Hash] opts the optional parameters
|
16
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
|
+
# @return [Release]
|
18
|
+
def release_create(account_id, distribution_id, release_create_parameters, opts = {})
|
19
|
+
data, _status_code, _headers = release_create_with_http_info(account_id, distribution_id, release_create_parameters, opts)
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a release
|
24
|
+
# Create a new release.
|
25
|
+
# @param account_id [String] Account ID
|
26
|
+
# @param distribution_id [String] Distribution ID
|
27
|
+
# @param release_create_parameters [ReleaseCreateParameters]
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
30
|
+
# @return [Array<(Response<(Release)>, Integer, Hash)>] Response<(Release)> data, response status code and response headers
|
31
|
+
def release_create_with_http_info(account_id, distribution_id, release_create_parameters, opts = {})
|
32
|
+
if @api_client.config.debugging
|
33
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_create ...'
|
34
|
+
end
|
35
|
+
# verify the required parameter 'account_id' is set
|
36
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
37
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.release_create"
|
38
|
+
end
|
39
|
+
# verify the required parameter 'distribution_id' is set
|
40
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.release_create"
|
42
|
+
end
|
43
|
+
# verify the required parameter 'release_create_parameters' is set
|
44
|
+
if @api_client.config.client_side_validation && release_create_parameters.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'release_create_parameters' when calling ReleasesApi.release_create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(release_create_parameters)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'Release'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: ReleasesApi#release_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
response = ::Phrase::Response.new(data, headers)
|
87
|
+
return response, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Delete a release
|
91
|
+
# Delete an existing release.
|
92
|
+
# @param account_id [String] Account ID
|
93
|
+
# @param distribution_id [String] Distribution ID
|
94
|
+
# @param id [String] ID
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
97
|
+
# @return [nil]
|
98
|
+
def release_delete(account_id, distribution_id, id, opts = {})
|
99
|
+
data, _status_code, _headers = release_delete_with_http_info(account_id, distribution_id, id, opts)
|
100
|
+
data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Delete a release
|
104
|
+
# Delete an existing release.
|
105
|
+
# @param account_id [String] Account ID
|
106
|
+
# @param distribution_id [String] Distribution ID
|
107
|
+
# @param id [String] ID
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
110
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
111
|
+
def release_delete_with_http_info(account_id, distribution_id, id, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_delete ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'account_id' is set
|
116
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.release_delete"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'distribution_id' is set
|
120
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.release_delete"
|
122
|
+
end
|
123
|
+
# verify the required parameter 'id' is set
|
124
|
+
if @api_client.config.client_side_validation && id.nil?
|
125
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReleasesApi.release_delete"
|
126
|
+
end
|
127
|
+
# resource path
|
128
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
129
|
+
|
130
|
+
# query parameters
|
131
|
+
query_params = opts[:query_params] || {}
|
132
|
+
|
133
|
+
# header parameters
|
134
|
+
header_params = opts[:header_params] || {}
|
135
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
136
|
+
|
137
|
+
# form parameters
|
138
|
+
form_params = opts[:form_params] || {}
|
139
|
+
|
140
|
+
# http body (model)
|
141
|
+
post_body = opts[:body]
|
142
|
+
|
143
|
+
# return_type
|
144
|
+
return_type = opts[:return_type]
|
145
|
+
|
146
|
+
# auth_names
|
147
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
148
|
+
|
149
|
+
new_options = opts.merge(
|
150
|
+
:header_params => header_params,
|
151
|
+
:query_params => query_params,
|
152
|
+
:form_params => form_params,
|
153
|
+
:body => post_body,
|
154
|
+
:auth_names => auth_names,
|
155
|
+
:return_type => return_type
|
156
|
+
)
|
157
|
+
|
158
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug "API called: ReleasesApi#release_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
161
|
+
end
|
162
|
+
response = ::Phrase::Response.new(data, headers)
|
163
|
+
return response, status_code, headers
|
164
|
+
end
|
165
|
+
|
166
|
+
# Publish a release
|
167
|
+
# Publish a release for production.
|
168
|
+
# @param account_id [String] Account ID
|
169
|
+
# @param distribution_id [String] Distribution ID
|
170
|
+
# @param id [String] ID
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
173
|
+
# @return [Release]
|
174
|
+
def release_publish(account_id, distribution_id, id, opts = {})
|
175
|
+
data, _status_code, _headers = release_publish_with_http_info(account_id, distribution_id, id, opts)
|
176
|
+
data
|
177
|
+
end
|
178
|
+
|
179
|
+
# Publish a release
|
180
|
+
# Publish a release for production.
|
181
|
+
# @param account_id [String] Account ID
|
182
|
+
# @param distribution_id [String] Distribution ID
|
183
|
+
# @param id [String] ID
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
186
|
+
# @return [Array<(Response<(Release)>, Integer, Hash)>] Response<(Release)> data, response status code and response headers
|
187
|
+
def release_publish_with_http_info(account_id, distribution_id, id, opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_publish ...'
|
190
|
+
end
|
191
|
+
# verify the required parameter 'account_id' is set
|
192
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.release_publish"
|
194
|
+
end
|
195
|
+
# verify the required parameter 'distribution_id' is set
|
196
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.release_publish"
|
198
|
+
end
|
199
|
+
# verify the required parameter 'id' is set
|
200
|
+
if @api_client.config.client_side_validation && id.nil?
|
201
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReleasesApi.release_publish"
|
202
|
+
end
|
203
|
+
# resource path
|
204
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases/{id}/publish'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
205
|
+
|
206
|
+
# query parameters
|
207
|
+
query_params = opts[:query_params] || {}
|
208
|
+
|
209
|
+
# header parameters
|
210
|
+
header_params = opts[:header_params] || {}
|
211
|
+
# HTTP header 'Accept' (if needed)
|
212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
213
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
214
|
+
|
215
|
+
# form parameters
|
216
|
+
form_params = opts[:form_params] || {}
|
217
|
+
|
218
|
+
# http body (model)
|
219
|
+
post_body = opts[:body]
|
220
|
+
|
221
|
+
# return_type
|
222
|
+
return_type = opts[:return_type] || 'Release'
|
223
|
+
|
224
|
+
# auth_names
|
225
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
226
|
+
|
227
|
+
new_options = opts.merge(
|
228
|
+
:header_params => header_params,
|
229
|
+
:query_params => query_params,
|
230
|
+
:form_params => form_params,
|
231
|
+
:body => post_body,
|
232
|
+
:auth_names => auth_names,
|
233
|
+
:return_type => return_type
|
234
|
+
)
|
235
|
+
|
236
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: ReleasesApi#release_publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
response = ::Phrase::Response.new(data, headers)
|
241
|
+
return response, status_code, headers
|
242
|
+
end
|
243
|
+
|
244
|
+
# Get a single release
|
245
|
+
# Get details on a single release.
|
246
|
+
# @param account_id [String] Account ID
|
247
|
+
# @param distribution_id [String] Distribution ID
|
248
|
+
# @param id [String] ID
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
251
|
+
# @return [Release]
|
252
|
+
def release_show(account_id, distribution_id, id, opts = {})
|
253
|
+
data, _status_code, _headers = release_show_with_http_info(account_id, distribution_id, id, opts)
|
254
|
+
data
|
255
|
+
end
|
256
|
+
|
257
|
+
# Get a single release
|
258
|
+
# Get details on a single release.
|
259
|
+
# @param account_id [String] Account ID
|
260
|
+
# @param distribution_id [String] Distribution ID
|
261
|
+
# @param id [String] ID
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
264
|
+
# @return [Array<(Response<(Release)>, Integer, Hash)>] Response<(Release)> data, response status code and response headers
|
265
|
+
def release_show_with_http_info(account_id, distribution_id, id, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_show ...'
|
268
|
+
end
|
269
|
+
# verify the required parameter 'account_id' is set
|
270
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.release_show"
|
272
|
+
end
|
273
|
+
# verify the required parameter 'distribution_id' is set
|
274
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
275
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.release_show"
|
276
|
+
end
|
277
|
+
# verify the required parameter 'id' is set
|
278
|
+
if @api_client.config.client_side_validation && id.nil?
|
279
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReleasesApi.release_show"
|
280
|
+
end
|
281
|
+
# resource path
|
282
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
283
|
+
|
284
|
+
# query parameters
|
285
|
+
query_params = opts[:query_params] || {}
|
286
|
+
|
287
|
+
# header parameters
|
288
|
+
header_params = opts[:header_params] || {}
|
289
|
+
# HTTP header 'Accept' (if needed)
|
290
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
291
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
292
|
+
|
293
|
+
# form parameters
|
294
|
+
form_params = opts[:form_params] || {}
|
295
|
+
|
296
|
+
# http body (model)
|
297
|
+
post_body = opts[:body]
|
298
|
+
|
299
|
+
# return_type
|
300
|
+
return_type = opts[:return_type] || 'Release'
|
301
|
+
|
302
|
+
# auth_names
|
303
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
304
|
+
|
305
|
+
new_options = opts.merge(
|
306
|
+
:header_params => header_params,
|
307
|
+
:query_params => query_params,
|
308
|
+
:form_params => form_params,
|
309
|
+
:body => post_body,
|
310
|
+
:auth_names => auth_names,
|
311
|
+
:return_type => return_type
|
312
|
+
)
|
313
|
+
|
314
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
315
|
+
if @api_client.config.debugging
|
316
|
+
@api_client.config.logger.debug "API called: ReleasesApi#release_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
317
|
+
end
|
318
|
+
response = ::Phrase::Response.new(data, headers)
|
319
|
+
return response, status_code, headers
|
320
|
+
end
|
321
|
+
|
322
|
+
# Update a release
|
323
|
+
# Update an existing release.
|
324
|
+
# @param account_id [String] Account ID
|
325
|
+
# @param distribution_id [String] Distribution ID
|
326
|
+
# @param id [String] ID
|
327
|
+
# @param release_update_parameters [ReleaseUpdateParameters]
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
330
|
+
# @return [Release]
|
331
|
+
def release_update(account_id, distribution_id, id, release_update_parameters, opts = {})
|
332
|
+
data, _status_code, _headers = release_update_with_http_info(account_id, distribution_id, id, release_update_parameters, opts)
|
333
|
+
data
|
334
|
+
end
|
335
|
+
|
336
|
+
# Update a release
|
337
|
+
# Update an existing release.
|
338
|
+
# @param account_id [String] Account ID
|
339
|
+
# @param distribution_id [String] Distribution ID
|
340
|
+
# @param id [String] ID
|
341
|
+
# @param release_update_parameters [ReleaseUpdateParameters]
|
342
|
+
# @param [Hash] opts the optional parameters
|
343
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
344
|
+
# @return [Array<(Response<(Release)>, Integer, Hash)>] Response<(Release)> data, response status code and response headers
|
345
|
+
def release_update_with_http_info(account_id, distribution_id, id, release_update_parameters, opts = {})
|
346
|
+
if @api_client.config.debugging
|
347
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_update ...'
|
348
|
+
end
|
349
|
+
# verify the required parameter 'account_id' is set
|
350
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
351
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.release_update"
|
352
|
+
end
|
353
|
+
# verify the required parameter 'distribution_id' is set
|
354
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.release_update"
|
356
|
+
end
|
357
|
+
# verify the required parameter 'id' is set
|
358
|
+
if @api_client.config.client_side_validation && id.nil?
|
359
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ReleasesApi.release_update"
|
360
|
+
end
|
361
|
+
# verify the required parameter 'release_update_parameters' is set
|
362
|
+
if @api_client.config.client_side_validation && release_update_parameters.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'release_update_parameters' when calling ReleasesApi.release_update"
|
364
|
+
end
|
365
|
+
# resource path
|
366
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
367
|
+
|
368
|
+
# query parameters
|
369
|
+
query_params = opts[:query_params] || {}
|
370
|
+
|
371
|
+
# header parameters
|
372
|
+
header_params = opts[:header_params] || {}
|
373
|
+
# HTTP header 'Accept' (if needed)
|
374
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
375
|
+
# HTTP header 'Content-Type'
|
376
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
377
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
378
|
+
|
379
|
+
# form parameters
|
380
|
+
form_params = opts[:form_params] || {}
|
381
|
+
|
382
|
+
# http body (model)
|
383
|
+
post_body = opts[:body] || @api_client.object_to_http_body(release_update_parameters)
|
384
|
+
|
385
|
+
# return_type
|
386
|
+
return_type = opts[:return_type] || 'Release'
|
387
|
+
|
388
|
+
# auth_names
|
389
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
390
|
+
|
391
|
+
new_options = opts.merge(
|
392
|
+
:header_params => header_params,
|
393
|
+
:query_params => query_params,
|
394
|
+
:form_params => form_params,
|
395
|
+
:body => post_body,
|
396
|
+
:auth_names => auth_names,
|
397
|
+
:return_type => return_type
|
398
|
+
)
|
399
|
+
|
400
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
401
|
+
if @api_client.config.debugging
|
402
|
+
@api_client.config.logger.debug "API called: ReleasesApi#release_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
403
|
+
end
|
404
|
+
response = ::Phrase::Response.new(data, headers)
|
405
|
+
return response, status_code, headers
|
406
|
+
end
|
407
|
+
|
408
|
+
# List releases
|
409
|
+
# List all releases for the given distribution.
|
410
|
+
# @param account_id [String] Account ID
|
411
|
+
# @param distribution_id [String] Distribution ID
|
412
|
+
# @param [Hash] opts the optional parameters
|
413
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
414
|
+
# @option opts [Integer] :page Page number
|
415
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
416
|
+
# @return [Array<ReleasePreview>]
|
417
|
+
def releases_list(account_id, distribution_id, opts = {})
|
418
|
+
data, _status_code, _headers = releases_list_with_http_info(account_id, distribution_id, opts)
|
419
|
+
data
|
420
|
+
end
|
421
|
+
|
422
|
+
# List releases
|
423
|
+
# List all releases for the given distribution.
|
424
|
+
# @param account_id [String] Account ID
|
425
|
+
# @param distribution_id [String] Distribution ID
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
428
|
+
# @option opts [Integer] :page Page number
|
429
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
430
|
+
# @return [Array<(Response<(Array<ReleasePreview>)>, Integer, Hash)>] Response<(Array<ReleasePreview>)> data, response status code and response headers
|
431
|
+
def releases_list_with_http_info(account_id, distribution_id, opts = {})
|
432
|
+
if @api_client.config.debugging
|
433
|
+
@api_client.config.logger.debug 'Calling API: ReleasesApi.releases_list ...'
|
434
|
+
end
|
435
|
+
# verify the required parameter 'account_id' is set
|
436
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
437
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleasesApi.releases_list"
|
438
|
+
end
|
439
|
+
# verify the required parameter 'distribution_id' is set
|
440
|
+
if @api_client.config.client_side_validation && distribution_id.nil?
|
441
|
+
fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleasesApi.releases_list"
|
442
|
+
end
|
443
|
+
# resource path
|
444
|
+
local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/releases'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s))
|
445
|
+
|
446
|
+
# query parameters
|
447
|
+
query_params = opts[:query_params] || {}
|
448
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
449
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
450
|
+
|
451
|
+
# header parameters
|
452
|
+
header_params = opts[:header_params] || {}
|
453
|
+
# HTTP header 'Accept' (if needed)
|
454
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
455
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
456
|
+
|
457
|
+
# form parameters
|
458
|
+
form_params = opts[:form_params] || {}
|
459
|
+
|
460
|
+
# http body (model)
|
461
|
+
post_body = opts[:body]
|
462
|
+
|
463
|
+
# return_type
|
464
|
+
return_type = opts[:return_type] || 'Array<ReleasePreview>'
|
465
|
+
|
466
|
+
# auth_names
|
467
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
468
|
+
|
469
|
+
new_options = opts.merge(
|
470
|
+
:header_params => header_params,
|
471
|
+
:query_params => query_params,
|
472
|
+
:form_params => form_params,
|
473
|
+
:body => post_body,
|
474
|
+
:auth_names => auth_names,
|
475
|
+
:return_type => return_type
|
476
|
+
)
|
477
|
+
|
478
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
479
|
+
if @api_client.config.debugging
|
480
|
+
@api_client.config.logger.debug "API called: ReleasesApi#releases_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
481
|
+
end
|
482
|
+
response = ::Phrase::Response.new(data, headers)
|
483
|
+
return response, status_code, headers
|
484
|
+
end
|
485
|
+
end
|
486
|
+
end
|