phrase 1.0.7 → 2.0.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/README.md +26 -9
- data/docs/BranchName.md +17 -0
- data/docs/CurrentUser.md +31 -0
- data/docs/Invitation.md +9 -1
- data/docs/InvitationCreateParameters.md +4 -0
- data/docs/InvitationUpdateParameters.md +4 -0
- data/docs/InvitationUpdateSettingsParameters.md +19 -0
- data/docs/InvitationsApi.md +66 -0
- data/docs/Job.md +5 -3
- data/docs/JobDetails.md +4 -2
- data/docs/JobLocale.md +7 -1
- data/docs/KeysApi.md +5 -5
- data/docs/LocalesApi.md +7 -4
- data/docs/Member.md +7 -1
- data/docs/MemberProjectDetail.md +35 -0
- data/docs/MemberProjectDetailProjectRoles.md +19 -0
- data/docs/MemberSpaces.md +25 -0
- data/docs/MemberUpdateParameters.md +4 -0
- data/docs/MemberUpdateSettingsParameters.md +19 -0
- data/docs/MembersApi.md +66 -0
- data/docs/ProjectUpdateParameters.md +43 -9
- data/docs/ScreenshotCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
- data/docs/ScreenshotMarkersApi.md +9 -3
- data/docs/ScreenshotUpdateParameters.md +3 -1
- data/docs/ScreenshotsApi.md +8 -2
- data/docs/TranslationsApi.md +25 -25
- data/docs/UsersApi.md +2 -2
- data/docs/Variable.md +23 -0
- data/docs/VariableCreateParameters.md +19 -0
- data/docs/VariableUpdateParameters.md +19 -0
- data/docs/VariablesApi.md +331 -0
- data/docs/Webhook.md +2 -0
- data/docs/WebhookCreateParameters.md +3 -1
- data/docs/WebhookUpdateParameters.md +3 -1
- data/lib/phrase.rb +11 -0
- data/lib/phrase/api/invitations_api.rb +80 -0
- data/lib/phrase/api/keys_api.rb +6 -6
- data/lib/phrase/api/locales_api.rb +8 -3
- data/lib/phrase/api/members_api.rb +80 -0
- data/lib/phrase/api/screenshot_markers_api.rb +9 -0
- data/lib/phrase/api/screenshots_api.rb +9 -0
- data/lib/phrase/api/translations_api.rb +35 -35
- data/lib/phrase/api/users_api.rb +3 -3
- data/lib/phrase/api/variables_api.rb +378 -0
- data/lib/phrase/api_client.rb +2 -0
- data/lib/phrase/models/branch_name.rb +194 -0
- data/lib/phrase/models/current_user.rb +257 -0
- data/lib/phrase/models/invitation.rb +48 -4
- data/lib/phrase/models/invitation_create_parameters.rb +25 -1
- data/lib/phrase/models/invitation_update_parameters.rb +25 -1
- data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
- data/lib/phrase/models/job.rb +22 -13
- data/lib/phrase/models/job_details.rb +19 -10
- data/lib/phrase/models/job_locale.rb +31 -4
- data/lib/phrase/models/member.rb +35 -4
- data/lib/phrase/models/member_project_detail.rb +285 -0
- data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
- data/lib/phrase/models/member_spaces.rb +230 -0
- data/lib/phrase/models/member_update_parameters.rb +25 -1
- data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
- data/lib/phrase/models/project_update_parameters.rb +183 -13
- data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
- data/lib/phrase/models/variable.rb +221 -0
- data/lib/phrase/models/variable_create_parameters.rb +205 -0
- data/lib/phrase/models/variable_update_parameters.rb +205 -0
- data/lib/phrase/models/webhook.rb +10 -1
- data/lib/phrase/models/webhook_create_parameters.rb +14 -4
- data/lib/phrase/models/webhook_update_parameters.rb +14 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/invitations_api_spec.rb +15 -0
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locales_api_spec.rb +2 -1
- data/spec/api/members_api_spec.rb +15 -0
- data/spec/api/screenshot_markers_api_spec.rb +3 -0
- data/spec/api/screenshots_api_spec.rb +3 -0
- data/spec/api/translations_api_spec.rb +10 -10
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/api/variables_api_spec.rb +95 -0
- data/spec/models/branch_name_spec.rb +29 -0
- data/spec/models/current_user_spec.rb +71 -0
- data/spec/models/invitation_create_parameters_spec.rb +12 -0
- data/spec/models/invitation_spec.rb +24 -0
- data/spec/models/invitation_update_parameters_spec.rb +12 -0
- data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
- data/spec/models/job_details_spec.rb +9 -3
- data/spec/models/job_locale_spec.rb +18 -0
- data/spec/models/job_spec.rb +9 -3
- data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
- data/spec/models/member_project_detail_spec.rb +83 -0
- data/spec/models/member_spaces_spec.rb +53 -0
- data/spec/models/member_spec.rb +18 -0
- data/spec/models/member_update_parameters_spec.rb +12 -0
- data/spec/models/member_update_settings_parameters_spec.rb +35 -0
- data/spec/models/project_update_parameters_spec.rb +103 -1
- data/spec/models/screenshot_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
- data/spec/models/screenshot_update_parameters_spec.rb +6 -0
- data/spec/models/variable_create_parameters_spec.rb +35 -0
- data/spec/models/variable_spec.rb +47 -0
- data/spec/models/variable_update_parameters_spec.rb +35 -0
- data/spec/models/webhook_create_parameters_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_update_parameters_spec.rb +6 -0
- metadata +206 -162
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**branch** | **String** | specify the branch to use | [optional]
|
|
7
8
|
**name** | **String** | Name of the screenshot | [optional]
|
|
8
9
|
**description** | **String** | Description of the screenshot | [optional]
|
|
9
10
|
**filename** | **File** | Screenshot file | [optional]
|
|
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
|
|
|
13
14
|
```ruby
|
|
14
15
|
require 'Phrase'
|
|
15
16
|
|
|
16
|
-
instance = Phrase::ScreenshotUpdateParameters.new(
|
|
17
|
+
instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
|
|
18
|
+
name: A screenshot name,
|
|
17
19
|
description: A screenshot description,
|
|
18
20
|
filename: null)
|
|
19
21
|
```
|
data/docs/ScreenshotsApi.md
CHANGED
|
@@ -103,7 +103,8 @@ api_instance = Phrase::ScreenshotsApi.new
|
|
|
103
103
|
project_id = 'project_id_example' # String | Project ID
|
|
104
104
|
id = 'id_example' # String | ID
|
|
105
105
|
opts = {
|
|
106
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
106
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
107
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
begin
|
|
@@ -122,6 +123,7 @@ Name | Type | Description | Notes
|
|
|
122
123
|
**project_id** | **String**| Project ID |
|
|
123
124
|
**id** | **String**| ID |
|
|
124
125
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
126
|
+
**branch** | **String**| specify the branch to use | [optional]
|
|
125
127
|
|
|
126
128
|
### Return type
|
|
127
129
|
|
|
@@ -165,7 +167,8 @@ api_instance = Phrase::ScreenshotsApi.new
|
|
|
165
167
|
project_id = 'project_id_example' # String | Project ID
|
|
166
168
|
id = 'id_example' # String | ID
|
|
167
169
|
opts = {
|
|
168
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
170
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
171
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
begin
|
|
@@ -185,6 +188,7 @@ Name | Type | Description | Notes
|
|
|
185
188
|
**project_id** | **String**| Project ID |
|
|
186
189
|
**id** | **String**| ID |
|
|
187
190
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
191
|
+
**branch** | **String**| specify the branch to use | [optional]
|
|
188
192
|
|
|
189
193
|
### Return type
|
|
190
194
|
|
|
@@ -295,6 +299,7 @@ opts = {
|
|
|
295
299
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
296
300
|
page: 1, # Integer | Page number
|
|
297
301
|
per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
302
|
+
branch: 'my-feature-branch', # String | specify the branch to use
|
|
298
303
|
key_id: 'abcd1234cdef1234abcd1234cdef1234' # String | filter by key
|
|
299
304
|
}
|
|
300
305
|
|
|
@@ -316,6 +321,7 @@ Name | Type | Description | Notes
|
|
|
316
321
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
317
322
|
**page** | **Integer**| Page number | [optional]
|
|
318
323
|
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
324
|
+
**branch** | **String**| specify the branch to use | [optional]
|
|
319
325
|
**key_id** | **String**| filter by key | [optional]
|
|
320
326
|
|
|
321
327
|
### Return type
|
data/docs/TranslationsApi.md
CHANGED
|
@@ -14,13 +14,13 @@ Method | HTTP request | Description
|
|
|
14
14
|
[**translation_verify**](TranslationsApi.md#translation_verify) | **PATCH** /projects/{project_id}/translations/{id}/verify | Verify a translation
|
|
15
15
|
[**translations_by_key**](TranslationsApi.md#translations_by_key) | **GET** /projects/{project_id}/keys/{key_id}/translations | List translations by key
|
|
16
16
|
[**translations_by_locale**](TranslationsApi.md#translations_by_locale) | **GET** /projects/{project_id}/locales/{locale_id}/translations | List translations by locale
|
|
17
|
-
[**
|
|
18
|
-
[**
|
|
17
|
+
[**translations_exclude_collection**](TranslationsApi.md#translations_exclude_collection) | **PATCH** /projects/{project_id}/translations/exclude | Set exclude from export flag on translations selected by query
|
|
18
|
+
[**translations_include_collection**](TranslationsApi.md#translations_include_collection) | **PATCH** /projects/{project_id}/translations/include | Remove exlude from import flag from translations selected by query
|
|
19
19
|
[**translations_list**](TranslationsApi.md#translations_list) | **GET** /projects/{project_id}/translations | List all translations
|
|
20
|
-
[**
|
|
20
|
+
[**translations_review_collection**](TranslationsApi.md#translations_review_collection) | **PATCH** /projects/{project_id}/translations/review | Review translations selected by query
|
|
21
21
|
[**translations_search**](TranslationsApi.md#translations_search) | **POST** /projects/{project_id}/translations/search | Search translations
|
|
22
|
-
[**
|
|
23
|
-
[**
|
|
22
|
+
[**translations_unverify_collection**](TranslationsApi.md#translations_unverify_collection) | **PATCH** /projects/{project_id}/translations/unverify | Mark translations selected by query as unverified
|
|
23
|
+
[**translations_verify_collection**](TranslationsApi.md#translations_verify_collection) | **PATCH** /projects/{project_id}/translations/verify | Verify translations selected by query
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -692,9 +692,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
|
692
692
|
- **Accept**: application/json
|
|
693
693
|
|
|
694
694
|
|
|
695
|
-
##
|
|
695
|
+
## translations_exclude_collection
|
|
696
696
|
|
|
697
|
-
> AffectedCount
|
|
697
|
+
> AffectedCount translations_exclude_collection(project_id, translations_exclude_parameters, opts)
|
|
698
698
|
|
|
699
699
|
Set exclude from export flag on translations selected by query
|
|
700
700
|
|
|
@@ -725,10 +725,10 @@ opts = {
|
|
|
725
725
|
|
|
726
726
|
begin
|
|
727
727
|
#Set exclude from export flag on translations selected by query
|
|
728
|
-
result = api_instance.
|
|
728
|
+
result = api_instance.translations_exclude_collection(project_id, translations_exclude_parameters, opts)
|
|
729
729
|
pp result
|
|
730
730
|
rescue Phrase::ApiError => e
|
|
731
|
-
puts "Exception when calling TranslationsApi->
|
|
731
|
+
puts "Exception when calling TranslationsApi->translations_exclude_collection: #{e}"
|
|
732
732
|
end
|
|
733
733
|
```
|
|
734
734
|
|
|
@@ -755,9 +755,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
|
|
|
755
755
|
- **Accept**: application/json
|
|
756
756
|
|
|
757
757
|
|
|
758
|
-
##
|
|
758
|
+
## translations_include_collection
|
|
759
759
|
|
|
760
|
-
> AffectedCount
|
|
760
|
+
> AffectedCount translations_include_collection(project_id, translations_include_parameters, opts)
|
|
761
761
|
|
|
762
762
|
Remove exlude from import flag from translations selected by query
|
|
763
763
|
|
|
@@ -788,10 +788,10 @@ opts = {
|
|
|
788
788
|
|
|
789
789
|
begin
|
|
790
790
|
#Remove exlude from import flag from translations selected by query
|
|
791
|
-
result = api_instance.
|
|
791
|
+
result = api_instance.translations_include_collection(project_id, translations_include_parameters, opts)
|
|
792
792
|
pp result
|
|
793
793
|
rescue Phrase::ApiError => e
|
|
794
|
-
puts "Exception when calling TranslationsApi->
|
|
794
|
+
puts "Exception when calling TranslationsApi->translations_include_collection: #{e}"
|
|
795
795
|
end
|
|
796
796
|
```
|
|
797
797
|
|
|
@@ -891,9 +891,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
|
891
891
|
- **Accept**: application/json
|
|
892
892
|
|
|
893
893
|
|
|
894
|
-
##
|
|
894
|
+
## translations_review_collection
|
|
895
895
|
|
|
896
|
-
> AffectedCount
|
|
896
|
+
> AffectedCount translations_review_collection(project_id, translations_review_parameters, opts)
|
|
897
897
|
|
|
898
898
|
Review translations selected by query
|
|
899
899
|
|
|
@@ -924,10 +924,10 @@ opts = {
|
|
|
924
924
|
|
|
925
925
|
begin
|
|
926
926
|
#Review translations selected by query
|
|
927
|
-
result = api_instance.
|
|
927
|
+
result = api_instance.translations_review_collection(project_id, translations_review_parameters, opts)
|
|
928
928
|
pp result
|
|
929
929
|
rescue Phrase::ApiError => e
|
|
930
|
-
puts "Exception when calling TranslationsApi->
|
|
930
|
+
puts "Exception when calling TranslationsApi->translations_review_collection: #{e}"
|
|
931
931
|
end
|
|
932
932
|
```
|
|
933
933
|
|
|
@@ -1021,9 +1021,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
|
1021
1021
|
- **Accept**: application/json
|
|
1022
1022
|
|
|
1023
1023
|
|
|
1024
|
-
##
|
|
1024
|
+
## translations_unverify_collection
|
|
1025
1025
|
|
|
1026
|
-
> AffectedCount
|
|
1026
|
+
> AffectedCount translations_unverify_collection(project_id, translations_unverify_parameters, opts)
|
|
1027
1027
|
|
|
1028
1028
|
Mark translations selected by query as unverified
|
|
1029
1029
|
|
|
@@ -1054,10 +1054,10 @@ opts = {
|
|
|
1054
1054
|
|
|
1055
1055
|
begin
|
|
1056
1056
|
#Mark translations selected by query as unverified
|
|
1057
|
-
result = api_instance.
|
|
1057
|
+
result = api_instance.translations_unverify_collection(project_id, translations_unverify_parameters, opts)
|
|
1058
1058
|
pp result
|
|
1059
1059
|
rescue Phrase::ApiError => e
|
|
1060
|
-
puts "Exception when calling TranslationsApi->
|
|
1060
|
+
puts "Exception when calling TranslationsApi->translations_unverify_collection: #{e}"
|
|
1061
1061
|
end
|
|
1062
1062
|
```
|
|
1063
1063
|
|
|
@@ -1084,9 +1084,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
|
|
|
1084
1084
|
- **Accept**: application/json
|
|
1085
1085
|
|
|
1086
1086
|
|
|
1087
|
-
##
|
|
1087
|
+
## translations_verify_collection
|
|
1088
1088
|
|
|
1089
|
-
> AffectedCount
|
|
1089
|
+
> AffectedCount translations_verify_collection(project_id, translations_verify_parameters, opts)
|
|
1090
1090
|
|
|
1091
1091
|
Verify translations selected by query
|
|
1092
1092
|
|
|
@@ -1117,10 +1117,10 @@ opts = {
|
|
|
1117
1117
|
|
|
1118
1118
|
begin
|
|
1119
1119
|
#Verify translations selected by query
|
|
1120
|
-
result = api_instance.
|
|
1120
|
+
result = api_instance.translations_verify_collection(project_id, translations_verify_parameters, opts)
|
|
1121
1121
|
pp result
|
|
1122
1122
|
rescue Phrase::ApiError => e
|
|
1123
|
-
puts "Exception when calling TranslationsApi->
|
|
1123
|
+
puts "Exception when calling TranslationsApi->translations_verify_collection: #{e}"
|
|
1124
1124
|
end
|
|
1125
1125
|
```
|
|
1126
1126
|
|
data/docs/UsersApi.md
CHANGED
|
@@ -10,7 +10,7 @@ Method | HTTP request | Description
|
|
|
10
10
|
|
|
11
11
|
## show_user
|
|
12
12
|
|
|
13
|
-
>
|
|
13
|
+
> CurrentUser show_user(opts)
|
|
14
14
|
|
|
15
15
|
Show current User
|
|
16
16
|
|
|
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
|
|
|
55
55
|
|
|
56
56
|
### Return type
|
|
57
57
|
|
|
58
|
-
Response<([**
|
|
58
|
+
Response<([**CurrentUser**](CurrentUser.md))>
|
|
59
59
|
|
|
60
60
|
### Authorization
|
|
61
61
|
|
data/docs/Variable.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::Variable
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | | [optional]
|
|
8
|
+
**value** | **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::Variable.new(name: null,
|
|
18
|
+
value: null,
|
|
19
|
+
created_at: null,
|
|
20
|
+
updated_at: null)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Phrase::VariableCreateParameters
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | Name of the variable | [optional]
|
|
8
|
+
**value** | **String** | Value of the variable | [optional]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'Phrase'
|
|
14
|
+
|
|
15
|
+
instance = Phrase::VariableCreateParameters.new(name: MY_VARIABLE,
|
|
16
|
+
value: Hello World)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Phrase::VariableUpdateParameters
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | Name of the variable | [optional]
|
|
8
|
+
**value** | **String** | Value of the variable | [optional]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'Phrase'
|
|
14
|
+
|
|
15
|
+
instance = Phrase::VariableUpdateParameters.new(name: MY_VARIABLE,
|
|
16
|
+
value: Hello World)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Phrase::VariablesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**variable_create**](VariablesApi.md#variable_create) | **POST** /projects/{project_id}/variables | Create a variable
|
|
8
|
+
[**variable_delete**](VariablesApi.md#variable_delete) | **DELETE** /projects/{project_id}/variables/{name} | Delete a variable
|
|
9
|
+
[**variable_show**](VariablesApi.md#variable_show) | **GET** /projects/{project_id}/variables/{name} | Get a single variable
|
|
10
|
+
[**variable_update**](VariablesApi.md#variable_update) | **PATCH** /projects/{project_id}/variables/{name} | Update a variable
|
|
11
|
+
[**variables_list**](VariablesApi.md#variables_list) | **GET** /projects/{project_id}/variables | List variables
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## variable_create
|
|
16
|
+
|
|
17
|
+
> Variable variable_create(project_id, variable_create_parameters, opts)
|
|
18
|
+
|
|
19
|
+
Create a variable
|
|
20
|
+
|
|
21
|
+
Create a new variable.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
# load the gem
|
|
27
|
+
require 'phrase'
|
|
28
|
+
# setup authorization
|
|
29
|
+
Phrase.configure do |config|
|
|
30
|
+
# Configure HTTP basic authorization: Basic
|
|
31
|
+
config.username = 'YOUR USERNAME'
|
|
32
|
+
config.password = 'YOUR PASSWORD'
|
|
33
|
+
|
|
34
|
+
# Configure API key authorization: Token
|
|
35
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
36
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = Phrase::VariablesApi.new
|
|
40
|
+
project_id = 'project_id_example' # String | Project ID
|
|
41
|
+
variable_create_parameters = Phrase::VariableCreateParameters.new # VariableCreateParameters |
|
|
42
|
+
opts = {
|
|
43
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
begin
|
|
47
|
+
#Create a variable
|
|
48
|
+
result = api_instance.variable_create(project_id, variable_create_parameters, opts)
|
|
49
|
+
pp result
|
|
50
|
+
rescue Phrase::ApiError => e
|
|
51
|
+
puts "Exception when calling VariablesApi->variable_create: #{e}"
|
|
52
|
+
end
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Parameters
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
Name | Type | Description | Notes
|
|
59
|
+
------------- | ------------- | ------------- | -------------
|
|
60
|
+
**project_id** | **String**| Project ID |
|
|
61
|
+
**variable_create_parameters** | [**VariableCreateParameters**](VariableCreateParameters.md)| |
|
|
62
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
Response<([**Variable**](Variable.md))>
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: application/json
|
|
75
|
+
- **Accept**: application/json
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## variable_delete
|
|
79
|
+
|
|
80
|
+
> variable_delete(project_id, name, opts)
|
|
81
|
+
|
|
82
|
+
Delete a variable
|
|
83
|
+
|
|
84
|
+
Delete an existing variable.
|
|
85
|
+
|
|
86
|
+
### Example
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
# load the gem
|
|
90
|
+
require 'phrase'
|
|
91
|
+
# setup authorization
|
|
92
|
+
Phrase.configure do |config|
|
|
93
|
+
# Configure HTTP basic authorization: Basic
|
|
94
|
+
config.username = 'YOUR USERNAME'
|
|
95
|
+
config.password = 'YOUR PASSWORD'
|
|
96
|
+
|
|
97
|
+
# Configure API key authorization: Token
|
|
98
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
99
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
api_instance = Phrase::VariablesApi.new
|
|
103
|
+
project_id = 'project_id_example' # String | Project ID
|
|
104
|
+
name = 'name_example' # String | name
|
|
105
|
+
opts = {
|
|
106
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
#Delete a variable
|
|
111
|
+
api_instance.variable_delete(project_id, name, opts)
|
|
112
|
+
rescue Phrase::ApiError => e
|
|
113
|
+
puts "Exception when calling VariablesApi->variable_delete: #{e}"
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Parameters
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
Name | Type | Description | Notes
|
|
121
|
+
------------- | ------------- | ------------- | -------------
|
|
122
|
+
**project_id** | **String**| Project ID |
|
|
123
|
+
**name** | **String**| name |
|
|
124
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
125
|
+
|
|
126
|
+
### Return type
|
|
127
|
+
|
|
128
|
+
Response<(nil (empty response body))>
|
|
129
|
+
|
|
130
|
+
### Authorization
|
|
131
|
+
|
|
132
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
133
|
+
|
|
134
|
+
### HTTP request headers
|
|
135
|
+
|
|
136
|
+
- **Content-Type**: Not defined
|
|
137
|
+
- **Accept**: Not defined
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## variable_show
|
|
141
|
+
|
|
142
|
+
> Variable variable_show(project_id, name, opts)
|
|
143
|
+
|
|
144
|
+
Get a single variable
|
|
145
|
+
|
|
146
|
+
Get details on a single variable for a given project.
|
|
147
|
+
|
|
148
|
+
### Example
|
|
149
|
+
|
|
150
|
+
```ruby
|
|
151
|
+
# load the gem
|
|
152
|
+
require 'phrase'
|
|
153
|
+
# setup authorization
|
|
154
|
+
Phrase.configure do |config|
|
|
155
|
+
# Configure HTTP basic authorization: Basic
|
|
156
|
+
config.username = 'YOUR USERNAME'
|
|
157
|
+
config.password = 'YOUR PASSWORD'
|
|
158
|
+
|
|
159
|
+
# Configure API key authorization: Token
|
|
160
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
161
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
api_instance = Phrase::VariablesApi.new
|
|
165
|
+
project_id = 'project_id_example' # String | Project ID
|
|
166
|
+
name = 'name_example' # String | name
|
|
167
|
+
opts = {
|
|
168
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
begin
|
|
172
|
+
#Get a single variable
|
|
173
|
+
result = api_instance.variable_show(project_id, name, opts)
|
|
174
|
+
pp result
|
|
175
|
+
rescue Phrase::ApiError => e
|
|
176
|
+
puts "Exception when calling VariablesApi->variable_show: #{e}"
|
|
177
|
+
end
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Parameters
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Name | Type | Description | Notes
|
|
184
|
+
------------- | ------------- | ------------- | -------------
|
|
185
|
+
**project_id** | **String**| Project ID |
|
|
186
|
+
**name** | **String**| name |
|
|
187
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
188
|
+
|
|
189
|
+
### Return type
|
|
190
|
+
|
|
191
|
+
Response<([**Variable**](Variable.md))>
|
|
192
|
+
|
|
193
|
+
### Authorization
|
|
194
|
+
|
|
195
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
196
|
+
|
|
197
|
+
### HTTP request headers
|
|
198
|
+
|
|
199
|
+
- **Content-Type**: Not defined
|
|
200
|
+
- **Accept**: application/json
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
## variable_update
|
|
204
|
+
|
|
205
|
+
> Variable variable_update(project_id, name, variable_update_parameters, opts)
|
|
206
|
+
|
|
207
|
+
Update a variable
|
|
208
|
+
|
|
209
|
+
Update an existing variable.
|
|
210
|
+
|
|
211
|
+
### Example
|
|
212
|
+
|
|
213
|
+
```ruby
|
|
214
|
+
# load the gem
|
|
215
|
+
require 'phrase'
|
|
216
|
+
# setup authorization
|
|
217
|
+
Phrase.configure do |config|
|
|
218
|
+
# Configure HTTP basic authorization: Basic
|
|
219
|
+
config.username = 'YOUR USERNAME'
|
|
220
|
+
config.password = 'YOUR PASSWORD'
|
|
221
|
+
|
|
222
|
+
# Configure API key authorization: Token
|
|
223
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
224
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
api_instance = Phrase::VariablesApi.new
|
|
228
|
+
project_id = 'project_id_example' # String | Project ID
|
|
229
|
+
name = 'name_example' # String | name
|
|
230
|
+
variable_update_parameters = Phrase::VariableUpdateParameters.new # VariableUpdateParameters |
|
|
231
|
+
opts = {
|
|
232
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
begin
|
|
236
|
+
#Update a variable
|
|
237
|
+
result = api_instance.variable_update(project_id, name, variable_update_parameters, opts)
|
|
238
|
+
pp result
|
|
239
|
+
rescue Phrase::ApiError => e
|
|
240
|
+
puts "Exception when calling VariablesApi->variable_update: #{e}"
|
|
241
|
+
end
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Parameters
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
Name | Type | Description | Notes
|
|
248
|
+
------------- | ------------- | ------------- | -------------
|
|
249
|
+
**project_id** | **String**| Project ID |
|
|
250
|
+
**name** | **String**| name |
|
|
251
|
+
**variable_update_parameters** | [**VariableUpdateParameters**](VariableUpdateParameters.md)| |
|
|
252
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
253
|
+
|
|
254
|
+
### Return type
|
|
255
|
+
|
|
256
|
+
Response<([**Variable**](Variable.md))>
|
|
257
|
+
|
|
258
|
+
### Authorization
|
|
259
|
+
|
|
260
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
261
|
+
|
|
262
|
+
### HTTP request headers
|
|
263
|
+
|
|
264
|
+
- **Content-Type**: application/json
|
|
265
|
+
- **Accept**: application/json
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
## variables_list
|
|
269
|
+
|
|
270
|
+
> Array<Variable> variables_list(project_id, opts)
|
|
271
|
+
|
|
272
|
+
List variables
|
|
273
|
+
|
|
274
|
+
List all variables for the current project.
|
|
275
|
+
|
|
276
|
+
### Example
|
|
277
|
+
|
|
278
|
+
```ruby
|
|
279
|
+
# load the gem
|
|
280
|
+
require 'phrase'
|
|
281
|
+
# setup authorization
|
|
282
|
+
Phrase.configure do |config|
|
|
283
|
+
# Configure HTTP basic authorization: Basic
|
|
284
|
+
config.username = 'YOUR USERNAME'
|
|
285
|
+
config.password = 'YOUR PASSWORD'
|
|
286
|
+
|
|
287
|
+
# Configure API key authorization: Token
|
|
288
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
289
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
api_instance = Phrase::VariablesApi.new
|
|
293
|
+
project_id = 'project_id_example' # String | Project ID
|
|
294
|
+
opts = {
|
|
295
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
296
|
+
page: 1, # Integer | Page number
|
|
297
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
begin
|
|
301
|
+
#List variables
|
|
302
|
+
result = api_instance.variables_list(project_id, opts)
|
|
303
|
+
pp result
|
|
304
|
+
rescue Phrase::ApiError => e
|
|
305
|
+
puts "Exception when calling VariablesApi->variables_list: #{e}"
|
|
306
|
+
end
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Parameters
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
Name | Type | Description | Notes
|
|
313
|
+
------------- | ------------- | ------------- | -------------
|
|
314
|
+
**project_id** | **String**| Project ID |
|
|
315
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
316
|
+
**page** | **Integer**| Page number | [optional]
|
|
317
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
|
318
|
+
|
|
319
|
+
### Return type
|
|
320
|
+
|
|
321
|
+
Response<([**Array<Variable>**](Variable.md))>
|
|
322
|
+
|
|
323
|
+
### Authorization
|
|
324
|
+
|
|
325
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
326
|
+
|
|
327
|
+
### HTTP request headers
|
|
328
|
+
|
|
329
|
+
- **Content-Type**: Not defined
|
|
330
|
+
- **Accept**: application/json
|
|
331
|
+
|