phrase 2.24.0 → 2.25.0
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/CHANGELOG.md +7 -0
- data/README.md +15 -3
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/RepoSync.md +33 -0
- data/docs/RepoSyncEvent.md +27 -0
- data/docs/RepoSyncEventErrorsInner.md +16 -0
- data/docs/RepoSyncExport.md +17 -0
- data/docs/RepoSyncImport.md +17 -0
- data/docs/RepoSyncsApi.md +454 -0
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/lib/phrase/api/repo_syncs_api.rb +508 -0
- data/lib/phrase/models/repo_sync.rb +268 -0
- data/lib/phrase/models/repo_sync_event.rb +292 -0
- data/lib/phrase/models/repo_sync_event_errors_inner.rb +207 -0
- data/lib/phrase/models/repo_sync_export.rb +196 -0
- data/lib/phrase/models/repo_sync_import.rb +196 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +6 -0
- data/spec/api/repo_syncs_api_spec.rb +120 -0
- data/spec/models/repo_sync_event_errors_inner_spec.rb +23 -0
- data/spec/models/repo_sync_event_spec.rb +67 -0
- data/spec/models/repo_sync_export_spec.rb +29 -0
- data/spec/models/repo_sync_import_spec.rb +29 -0
- data/spec/models/repo_sync_spec.rb +77 -0
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 545420c2b8e112edf007fb22c000567f2f26b8079e5b032ed61ed959e00ccde0
|
4
|
+
data.tar.gz: 75da80ae3b85927796926a4649e500510f1fc370c781ae922aeafd40498c150c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7dea1c6cad86bc66c704263c104db5864c71a69a1b7d887d816969f27c2f421c0ef046d57d691d0fe7af45015e85bf870520805b68e7b37ccf90e47c9762453
|
7
|
+
data.tar.gz: 0130b15da0a59c6a6b1e1120cb9e951b3abbf31a15f458b7e79d882e53dec5436e9c647a8e243764cdc9e1ba0c60a49df0c8cf55870fd2ecf8151f6806578c22
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.25.0](https://github.com/phrase/openapi/compare/ruby-v2.24.0...ruby-v2.25.0) (2024-04-17)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** Add Repo Sync [TSI-1923] ([#569](https://github.com/phrase/openapi/issues/569)) ([0bd1756](https://github.com/phrase/openapi/commit/0bd17562018cb045ff41cc1ff5008b9419a0ed12))
|
9
|
+
|
3
10
|
## [2.24.0](https://github.com/phrase/openapi/compare/ruby-v2.23.0...ruby-v2.24.0) (2024-04-10)
|
4
11
|
|
5
12
|
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
|
|
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: 2.
|
10
|
+
- Package version: 2.25.0
|
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-2.
|
59
|
+
gem install ./phrase-2.25.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.25.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -316,6 +316,13 @@ Class | Method | HTTP request | Description
|
|
316
316
|
*Phrase::ReleasesApi* | [**release_show**](docs/ReleasesApi.md#release_show) | **GET** /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Get a single release
|
317
317
|
*Phrase::ReleasesApi* | [**release_update**](docs/ReleasesApi.md#release_update) | **PATCH** /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Update a release
|
318
318
|
*Phrase::ReleasesApi* | [**releases_list**](docs/ReleasesApi.md#releases_list) | **GET** /accounts/{account_id}/distributions/{distribution_id}/releases | List releases
|
319
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_activate**](docs/RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/activate | Activate a Repo Sync
|
320
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_deactivate**](docs/RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/deactivate | Deactivate a Repo Sync
|
321
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_events**](docs/RepoSyncsApi.md#repo_sync_events) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id}/events | Repository Syncs History
|
322
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_export**](docs/RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/export | Export to code repository
|
323
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_import**](docs/RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/import | Import from code repository
|
324
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_list**](docs/RepoSyncsApi.md#repo_sync_list) | **GET** /accounts/{account_id}/repo_syncs | Get Repo Syncs
|
325
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_show**](docs/RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id} | Get a single Repo Sync
|
319
326
|
*Phrase::ReportsApi* | [**report_locales_list**](docs/ReportsApi.md#report_locales_list) | **GET** /projects/{project_id}/report/locales | List Locale Reports
|
320
327
|
*Phrase::ReportsApi* | [**report_show**](docs/ReportsApi.md#report_show) | **GET** /projects/{project_id}/report | Get Project Report
|
321
328
|
*Phrase::ScreenshotMarkersApi* | [**screenshot_marker_create**](docs/ScreenshotMarkersApi.md#screenshot_marker_create) | **POST** /projects/{project_id}/screenshots/{screenshot_id}/markers | Create a screenshot marker
|
@@ -549,6 +556,11 @@ Class | Method | HTTP request | Description
|
|
549
556
|
- [Phrase::ReleasePreview](docs/ReleasePreview.md)
|
550
557
|
- [Phrase::ReleaseUpdateParameters](docs/ReleaseUpdateParameters.md)
|
551
558
|
- [Phrase::RepliesListParameters](docs/RepliesListParameters.md)
|
559
|
+
- [Phrase::RepoSync](docs/RepoSync.md)
|
560
|
+
- [Phrase::RepoSyncEvent](docs/RepoSyncEvent.md)
|
561
|
+
- [Phrase::RepoSyncEventErrorsInner](docs/RepoSyncEventErrorsInner.md)
|
562
|
+
- [Phrase::RepoSyncExport](docs/RepoSyncExport.md)
|
563
|
+
- [Phrase::RepoSyncImport](docs/RepoSyncImport.md)
|
552
564
|
- [Phrase::Screenshot](docs/Screenshot.md)
|
553
565
|
- [Phrase::ScreenshotMarker](docs/ScreenshotMarker.md)
|
554
566
|
- [Phrase::ScreenshotMarkerCreateParameters](docs/ScreenshotMarkerCreateParameters.md)
|
data/docs/KeyCreateParameters.md
CHANGED
@@ -35,7 +35,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
|
|
35
35
|
data_type: number,
|
36
36
|
tags: awesome-feature,needs-proofreading,
|
37
37
|
max_characters_allowed: 140,
|
38
|
-
screenshot: [B@
|
38
|
+
screenshot: [B@38da693b,
|
39
39
|
remove_screenshot: null,
|
40
40
|
unformatted: null,
|
41
41
|
default_translation_content: Default translation content,
|
data/docs/KeyUpdateParameters.md
CHANGED
@@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
|
|
34
34
|
data_type: number,
|
35
35
|
tags: awesome-feature,needs-proofreading,
|
36
36
|
max_characters_allowed: 140,
|
37
|
-
screenshot: [B@
|
37
|
+
screenshot: [B@1c2912bb,
|
38
38
|
remove_screenshot: null,
|
39
39
|
unformatted: null,
|
40
40
|
xml_space_preserve: null,
|
@@ -40,7 +40,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
40
40
|
main_format: yml,
|
41
41
|
media: Python,
|
42
42
|
shares_translation_memory: true,
|
43
|
-
project_image: [B@
|
43
|
+
project_image: [B@4f808f77,
|
44
44
|
remove_project_image: null,
|
45
45
|
account_id: abcd1234,
|
46
46
|
point_of_contact: abcd1234,
|
@@ -41,7 +41,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
41
41
|
main_format: yml,
|
42
42
|
media: Python,
|
43
43
|
shares_translation_memory: true,
|
44
|
-
project_image: [B@
|
44
|
+
project_image: [B@758a3ba0,
|
45
45
|
remove_project_image: false,
|
46
46
|
workflow: review,
|
47
47
|
machine_translation_enabled: true,
|
data/docs/RepoSync.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Phrase::RepoSync
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional]
|
8
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
9
|
+
**provider** | **String** | | [optional]
|
10
|
+
**enabled** | **Boolean** | | [optional]
|
11
|
+
**auto_import** | **Boolean** | | [optional]
|
12
|
+
**repo_name** | **String** | | [optional]
|
13
|
+
**created_at** | **Time** | | [optional]
|
14
|
+
**last_import_at** | **Time** | | [optional]
|
15
|
+
**last_export_at** | **Time** | | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'Phrase'
|
21
|
+
|
22
|
+
instance = Phrase::RepoSync.new(id: null,
|
23
|
+
project: null,
|
24
|
+
provider: null,
|
25
|
+
enabled: null,
|
26
|
+
auto_import: null,
|
27
|
+
repo_name: null,
|
28
|
+
created_at: null,
|
29
|
+
last_import_at: null,
|
30
|
+
last_export_at: null)
|
31
|
+
```
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Phrase::RepoSyncEvent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**event_type** | **String** | | [optional]
|
8
|
+
**created_at** | **Time** | | [optional]
|
9
|
+
**status** | **String** | | [optional]
|
10
|
+
**pull_request_url** | **String** | URL of the pull request created on export | [optional]
|
11
|
+
**auto_import** | **Boolean** | Whether the import was triggered by the repo push event | [optional]
|
12
|
+
**errors** | [**Array<RepoSyncEventErrorsInner>**](RepoSyncEventErrorsInner.md) | List of error messages, in case of failure | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'Phrase'
|
18
|
+
|
19
|
+
instance = Phrase::RepoSyncEvent.new(event_type: null,
|
20
|
+
created_at: null,
|
21
|
+
status: null,
|
22
|
+
pull_request_url: null,
|
23
|
+
auto_import: null,
|
24
|
+
errors: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Phrase::RepoSyncEventErrorsInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'Phrase'
|
12
|
+
|
13
|
+
instance = Phrase::RepoSyncEventErrorsInner.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::RepoSyncExport
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**message** | **String** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::RepoSyncExport.new(message: Export started)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::RepoSyncImport
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**message** | **String** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::RepoSyncImport.new(message: Import started)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,454 @@
|
|
1
|
+
# Phrase::RepoSyncsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**repo_sync_activate**](RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/activate | Activate a Repo Sync
|
8
|
+
[**repo_sync_deactivate**](RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/deactivate | Deactivate a Repo Sync
|
9
|
+
[**repo_sync_events**](RepoSyncsApi.md#repo_sync_events) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id}/events | Repository Syncs History
|
10
|
+
[**repo_sync_export**](RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/export | Export to code repository
|
11
|
+
[**repo_sync_import**](RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/import | Import from code repository
|
12
|
+
[**repo_sync_list**](RepoSyncsApi.md#repo_sync_list) | **GET** /accounts/{account_id}/repo_syncs | Get Repo Syncs
|
13
|
+
[**repo_sync_show**](RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id} | Get a single Repo Sync
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## repo_sync_activate
|
18
|
+
|
19
|
+
> RepoSync repo_sync_activate(account_id, repo_sync_id, opts)
|
20
|
+
|
21
|
+
Activate a Repo Sync
|
22
|
+
|
23
|
+
Activate a deactivated Repo Sync. Active syncs can be used to import and export translations, and imports to Phrase are automatically triggered by pushes to the repository, if configured.
|
24
|
+
|
25
|
+
### Example
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
# load the gem
|
29
|
+
require 'phrase'
|
30
|
+
# setup authorization
|
31
|
+
Phrase.configure do |config|
|
32
|
+
# Configure HTTP basic authorization: Basic
|
33
|
+
config.username = 'YOUR USERNAME'
|
34
|
+
config.password = 'YOUR PASSWORD'
|
35
|
+
|
36
|
+
# Configure API key authorization: Token
|
37
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
38
|
+
config.api_key_prefix['Authorization'] = 'token'
|
39
|
+
end
|
40
|
+
|
41
|
+
api_instance = Phrase::RepoSyncsApi.new
|
42
|
+
account_id = 'account_id_example' # String | Account ID
|
43
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
44
|
+
opts = {
|
45
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
46
|
+
}
|
47
|
+
|
48
|
+
begin
|
49
|
+
#Activate a Repo Sync
|
50
|
+
result = api_instance.repo_sync_activate(account_id, repo_sync_id, opts)
|
51
|
+
pp result
|
52
|
+
rescue Phrase::ApiError => e
|
53
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_activate: #{e}"
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
### Parameters
|
58
|
+
|
59
|
+
|
60
|
+
Name | Type | Description | Notes
|
61
|
+
------------- | ------------- | ------------- | -------------
|
62
|
+
**account_id** | **String**| Account ID |
|
63
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
64
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
Response<([**RepoSync**](RepoSync.md))>
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: Not defined
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## repo_sync_deactivate
|
81
|
+
|
82
|
+
> RepoSync repo_sync_deactivate(account_id, repo_sync_id, opts)
|
83
|
+
|
84
|
+
Deactivate a Repo Sync
|
85
|
+
|
86
|
+
Deactivate an active Repo Sync. Import and export can't be performed on deactivated syncs and the pushes to the repository won't trigger the import to Phrase.
|
87
|
+
|
88
|
+
### Example
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
# load the gem
|
92
|
+
require 'phrase'
|
93
|
+
# setup authorization
|
94
|
+
Phrase.configure do |config|
|
95
|
+
# Configure HTTP basic authorization: Basic
|
96
|
+
config.username = 'YOUR USERNAME'
|
97
|
+
config.password = 'YOUR PASSWORD'
|
98
|
+
|
99
|
+
# Configure API key authorization: Token
|
100
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
101
|
+
config.api_key_prefix['Authorization'] = 'token'
|
102
|
+
end
|
103
|
+
|
104
|
+
api_instance = Phrase::RepoSyncsApi.new
|
105
|
+
account_id = 'account_id_example' # String | Account ID
|
106
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
107
|
+
opts = {
|
108
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
109
|
+
}
|
110
|
+
|
111
|
+
begin
|
112
|
+
#Deactivate a Repo Sync
|
113
|
+
result = api_instance.repo_sync_deactivate(account_id, repo_sync_id, opts)
|
114
|
+
pp result
|
115
|
+
rescue Phrase::ApiError => e
|
116
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_deactivate: #{e}"
|
117
|
+
end
|
118
|
+
```
|
119
|
+
|
120
|
+
### Parameters
|
121
|
+
|
122
|
+
|
123
|
+
Name | Type | Description | Notes
|
124
|
+
------------- | ------------- | ------------- | -------------
|
125
|
+
**account_id** | **String**| Account ID |
|
126
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
127
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
128
|
+
|
129
|
+
### Return type
|
130
|
+
|
131
|
+
Response<([**RepoSync**](RepoSync.md))>
|
132
|
+
|
133
|
+
### Authorization
|
134
|
+
|
135
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
136
|
+
|
137
|
+
### HTTP request headers
|
138
|
+
|
139
|
+
- **Content-Type**: Not defined
|
140
|
+
- **Accept**: application/json
|
141
|
+
|
142
|
+
|
143
|
+
## repo_sync_events
|
144
|
+
|
145
|
+
> Array<RepoSyncEvent> repo_sync_events(account_id, repo_sync_id, opts)
|
146
|
+
|
147
|
+
Repository Syncs History
|
148
|
+
|
149
|
+
Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
|
150
|
+
|
151
|
+
### Example
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
# load the gem
|
155
|
+
require 'phrase'
|
156
|
+
# setup authorization
|
157
|
+
Phrase.configure do |config|
|
158
|
+
# Configure HTTP basic authorization: Basic
|
159
|
+
config.username = 'YOUR USERNAME'
|
160
|
+
config.password = 'YOUR PASSWORD'
|
161
|
+
|
162
|
+
# Configure API key authorization: Token
|
163
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
164
|
+
config.api_key_prefix['Authorization'] = 'token'
|
165
|
+
end
|
166
|
+
|
167
|
+
api_instance = Phrase::RepoSyncsApi.new
|
168
|
+
account_id = 'account_id_example' # String | Account ID
|
169
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
170
|
+
opts = {
|
171
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
172
|
+
}
|
173
|
+
|
174
|
+
begin
|
175
|
+
#Repository Syncs History
|
176
|
+
result = api_instance.repo_sync_events(account_id, repo_sync_id, opts)
|
177
|
+
pp result
|
178
|
+
rescue Phrase::ApiError => e
|
179
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_events: #{e}"
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
### Parameters
|
184
|
+
|
185
|
+
|
186
|
+
Name | Type | Description | Notes
|
187
|
+
------------- | ------------- | ------------- | -------------
|
188
|
+
**account_id** | **String**| Account ID |
|
189
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
190
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
191
|
+
|
192
|
+
### Return type
|
193
|
+
|
194
|
+
Response<([**Array<RepoSyncEvent>**](RepoSyncEvent.md))>
|
195
|
+
|
196
|
+
### Authorization
|
197
|
+
|
198
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
199
|
+
|
200
|
+
### HTTP request headers
|
201
|
+
|
202
|
+
- **Content-Type**: Not defined
|
203
|
+
- **Accept**: application/json
|
204
|
+
|
205
|
+
|
206
|
+
## repo_sync_export
|
207
|
+
|
208
|
+
> RepoSyncExport repo_sync_export(account_id, repo_sync_id, opts)
|
209
|
+
|
210
|
+
Export to code repository
|
211
|
+
|
212
|
+
> Beta: this feature will change in the future. Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
|
213
|
+
|
214
|
+
### Example
|
215
|
+
|
216
|
+
```ruby
|
217
|
+
# load the gem
|
218
|
+
require 'phrase'
|
219
|
+
# setup authorization
|
220
|
+
Phrase.configure do |config|
|
221
|
+
# Configure HTTP basic authorization: Basic
|
222
|
+
config.username = 'YOUR USERNAME'
|
223
|
+
config.password = 'YOUR PASSWORD'
|
224
|
+
|
225
|
+
# Configure API key authorization: Token
|
226
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
227
|
+
config.api_key_prefix['Authorization'] = 'token'
|
228
|
+
end
|
229
|
+
|
230
|
+
api_instance = Phrase::RepoSyncsApi.new
|
231
|
+
account_id = 'account_id_example' # String | Account ID
|
232
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
233
|
+
opts = {
|
234
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
235
|
+
}
|
236
|
+
|
237
|
+
begin
|
238
|
+
#Export to code repository
|
239
|
+
result = api_instance.repo_sync_export(account_id, repo_sync_id, opts)
|
240
|
+
pp result
|
241
|
+
rescue Phrase::ApiError => e
|
242
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_export: #{e}"
|
243
|
+
end
|
244
|
+
```
|
245
|
+
|
246
|
+
### Parameters
|
247
|
+
|
248
|
+
|
249
|
+
Name | Type | Description | Notes
|
250
|
+
------------- | ------------- | ------------- | -------------
|
251
|
+
**account_id** | **String**| Account ID |
|
252
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
253
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
254
|
+
|
255
|
+
### Return type
|
256
|
+
|
257
|
+
Response<([**RepoSyncExport**](RepoSyncExport.md))>
|
258
|
+
|
259
|
+
### Authorization
|
260
|
+
|
261
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
262
|
+
|
263
|
+
### HTTP request headers
|
264
|
+
|
265
|
+
- **Content-Type**: Not defined
|
266
|
+
- **Accept**: application/json
|
267
|
+
|
268
|
+
|
269
|
+
## repo_sync_import
|
270
|
+
|
271
|
+
> RepoSyncImport repo_sync_import(account_id, repo_sync_id, opts)
|
272
|
+
|
273
|
+
Import from code repository
|
274
|
+
|
275
|
+
> Beta: this feature will change in the future. Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
|
276
|
+
|
277
|
+
### Example
|
278
|
+
|
279
|
+
```ruby
|
280
|
+
# load the gem
|
281
|
+
require 'phrase'
|
282
|
+
# setup authorization
|
283
|
+
Phrase.configure do |config|
|
284
|
+
# Configure HTTP basic authorization: Basic
|
285
|
+
config.username = 'YOUR USERNAME'
|
286
|
+
config.password = 'YOUR PASSWORD'
|
287
|
+
|
288
|
+
# Configure API key authorization: Token
|
289
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
290
|
+
config.api_key_prefix['Authorization'] = 'token'
|
291
|
+
end
|
292
|
+
|
293
|
+
api_instance = Phrase::RepoSyncsApi.new
|
294
|
+
account_id = 'account_id_example' # String | Account ID
|
295
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
296
|
+
opts = {
|
297
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
298
|
+
}
|
299
|
+
|
300
|
+
begin
|
301
|
+
#Import from code repository
|
302
|
+
result = api_instance.repo_sync_import(account_id, repo_sync_id, opts)
|
303
|
+
pp result
|
304
|
+
rescue Phrase::ApiError => e
|
305
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_import: #{e}"
|
306
|
+
end
|
307
|
+
```
|
308
|
+
|
309
|
+
### Parameters
|
310
|
+
|
311
|
+
|
312
|
+
Name | Type | Description | Notes
|
313
|
+
------------- | ------------- | ------------- | -------------
|
314
|
+
**account_id** | **String**| Account ID |
|
315
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
316
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
317
|
+
|
318
|
+
### Return type
|
319
|
+
|
320
|
+
Response<([**RepoSyncImport**](RepoSyncImport.md))>
|
321
|
+
|
322
|
+
### Authorization
|
323
|
+
|
324
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
325
|
+
|
326
|
+
### HTTP request headers
|
327
|
+
|
328
|
+
- **Content-Type**: Not defined
|
329
|
+
- **Accept**: application/json
|
330
|
+
|
331
|
+
|
332
|
+
## repo_sync_list
|
333
|
+
|
334
|
+
> Array<RepoSync> repo_sync_list(account_id, opts)
|
335
|
+
|
336
|
+
Get Repo Syncs
|
337
|
+
|
338
|
+
Lists all Repo Syncs from an account
|
339
|
+
|
340
|
+
### Example
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
# load the gem
|
344
|
+
require 'phrase'
|
345
|
+
# setup authorization
|
346
|
+
Phrase.configure do |config|
|
347
|
+
# Configure HTTP basic authorization: Basic
|
348
|
+
config.username = 'YOUR USERNAME'
|
349
|
+
config.password = 'YOUR PASSWORD'
|
350
|
+
|
351
|
+
# Configure API key authorization: Token
|
352
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
353
|
+
config.api_key_prefix['Authorization'] = 'token'
|
354
|
+
end
|
355
|
+
|
356
|
+
api_instance = Phrase::RepoSyncsApi.new
|
357
|
+
account_id = 'account_id_example' # String | Account ID
|
358
|
+
opts = {
|
359
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
360
|
+
}
|
361
|
+
|
362
|
+
begin
|
363
|
+
#Get Repo Syncs
|
364
|
+
result = api_instance.repo_sync_list(account_id, opts)
|
365
|
+
pp result
|
366
|
+
rescue Phrase::ApiError => e
|
367
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_list: #{e}"
|
368
|
+
end
|
369
|
+
```
|
370
|
+
|
371
|
+
### Parameters
|
372
|
+
|
373
|
+
|
374
|
+
Name | Type | Description | Notes
|
375
|
+
------------- | ------------- | ------------- | -------------
|
376
|
+
**account_id** | **String**| Account ID |
|
377
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
378
|
+
|
379
|
+
### Return type
|
380
|
+
|
381
|
+
Response<([**Array<RepoSync>**](RepoSync.md))>
|
382
|
+
|
383
|
+
### Authorization
|
384
|
+
|
385
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
386
|
+
|
387
|
+
### HTTP request headers
|
388
|
+
|
389
|
+
- **Content-Type**: Not defined
|
390
|
+
- **Accept**: application/json
|
391
|
+
|
392
|
+
|
393
|
+
## repo_sync_show
|
394
|
+
|
395
|
+
> RepoSync repo_sync_show(account_id, repo_sync_id, opts)
|
396
|
+
|
397
|
+
Get a single Repo Sync
|
398
|
+
|
399
|
+
Shows a single Repo Sync setting.
|
400
|
+
|
401
|
+
### Example
|
402
|
+
|
403
|
+
```ruby
|
404
|
+
# load the gem
|
405
|
+
require 'phrase'
|
406
|
+
# setup authorization
|
407
|
+
Phrase.configure do |config|
|
408
|
+
# Configure HTTP basic authorization: Basic
|
409
|
+
config.username = 'YOUR USERNAME'
|
410
|
+
config.password = 'YOUR PASSWORD'
|
411
|
+
|
412
|
+
# Configure API key authorization: Token
|
413
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
414
|
+
config.api_key_prefix['Authorization'] = 'token'
|
415
|
+
end
|
416
|
+
|
417
|
+
api_instance = Phrase::RepoSyncsApi.new
|
418
|
+
account_id = 'account_id_example' # String | Account ID
|
419
|
+
repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
|
420
|
+
opts = {
|
421
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
422
|
+
}
|
423
|
+
|
424
|
+
begin
|
425
|
+
#Get a single Repo Sync
|
426
|
+
result = api_instance.repo_sync_show(account_id, repo_sync_id, opts)
|
427
|
+
pp result
|
428
|
+
rescue Phrase::ApiError => e
|
429
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_show: #{e}"
|
430
|
+
end
|
431
|
+
```
|
432
|
+
|
433
|
+
### Parameters
|
434
|
+
|
435
|
+
|
436
|
+
Name | Type | Description | Notes
|
437
|
+
------------- | ------------- | ------------- | -------------
|
438
|
+
**account_id** | **String**| Account ID |
|
439
|
+
**repo_sync_id** | **String**| Repo Sync ID |
|
440
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
441
|
+
|
442
|
+
### Return type
|
443
|
+
|
444
|
+
Response<([**RepoSync**](RepoSync.md))>
|
445
|
+
|
446
|
+
### Authorization
|
447
|
+
|
448
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
449
|
+
|
450
|
+
### HTTP request headers
|
451
|
+
|
452
|
+
- **Content-Type**: Not defined
|
453
|
+
- **Accept**: application/json
|
454
|
+
|