phrase 1.0.2 → 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 +4 -4
- data/README.md +12 -3
- data/docs/Account.md +2 -0
- data/docs/AccountDetails.md +3 -3
- data/docs/AccountsApi.md +2 -2
- data/docs/AuthorizationsApi.md +2 -2
- data/docs/BlacklistedKeysApi.md +4 -2
- data/docs/BranchesApi.md +2 -2
- data/docs/CommentsApi.md +2 -2
- data/docs/DistributionsApi.md +2 -2
- data/docs/Document.md +23 -0
- data/docs/DocumentsApi.md +137 -0
- data/docs/GitHubSyncApi.md +130 -0
- data/docs/GitLabSyncApi.md +2 -2
- data/docs/GithubSyncExportParameters.md +17 -0
- data/docs/GithubSyncImportParameters.md +17 -0
- data/docs/GlossariesApi.md +2 -2
- data/docs/GlossaryTermsApi.md +2 -2
- data/docs/InlineResponse422.md +19 -0
- data/docs/InlineResponse422Errors.md +21 -0
- data/docs/InvitationsApi.md +2 -2
- data/docs/JobLocalesApi.md +2 -2
- data/docs/JobsApi.md +2 -2
- data/docs/KeysApi.md +4 -4
- data/docs/LocalesApi.md +2 -2
- data/docs/MembersApi.md +2 -2
- data/docs/OrdersApi.md +2 -2
- data/docs/Project.md +2 -0
- data/docs/ProjectDetails.md +2 -2
- data/docs/ProjectsApi.md +2 -2
- data/docs/ReleasesApi.md +2 -2
- data/docs/ScreenshotMarkersApi.md +2 -2
- data/docs/ScreenshotsApi.md +2 -2
- data/docs/SpacesApi.md +4 -4
- data/docs/StyleGuidesApi.md +2 -2
- data/docs/TagsApi.md +2 -2
- data/docs/TeamsApi.md +2 -2
- data/docs/TranslationsApi.md +8 -8
- data/docs/UploadsApi.md +2 -2
- data/docs/VersionsHistoryApi.md +2 -2
- data/docs/WebhooksApi.md +2 -2
- data/lib/phrase.rb +7 -0
- data/lib/phrase/api/accounts_api.rb +2 -2
- data/lib/phrase/api/authorizations_api.rb +2 -2
- data/lib/phrase/api/blacklisted_keys_api.rb +5 -2
- data/lib/phrase/api/branches_api.rb +2 -2
- data/lib/phrase/api/comments_api.rb +2 -2
- data/lib/phrase/api/distributions_api.rb +2 -2
- data/lib/phrase/api/documents_api.rb +152 -0
- data/lib/phrase/api/git_hub_sync_api.rb +146 -0
- data/lib/phrase/api/git_lab_sync_api.rb +2 -2
- data/lib/phrase/api/glossaries_api.rb +2 -2
- data/lib/phrase/api/glossary_terms_api.rb +2 -2
- data/lib/phrase/api/invitations_api.rb +2 -2
- data/lib/phrase/api/job_locales_api.rb +2 -2
- data/lib/phrase/api/jobs_api.rb +2 -2
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locales_api.rb +2 -2
- data/lib/phrase/api/members_api.rb +2 -2
- data/lib/phrase/api/orders_api.rb +2 -2
- data/lib/phrase/api/projects_api.rb +2 -2
- data/lib/phrase/api/releases_api.rb +2 -2
- data/lib/phrase/api/screenshot_markers_api.rb +2 -2
- data/lib/phrase/api/screenshots_api.rb +2 -2
- data/lib/phrase/api/spaces_api.rb +4 -4
- data/lib/phrase/api/style_guides_api.rb +2 -2
- data/lib/phrase/api/tags_api.rb +2 -2
- data/lib/phrase/api/teams_api.rb +2 -2
- data/lib/phrase/api/translations_api.rb +8 -8
- data/lib/phrase/api/uploads_api.rb +2 -2
- data/lib/phrase/api/versions_history_api.rb +2 -2
- data/lib/phrase/api/webhooks_api.rb +2 -2
- data/lib/phrase/models/account.rb +10 -1
- data/lib/phrase/models/account_details.rb +13 -13
- data/lib/phrase/models/document.rb +221 -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/inline_response422.rb +205 -0
- data/lib/phrase/models/inline_response422_errors.rb +212 -0
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_details.rb +10 -10
- data/lib/phrase/version.rb +1 -1
- data/spec/api/accounts_api_spec.rb +1 -1
- data/spec/api/authorizations_api_spec.rb +1 -1
- data/spec/api/blacklisted_keys_api_spec.rb +2 -1
- data/spec/api/branches_api_spec.rb +1 -1
- data/spec/api/comments_api_spec.rb +1 -1
- data/spec/api/distributions_api_spec.rb +1 -1
- data/spec/api/documents_api_spec.rb +52 -0
- data/spec/api/git_hub_sync_api_spec.rb +49 -0
- data/spec/api/git_lab_sync_api_spec.rb +1 -1
- data/spec/api/glossaries_api_spec.rb +1 -1
- data/spec/api/glossary_terms_api_spec.rb +1 -1
- data/spec/api/invitations_api_spec.rb +1 -1
- data/spec/api/job_locales_api_spec.rb +1 -1
- data/spec/api/jobs_api_spec.rb +1 -1
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locales_api_spec.rb +1 -1
- data/spec/api/members_api_spec.rb +1 -1
- data/spec/api/orders_api_spec.rb +1 -1
- data/spec/api/projects_api_spec.rb +1 -1
- data/spec/api/releases_api_spec.rb +1 -1
- data/spec/api/screenshot_markers_api_spec.rb +1 -1
- data/spec/api/screenshots_api_spec.rb +1 -1
- data/spec/api/spaces_api_spec.rb +2 -2
- data/spec/api/style_guides_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +1 -1
- data/spec/api/teams_api_spec.rb +1 -1
- data/spec/api/translations_api_spec.rb +4 -4
- data/spec/api/uploads_api_spec.rb +1 -1
- data/spec/api/versions_history_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/account_details_spec.rb +4 -4
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/document_spec.rb +47 -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/inline_response422_errors_spec.rb +41 -0
- data/spec/models/inline_response422_spec.rb +35 -0
- data/spec/models/project_details_spec.rb +6 -6
- data/spec/models/project_spec.rb +6 -0
- metadata +181 -153
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a2a3ba240b5fe6192611ada80af8b0e4801f5d8b3719537257c63acff09d41e
|
|
4
|
+
data.tar.gz: 61a4a7f0c7a3dabd110a1b5c9c585c59238977a5cbdcf52f6139e8d2bac3d9de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a798dcbf704b4b174f4cf7aca3df46abea328efd23dcd0668c23c775e79f73ebaf1dfa2620cfb06e0db2eb20aa12d5b94be4ba4dfb8d817d17f82fa856c2540
|
|
7
|
+
data.tar.gz: 36f134b201a9d3c770a413b67bad3418fe2ad9b1e254dc0de6fdce651f21ff0a2b02df37d40edf2176698f4a91119486bda4163820ee01d7c470a52ca7a837cc
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
|
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 1.0.
|
|
10
|
+
- Package version: 1.0.3
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
|
|
13
13
|
|
|
@@ -56,10 +56,10 @@ gem build phrase.gemspec
|
|
|
56
56
|
Then install the gem locally:
|
|
57
57
|
|
|
58
58
|
```shell
|
|
59
|
-
gem install ./phrase-1.0.
|
|
59
|
+
gem install ./phrase-1.0.3.gem
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
(for development, run `gem install --dev ./phrase-1.0.
|
|
62
|
+
(for development, run `gem install --dev ./phrase-1.0.3.gem` to install the development dependencies)
|
|
63
63
|
|
|
64
64
|
## Getting Started
|
|
65
65
|
|
|
@@ -139,7 +139,11 @@ Class | Method | HTTP request | Description
|
|
|
139
139
|
*Phrase::DistributionsApi* | [**distribution_show**](docs/DistributionsApi.md#distribution_show) | **GET** /accounts/{account_id}/distributions/{id} | Get a single distribution
|
|
140
140
|
*Phrase::DistributionsApi* | [**distribution_update**](docs/DistributionsApi.md#distribution_update) | **PATCH** /accounts/{account_id}/distributions/{id} | Update a distribution
|
|
141
141
|
*Phrase::DistributionsApi* | [**distributions_list**](docs/DistributionsApi.md#distributions_list) | **GET** /accounts/{account_id}/distributions | List distributions
|
|
142
|
+
*Phrase::DocumentsApi* | [**document_delete**](docs/DocumentsApi.md#document_delete) | **DELETE** /projects/{project_id}/documents/{id} | Delete document
|
|
143
|
+
*Phrase::DocumentsApi* | [**documents_list**](docs/DocumentsApi.md#documents_list) | **GET** /projects/{project_id}/documents | List documents
|
|
142
144
|
*Phrase::FormatsApi* | [**formats_list**](docs/FormatsApi.md#formats_list) | **GET** /formats | List formats
|
|
145
|
+
*Phrase::GitHubSyncApi* | [**github_sync_export**](docs/GitHubSyncApi.md#github_sync_export) | **POST** /github_syncs/export | Export from Phrase to GitHub
|
|
146
|
+
*Phrase::GitHubSyncApi* | [**github_sync_import**](docs/GitHubSyncApi.md#github_sync_import) | **POST** /github_syncs/import | Import to Phrase from GitHub
|
|
143
147
|
*Phrase::GitLabSyncApi* | [**gitlab_sync_delete**](docs/GitLabSyncApi.md#gitlab_sync_delete) | **DELETE** /gitlab_syncs/{id} | Delete single Sync Setting
|
|
144
148
|
*Phrase::GitLabSyncApi* | [**gitlab_sync_export**](docs/GitLabSyncApi.md#gitlab_sync_export) | **POST** /gitlab_syncs/{gitlab_sync_id}/export | Export from Phrase to GitLab
|
|
145
149
|
*Phrase::GitLabSyncApi* | [**gitlab_sync_history**](docs/GitLabSyncApi.md#gitlab_sync_history) | **GET** /gitlab_syncs/{gitlab_sync_id}/history | History of single Sync Setting
|
|
@@ -318,7 +322,10 @@ Class | Method | HTTP request | Description
|
|
|
318
322
|
- [Phrase::DistributionCreateParameters](docs/DistributionCreateParameters.md)
|
|
319
323
|
- [Phrase::DistributionPreview](docs/DistributionPreview.md)
|
|
320
324
|
- [Phrase::DistributionUpdateParameters](docs/DistributionUpdateParameters.md)
|
|
325
|
+
- [Phrase::Document](docs/Document.md)
|
|
321
326
|
- [Phrase::Format](docs/Format.md)
|
|
327
|
+
- [Phrase::GithubSyncExportParameters](docs/GithubSyncExportParameters.md)
|
|
328
|
+
- [Phrase::GithubSyncImportParameters](docs/GithubSyncImportParameters.md)
|
|
322
329
|
- [Phrase::GitlabSync](docs/GitlabSync.md)
|
|
323
330
|
- [Phrase::GitlabSyncExport](docs/GitlabSyncExport.md)
|
|
324
331
|
- [Phrase::GitlabSyncExportParameters](docs/GitlabSyncExportParameters.md)
|
|
@@ -333,6 +340,8 @@ Class | Method | HTTP request | Description
|
|
|
333
340
|
- [Phrase::GlossaryTermTranslationUpdateParameters](docs/GlossaryTermTranslationUpdateParameters.md)
|
|
334
341
|
- [Phrase::GlossaryTermUpdateParameters](docs/GlossaryTermUpdateParameters.md)
|
|
335
342
|
- [Phrase::GlossaryUpdateParameters](docs/GlossaryUpdateParameters.md)
|
|
343
|
+
- [Phrase::InlineResponse422](docs/InlineResponse422.md)
|
|
344
|
+
- [Phrase::InlineResponse422Errors](docs/InlineResponse422Errors.md)
|
|
336
345
|
- [Phrase::Invitation](docs/Invitation.md)
|
|
337
346
|
- [Phrase::InvitationCreateParameters](docs/InvitationCreateParameters.md)
|
|
338
347
|
- [Phrase::InvitationUpdateParameters](docs/InvitationUpdateParameters.md)
|
data/docs/Account.md
CHANGED
|
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
8
|
**name** | **String** | | [optional]
|
|
9
|
+
**slug** | **String** | | [optional]
|
|
9
10
|
**company** | **String** | | [optional]
|
|
10
11
|
**created_at** | **DateTime** | | [optional]
|
|
11
12
|
**updated_at** | **DateTime** | | [optional]
|
|
@@ -17,6 +18,7 @@ require 'Phrase'
|
|
|
17
18
|
|
|
18
19
|
instance = Phrase::Account.new(id: null,
|
|
19
20
|
name: null,
|
|
21
|
+
slug: null,
|
|
20
22
|
company: null,
|
|
21
23
|
created_at: null,
|
|
22
24
|
updated_at: null)
|
data/docs/AccountDetails.md
CHANGED
|
@@ -6,10 +6,10 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
8
|
**name** | **String** | | [optional]
|
|
9
|
+
**slug** | **String** | | [optional]
|
|
9
10
|
**company** | **String** | | [optional]
|
|
10
11
|
**created_at** | **DateTime** | | [optional]
|
|
11
12
|
**updated_at** | **DateTime** | | [optional]
|
|
12
|
-
**slug** | **String** | | [optional]
|
|
13
13
|
|
|
14
14
|
## Code Sample
|
|
15
15
|
|
|
@@ -18,10 +18,10 @@ require 'Phrase'
|
|
|
18
18
|
|
|
19
19
|
instance = Phrase::AccountDetails.new(id: null,
|
|
20
20
|
name: null,
|
|
21
|
+
slug: null,
|
|
21
22
|
company: null,
|
|
22
23
|
created_at: null,
|
|
23
|
-
updated_at: null
|
|
24
|
-
slug: null)
|
|
24
|
+
updated_at: null)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
|
data/docs/AccountsApi.md
CHANGED
|
@@ -98,7 +98,7 @@ api_instance = Phrase::AccountsApi.new
|
|
|
98
98
|
opts = {
|
|
99
99
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
100
100
|
page: 1, # Integer | Page number
|
|
101
|
-
per_page:
|
|
101
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
begin
|
|
@@ -117,7 +117,7 @@ Name | Type | Description | Notes
|
|
|
117
117
|
------------- | ------------- | ------------- | -------------
|
|
118
118
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
119
119
|
**page** | **Integer**| Page number | [optional]
|
|
120
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
120
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
121
121
|
|
|
122
122
|
### Return type
|
|
123
123
|
|
data/docs/AuthorizationsApi.md
CHANGED
|
@@ -285,7 +285,7 @@ api_instance = Phrase::AuthorizationsApi.new
|
|
|
285
285
|
opts = {
|
|
286
286
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
287
287
|
page: 1, # Integer | Page number
|
|
288
|
-
per_page:
|
|
288
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
begin
|
|
@@ -304,7 +304,7 @@ Name | Type | Description | Notes
|
|
|
304
304
|
------------- | ------------- | ------------- | -------------
|
|
305
305
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
306
306
|
**page** | **Integer**| Page number | [optional]
|
|
307
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
307
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
308
308
|
|
|
309
309
|
### Return type
|
|
310
310
|
|
data/docs/BlacklistedKeysApi.md
CHANGED
|
@@ -294,7 +294,8 @@ project_id = 'project_id_example' # String | Project ID
|
|
|
294
294
|
opts = {
|
|
295
295
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
296
296
|
page: 1, # Integer | Page number
|
|
297
|
-
per_page:
|
|
297
|
+
per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
298
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
begin
|
|
@@ -314,7 +315,8 @@ Name | Type | Description | Notes
|
|
|
314
315
|
**project_id** | **String**| Project ID |
|
|
315
316
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
316
317
|
**page** | **Integer**| Page number | [optional]
|
|
317
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
318
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
319
|
+
**branch** | **String**| specify the branch to use | [optional]
|
|
318
320
|
|
|
319
321
|
### Return type
|
|
320
322
|
|
data/docs/BranchesApi.md
CHANGED
|
@@ -422,7 +422,7 @@ project_id = 'project_id_example' # String | Project ID
|
|
|
422
422
|
opts = {
|
|
423
423
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
424
424
|
page: 1, # Integer | Page number
|
|
425
|
-
per_page:
|
|
425
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
begin
|
|
@@ -442,7 +442,7 @@ Name | Type | Description | Notes
|
|
|
442
442
|
**project_id** | **String**| Project ID |
|
|
443
443
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
444
444
|
**page** | **Integer**| Page number | [optional]
|
|
445
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
445
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
446
446
|
|
|
447
447
|
### Return type
|
|
448
448
|
|
data/docs/CommentsApi.md
CHANGED
|
@@ -508,7 +508,7 @@ key_id = 'key_id_example' # String | Translation Key ID
|
|
|
508
508
|
opts = {
|
|
509
509
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
510
510
|
page: 1, # Integer | Page number
|
|
511
|
-
per_page:
|
|
511
|
+
per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
512
512
|
branch: 'my-feature-branch' # String | specify the branch to use
|
|
513
513
|
}
|
|
514
514
|
|
|
@@ -530,7 +530,7 @@ Name | Type | Description | Notes
|
|
|
530
530
|
**key_id** | **String**| Translation Key ID |
|
|
531
531
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
532
532
|
**page** | **Integer**| Page number | [optional]
|
|
533
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
533
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
534
534
|
**branch** | **String**| specify the branch to use | [optional]
|
|
535
535
|
|
|
536
536
|
### Return type
|
data/docs/DistributionsApi.md
CHANGED
|
@@ -294,7 +294,7 @@ account_id = 'account_id_example' # String | Account ID
|
|
|
294
294
|
opts = {
|
|
295
295
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
296
296
|
page: 1, # Integer | Page number
|
|
297
|
-
per_page:
|
|
297
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
begin
|
|
@@ -314,7 +314,7 @@ Name | Type | Description | Notes
|
|
|
314
314
|
**account_id** | **String**| Account ID |
|
|
315
315
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
316
316
|
**page** | **Integer**| Page number | [optional]
|
|
317
|
-
**per_page** | **Integer**| allows you to specify a page size up to 100 items,
|
|
317
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
318
318
|
|
|
319
319
|
### Return type
|
|
320
320
|
|
data/docs/Document.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::Document
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | | [optional]
|
|
8
|
+
**name** | **String** | | [optional]
|
|
9
|
+
**created_at** | **DateTime** | | [optional]
|
|
10
|
+
**updated_at** | **DateTime** | | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'Phrase'
|
|
16
|
+
|
|
17
|
+
instance = Phrase::Document.new(id: null,
|
|
18
|
+
name: null,
|
|
19
|
+
created_at: null,
|
|
20
|
+
updated_at: null)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Phrase::DocumentsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**document_delete**](DocumentsApi.md#document_delete) | **DELETE** /projects/{project_id}/documents/{id} | Delete document
|
|
8
|
+
[**documents_list**](DocumentsApi.md#documents_list) | **GET** /projects/{project_id}/documents | List documents
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## document_delete
|
|
13
|
+
|
|
14
|
+
> document_delete(project_id, id, opts)
|
|
15
|
+
|
|
16
|
+
Delete document
|
|
17
|
+
|
|
18
|
+
Delete an existing document.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
# load the gem
|
|
24
|
+
require 'phrase'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Phrase.configure do |config|
|
|
27
|
+
# Configure HTTP basic authorization: Basic
|
|
28
|
+
config.username = 'YOUR USERNAME'
|
|
29
|
+
config.password = 'YOUR PASSWORD'
|
|
30
|
+
|
|
31
|
+
# Configure API key authorization: Token
|
|
32
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
33
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_instance = Phrase::DocumentsApi.new
|
|
37
|
+
project_id = 'project_id_example' # String | Project ID
|
|
38
|
+
id = 'id_example' # String | ID
|
|
39
|
+
opts = {
|
|
40
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
#Delete document
|
|
45
|
+
api_instance.document_delete(project_id, id, opts)
|
|
46
|
+
rescue Phrase::ApiError => e
|
|
47
|
+
puts "Exception when calling DocumentsApi->document_delete: #{e}"
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Name | Type | Description | Notes
|
|
55
|
+
------------- | ------------- | ------------- | -------------
|
|
56
|
+
**project_id** | **String**| Project ID |
|
|
57
|
+
**id** | **String**| ID |
|
|
58
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
Response<(nil (empty response body))>
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: Not defined
|
|
71
|
+
- **Accept**: Not defined
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## documents_list
|
|
75
|
+
|
|
76
|
+
> Array<Document> documents_list(project_id, opts)
|
|
77
|
+
|
|
78
|
+
List documents
|
|
79
|
+
|
|
80
|
+
List all documents the current user has access to.
|
|
81
|
+
|
|
82
|
+
### Example
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
# load the gem
|
|
86
|
+
require 'phrase'
|
|
87
|
+
# setup authorization
|
|
88
|
+
Phrase.configure do |config|
|
|
89
|
+
# Configure HTTP basic authorization: Basic
|
|
90
|
+
config.username = 'YOUR USERNAME'
|
|
91
|
+
config.password = 'YOUR PASSWORD'
|
|
92
|
+
|
|
93
|
+
# Configure API key authorization: Token
|
|
94
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
95
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
api_instance = Phrase::DocumentsApi.new
|
|
99
|
+
project_id = 'project_id_example' # String | Project ID
|
|
100
|
+
opts = {
|
|
101
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
102
|
+
page: 1, # Integer | Page number
|
|
103
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
begin
|
|
107
|
+
#List documents
|
|
108
|
+
result = api_instance.documents_list(project_id, opts)
|
|
109
|
+
pp result
|
|
110
|
+
rescue Phrase::ApiError => e
|
|
111
|
+
puts "Exception when calling DocumentsApi->documents_list: #{e}"
|
|
112
|
+
end
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Parameters
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
Name | Type | Description | Notes
|
|
119
|
+
------------- | ------------- | ------------- | -------------
|
|
120
|
+
**project_id** | **String**| Project ID |
|
|
121
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
122
|
+
**page** | **Integer**| Page number | [optional]
|
|
123
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
124
|
+
|
|
125
|
+
### Return type
|
|
126
|
+
|
|
127
|
+
Response<([**Array<Document>**](Document.md))>
|
|
128
|
+
|
|
129
|
+
### Authorization
|
|
130
|
+
|
|
131
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
132
|
+
|
|
133
|
+
### HTTP request headers
|
|
134
|
+
|
|
135
|
+
- **Content-Type**: Not defined
|
|
136
|
+
- **Accept**: application/json
|
|
137
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Phrase::GitHubSyncApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**github_sync_export**](GitHubSyncApi.md#github_sync_export) | **POST** /github_syncs/export | Export from Phrase to GitHub
|
|
8
|
+
[**github_sync_import**](GitHubSyncApi.md#github_sync_import) | **POST** /github_syncs/import | Import to Phrase from GitHub
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## github_sync_export
|
|
13
|
+
|
|
14
|
+
> github_sync_export(github_sync_export_parameters, opts)
|
|
15
|
+
|
|
16
|
+
Export from Phrase to GitHub
|
|
17
|
+
|
|
18
|
+
Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
# load the gem
|
|
24
|
+
require 'phrase'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Phrase.configure do |config|
|
|
27
|
+
# Configure HTTP basic authorization: Basic
|
|
28
|
+
config.username = 'YOUR USERNAME'
|
|
29
|
+
config.password = 'YOUR PASSWORD'
|
|
30
|
+
|
|
31
|
+
# Configure API key authorization: Token
|
|
32
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
33
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_instance = Phrase::GitHubSyncApi.new
|
|
37
|
+
github_sync_export_parameters = Phrase::GithubSyncExportParameters.new # GithubSyncExportParameters |
|
|
38
|
+
opts = {
|
|
39
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
#Export from Phrase to GitHub
|
|
44
|
+
api_instance.github_sync_export(github_sync_export_parameters, opts)
|
|
45
|
+
rescue Phrase::ApiError => e
|
|
46
|
+
puts "Exception when calling GitHubSyncApi->github_sync_export: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parameters
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Name | Type | Description | Notes
|
|
54
|
+
------------- | ------------- | ------------- | -------------
|
|
55
|
+
**github_sync_export_parameters** | [**GithubSyncExportParameters**](GithubSyncExportParameters.md)| |
|
|
56
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
57
|
+
|
|
58
|
+
### Return type
|
|
59
|
+
|
|
60
|
+
Response<(nil (empty response body))>
|
|
61
|
+
|
|
62
|
+
### Authorization
|
|
63
|
+
|
|
64
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
65
|
+
|
|
66
|
+
### HTTP request headers
|
|
67
|
+
|
|
68
|
+
- **Content-Type**: application/json
|
|
69
|
+
- **Accept**: application/json
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## github_sync_import
|
|
73
|
+
|
|
74
|
+
> github_sync_import(github_sync_import_parameters, opts)
|
|
75
|
+
|
|
76
|
+
Import to Phrase from GitHub
|
|
77
|
+
|
|
78
|
+
Import files to Phrase from your connected GitHub repository.
|
|
79
|
+
|
|
80
|
+
### Example
|
|
81
|
+
|
|
82
|
+
```ruby
|
|
83
|
+
# load the gem
|
|
84
|
+
require 'phrase'
|
|
85
|
+
# setup authorization
|
|
86
|
+
Phrase.configure do |config|
|
|
87
|
+
# Configure HTTP basic authorization: Basic
|
|
88
|
+
config.username = 'YOUR USERNAME'
|
|
89
|
+
config.password = 'YOUR PASSWORD'
|
|
90
|
+
|
|
91
|
+
# Configure API key authorization: Token
|
|
92
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
93
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
api_instance = Phrase::GitHubSyncApi.new
|
|
97
|
+
github_sync_import_parameters = Phrase::GithubSyncImportParameters.new # GithubSyncImportParameters |
|
|
98
|
+
opts = {
|
|
99
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
begin
|
|
103
|
+
#Import to Phrase from GitHub
|
|
104
|
+
api_instance.github_sync_import(github_sync_import_parameters, opts)
|
|
105
|
+
rescue Phrase::ApiError => e
|
|
106
|
+
puts "Exception when calling GitHubSyncApi->github_sync_import: #{e}"
|
|
107
|
+
end
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Parameters
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
Name | Type | Description | Notes
|
|
114
|
+
------------- | ------------- | ------------- | -------------
|
|
115
|
+
**github_sync_import_parameters** | [**GithubSyncImportParameters**](GithubSyncImportParameters.md)| |
|
|
116
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
117
|
+
|
|
118
|
+
### Return type
|
|
119
|
+
|
|
120
|
+
Response<(nil (empty response body))>
|
|
121
|
+
|
|
122
|
+
### Authorization
|
|
123
|
+
|
|
124
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
125
|
+
|
|
126
|
+
### HTTP request headers
|
|
127
|
+
|
|
128
|
+
- **Content-Type**: application/json
|
|
129
|
+
- **Accept**: application/json
|
|
130
|
+
|