phrase 1.0.4 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/docs/BranchName.md +17 -0
- data/docs/Job.md +4 -0
- data/docs/JobDetails.md +4 -0
- data/docs/JobsApi.md +72 -0
- data/docs/LocalesApi.md +2 -0
- data/docs/ScreenshotsApi.md +3 -1
- data/docs/Webhook.md +2 -0
- data/docs/WebhookCreateParameters.md +5 -1
- data/docs/WebhookUpdateParameters.md +5 -1
- data/lib/phrase.rb +1 -0
- data/lib/phrase/api/jobs_api.rb +81 -0
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/screenshots_api.rb +3 -0
- data/lib/phrase/api_client.rb +4 -2
- data/lib/phrase/models/branch_name.rb +194 -0
- data/lib/phrase/models/job.rb +19 -1
- data/lib/phrase/models/job_details.rb +19 -1
- data/lib/phrase/models/webhook.rb +10 -1
- data/lib/phrase/models/webhook_create_parameters.rb +24 -4
- data/lib/phrase/models/webhook_update_parameters.rb +24 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/jobs_api_spec.rb +18 -0
- data/spec/api/locales_api_spec.rb +1 -0
- data/spec/api/screenshots_api_spec.rb +1 -0
- data/spec/models/branch_name_spec.rb +29 -0
- data/spec/models/job_details_spec.rb +12 -0
- data/spec/models/job_spec.rb +12 -0
- data/spec/models/webhook_create_parameters_spec.rb +12 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_update_parameters_spec.rb +12 -0
- metadata +167 -163
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45f843197c2f2f61eef52c3671197f5130a8959a012ac56b5378ee33967ba867
|
4
|
+
data.tar.gz: 7ae163d2f7a2c509354c36b0b38172850e95cda6c36b679196e3cf27a150111e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8b5c3e052cdcce736e4388bfe6f06a773e5bb1b61d414ab2ede45ed7f148e39afda8d3efc924b9014ef05186a9f3a3d5d87f9cf4200c73c2ae81df921d164e
|
7
|
+
data.tar.gz: b7239c6357c00f56335cf89b34c33e31e895d64eeada546df237371306a74a6dc86d9a122a37ce86323b13db40b7172327ee4f677dbb6507fc645b07a9e20840
|
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.9
|
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.9.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.9.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -186,6 +186,7 @@ Class | Method | HTTP request | Description
|
|
186
186
|
*Phrase::JobsApi* | [**job_show**](docs/JobsApi.md#job_show) | **GET** /projects/{project_id}/jobs/{id} | Get a single job
|
187
187
|
*Phrase::JobsApi* | [**job_start**](docs/JobsApi.md#job_start) | **POST** /projects/{project_id}/jobs/{id}/start | Start a job
|
188
188
|
*Phrase::JobsApi* | [**job_update**](docs/JobsApi.md#job_update) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
|
189
|
+
*Phrase::JobsApi* | [**jobs_by_account**](docs/JobsApi.md#jobs_by_account) | **GET** /accounts/{account_id}/jobs | List account jobs
|
189
190
|
*Phrase::JobsApi* | [**jobs_list**](docs/JobsApi.md#jobs_list) | **GET** /projects/{project_id}/jobs | List jobs
|
190
191
|
*Phrase::KeysApi* | [**key_create**](docs/KeysApi.md#key_create) | **POST** /projects/{project_id}/keys | Create a key
|
191
192
|
*Phrase::KeysApi* | [**key_delete**](docs/KeysApi.md#key_delete) | **DELETE** /projects/{project_id}/keys/{id} | Delete a key
|
@@ -313,6 +314,7 @@ Class | Method | HTTP request | Description
|
|
313
314
|
- [Phrase::Branch](docs/Branch.md)
|
314
315
|
- [Phrase::BranchCreateParameters](docs/BranchCreateParameters.md)
|
315
316
|
- [Phrase::BranchMergeParameters](docs/BranchMergeParameters.md)
|
317
|
+
- [Phrase::BranchName](docs/BranchName.md)
|
316
318
|
- [Phrase::BranchUpdateParameters](docs/BranchUpdateParameters.md)
|
317
319
|
- [Phrase::Comment](docs/Comment.md)
|
318
320
|
- [Phrase::CommentCreateParameters](docs/CommentCreateParameters.md)
|
data/docs/BranchName.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::BranchName
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::BranchName.new(name: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/Job.md
CHANGED
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
10
10
|
**due_date** | **DateTime** | | [optional]
|
11
11
|
**state** | **String** | | [optional]
|
12
12
|
**ticket_url** | **String** | | [optional]
|
13
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
14
|
+
**branch** | [**BranchName**](BranchName.md) | | [optional]
|
13
15
|
**created_at** | **DateTime** | | [optional]
|
14
16
|
**updated_at** | **DateTime** | | [optional]
|
15
17
|
|
@@ -24,6 +26,8 @@ instance = Phrase::Job.new(id: null,
|
|
24
26
|
due_date: null,
|
25
27
|
state: null,
|
26
28
|
ticket_url: null,
|
29
|
+
project: null,
|
30
|
+
branch: null,
|
27
31
|
created_at: null,
|
28
32
|
updated_at: null)
|
29
33
|
```
|
data/docs/JobDetails.md
CHANGED
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
10
10
|
**due_date** | **DateTime** | | [optional]
|
11
11
|
**state** | **String** | | [optional]
|
12
12
|
**ticket_url** | **String** | | [optional]
|
13
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
14
|
+
**branch** | [**BranchName**](BranchName.md) | | [optional]
|
13
15
|
**created_at** | **DateTime** | | [optional]
|
14
16
|
**updated_at** | **DateTime** | | [optional]
|
15
17
|
**owner** | [**UserPreview**](UserPreview.md) | | [optional]
|
@@ -28,6 +30,8 @@ instance = Phrase::JobDetails.new(id: null,
|
|
28
30
|
due_date: null,
|
29
31
|
state: null,
|
30
32
|
ticket_url: null,
|
33
|
+
project: null,
|
34
|
+
branch: null,
|
31
35
|
created_at: null,
|
32
36
|
updated_at: null,
|
33
37
|
owner: null,
|
data/docs/JobsApi.md
CHANGED
@@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|
13
13
|
[**job_show**](JobsApi.md#job_show) | **GET** /projects/{project_id}/jobs/{id} | Get a single job
|
14
14
|
[**job_start**](JobsApi.md#job_start) | **POST** /projects/{project_id}/jobs/{id}/start | Start a job
|
15
15
|
[**job_update**](JobsApi.md#job_update) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
|
16
|
+
[**jobs_by_account**](JobsApi.md#jobs_by_account) | **GET** /accounts/{account_id}/jobs | List account jobs
|
16
17
|
[**jobs_list**](JobsApi.md#jobs_list) | **GET** /projects/{project_id}/jobs | List jobs
|
17
18
|
|
18
19
|
|
@@ -600,6 +601,77 @@ Response<([**JobDetails**](JobDetails.md))>
|
|
600
601
|
- **Accept**: application/json
|
601
602
|
|
602
603
|
|
604
|
+
## jobs_by_account
|
605
|
+
|
606
|
+
> Array<Job> jobs_by_account(account_id, opts)
|
607
|
+
|
608
|
+
List account jobs
|
609
|
+
|
610
|
+
List all jobs for the given account.
|
611
|
+
|
612
|
+
### Example
|
613
|
+
|
614
|
+
```ruby
|
615
|
+
# load the gem
|
616
|
+
require 'phrase'
|
617
|
+
# setup authorization
|
618
|
+
Phrase.configure do |config|
|
619
|
+
# Configure HTTP basic authorization: Basic
|
620
|
+
config.username = 'YOUR USERNAME'
|
621
|
+
config.password = 'YOUR PASSWORD'
|
622
|
+
|
623
|
+
# Configure API key authorization: Token
|
624
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
625
|
+
config.api_key_prefix['Authorization'] = 'token'
|
626
|
+
end
|
627
|
+
|
628
|
+
api_instance = Phrase::JobsApi.new
|
629
|
+
account_id = 'account_id_example' # String | Account ID
|
630
|
+
opts = {
|
631
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
632
|
+
page: 1, # Integer | Page number
|
633
|
+
per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
|
634
|
+
owned_by: 'abcd1234cdef1234abcd1234cdef1234', # String | filter by user owning job
|
635
|
+
assigned_to: 'abcd1234cdef1234abcd1234cdef1234', # String | filter by user assigned to job
|
636
|
+
state: 'completed' # String | filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
637
|
+
}
|
638
|
+
|
639
|
+
begin
|
640
|
+
#List account jobs
|
641
|
+
result = api_instance.jobs_by_account(account_id, opts)
|
642
|
+
pp result
|
643
|
+
rescue Phrase::ApiError => e
|
644
|
+
puts "Exception when calling JobsApi->jobs_by_account: #{e}"
|
645
|
+
end
|
646
|
+
```
|
647
|
+
|
648
|
+
### Parameters
|
649
|
+
|
650
|
+
|
651
|
+
Name | Type | Description | Notes
|
652
|
+
------------- | ------------- | ------------- | -------------
|
653
|
+
**account_id** | **String**| Account ID |
|
654
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
655
|
+
**page** | **Integer**| Page number | [optional]
|
656
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
657
|
+
**owned_by** | **String**| filter by user owning job | [optional]
|
658
|
+
**assigned_to** | **String**| filter by user assigned to job | [optional]
|
659
|
+
**state** | **String**| filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code> | [optional]
|
660
|
+
|
661
|
+
### Return type
|
662
|
+
|
663
|
+
Response<([**Array<Job>**](Job.md))>
|
664
|
+
|
665
|
+
### Authorization
|
666
|
+
|
667
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
668
|
+
|
669
|
+
### HTTP request headers
|
670
|
+
|
671
|
+
- **Content-Type**: Not defined
|
672
|
+
- **Accept**: application/json
|
673
|
+
|
674
|
+
|
603
675
|
## jobs_list
|
604
676
|
|
605
677
|
> Array<Job> jobs_list(project_id, opts)
|
data/docs/LocalesApi.md
CHANGED
@@ -174,6 +174,7 @@ opts = {
|
|
174
174
|
tags: 'feature1,feature2', # String | Limit results to keys tagged with a list of comma separated tag names.
|
175
175
|
tag: 'feature', # String | Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
176
176
|
include_empty_translations: true, # Boolean | Indicates whether keys without translations should be included in the output as well.
|
177
|
+
exclude_empty_zero_forms: true, # Boolean | Indicates whether zero forms should be included when empty in pluralized keys.
|
177
178
|
include_translated_keys: true, # Boolean | Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
178
179
|
keep_notranslate_tags: true, # Boolean | Indicates whether [NOTRANSLATE] tags should be kept.
|
179
180
|
convert_emoji: true, # Boolean | This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -206,6 +207,7 @@ Name | Type | Description | Notes
|
|
206
207
|
**tags** | **String**| Limit results to keys tagged with a list of comma separated tag names. | [optional]
|
207
208
|
**tag** | **String**| Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead | [optional]
|
208
209
|
**include_empty_translations** | **Boolean**| Indicates whether keys without translations should be included in the output as well. | [optional]
|
210
|
+
**exclude_empty_zero_forms** | **Boolean**| Indicates whether zero forms should be included when empty in pluralized keys. | [optional]
|
209
211
|
**include_translated_keys** | **Boolean**| Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys. | [optional]
|
210
212
|
**keep_notranslate_tags** | **Boolean**| Indicates whether [NOTRANSLATE] tags should be kept. | [optional]
|
211
213
|
**convert_emoji** | **Boolean**| This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively. | [optional]
|
data/docs/ScreenshotsApi.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: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
297
|
+
per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
|
298
|
+
key_id: 'abcd1234cdef1234abcd1234cdef1234' # String | filter by key
|
298
299
|
}
|
299
300
|
|
300
301
|
begin
|
@@ -315,6 +316,7 @@ Name | Type | Description | Notes
|
|
315
316
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
316
317
|
**page** | **Integer**| Page number | [optional]
|
317
318
|
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
319
|
+
**key_id** | **String**| filter by key | [optional]
|
318
320
|
|
319
321
|
### Return type
|
320
322
|
|
data/docs/Webhook.md
CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**description** | **String** | | [optional]
|
10
10
|
**events** | **Array<String>** | | [optional]
|
11
11
|
**active** | **Boolean** | | [optional]
|
12
|
+
**include_branches** | **Boolean** | | [optional]
|
12
13
|
**created_at** | **DateTime** | | [optional]
|
13
14
|
**updated_at** | **DateTime** | | [optional]
|
14
15
|
|
@@ -22,6 +23,7 @@ instance = Phrase::Webhook.new(id: null,
|
|
22
23
|
description: null,
|
23
24
|
events: null,
|
24
25
|
active: null,
|
26
|
+
include_branches: null,
|
25
27
|
created_at: null,
|
26
28
|
updated_at: null)
|
27
29
|
```
|
@@ -5,9 +5,11 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**callback_url** | **String** | Callback URL to send requests to | [optional]
|
8
|
+
**secret** | **String** | Webhook secret used to calculate signature. If empty, the default project secret will be used. | [optional]
|
8
9
|
**description** | **String** | Webhook description | [optional]
|
9
10
|
**events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
|
10
11
|
**active** | **Boolean** | Whether webhook is active or inactive | [optional]
|
12
|
+
**include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
|
11
13
|
|
12
14
|
## Code Sample
|
13
15
|
|
@@ -15,9 +17,11 @@ Name | Type | Description | Notes
|
|
15
17
|
require 'Phrase'
|
16
18
|
|
17
19
|
instance = Phrase::WebhookCreateParameters.new(callback_url: http://example.com/hooks/phraseapp-notifications,
|
20
|
+
secret: secr3t,
|
18
21
|
description: My webhook for chat notifications,
|
19
22
|
events: locales:create,translations:update,
|
20
|
-
active: null
|
23
|
+
active: null,
|
24
|
+
include_branches: null)
|
21
25
|
```
|
22
26
|
|
23
27
|
|
@@ -5,9 +5,11 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**callback_url** | **String** | Callback URL to send requests to | [optional]
|
8
|
+
**secret** | **String** | Webhook secret used to calculate signature. If empty, the default project secret will be used. | [optional]
|
8
9
|
**description** | **String** | Webhook description | [optional]
|
9
10
|
**events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
|
10
11
|
**active** | **Boolean** | Whether webhook is active or inactive | [optional]
|
12
|
+
**include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
|
11
13
|
|
12
14
|
## Code Sample
|
13
15
|
|
@@ -15,9 +17,11 @@ Name | Type | Description | Notes
|
|
15
17
|
require 'Phrase'
|
16
18
|
|
17
19
|
instance = Phrase::WebhookUpdateParameters.new(callback_url: http://example.com/hooks/phraseapp-notifications,
|
20
|
+
secret: secr3t,
|
18
21
|
description: My webhook for chat notifications,
|
19
22
|
events: locales:create,translations:update,
|
20
|
-
active: null
|
23
|
+
active: null,
|
24
|
+
include_branches: null)
|
21
25
|
```
|
22
26
|
|
23
27
|
|
data/lib/phrase.rb
CHANGED
@@ -28,6 +28,7 @@ require 'phrase/models/blacklisted_key_update_parameters'
|
|
28
28
|
require 'phrase/models/branch'
|
29
29
|
require 'phrase/models/branch_create_parameters'
|
30
30
|
require 'phrase/models/branch_merge_parameters'
|
31
|
+
require 'phrase/models/branch_name'
|
31
32
|
require 'phrase/models/branch_update_parameters'
|
32
33
|
require 'phrase/models/comment'
|
33
34
|
require 'phrase/models/comment_create_parameters'
|
data/lib/phrase/api/jobs_api.rb
CHANGED
@@ -705,6 +705,87 @@ module Phrase
|
|
705
705
|
return response, status_code, headers
|
706
706
|
end
|
707
707
|
|
708
|
+
# List account jobs
|
709
|
+
# List all jobs for the given account.
|
710
|
+
# @param account_id [String] Account ID
|
711
|
+
# @param [Hash] opts the optional parameters
|
712
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
713
|
+
# @option opts [Integer] :page Page number
|
714
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
715
|
+
# @option opts [String] :owned_by filter by user owning job
|
716
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
717
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
718
|
+
# @return [Array<Job>]
|
719
|
+
def jobs_by_account(account_id, opts = {})
|
720
|
+
data, _status_code, _headers = jobs_by_account_with_http_info(account_id, opts)
|
721
|
+
data
|
722
|
+
end
|
723
|
+
|
724
|
+
# List account jobs
|
725
|
+
# List all jobs for the given account.
|
726
|
+
# @param account_id [String] Account ID
|
727
|
+
# @param [Hash] opts the optional parameters
|
728
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
729
|
+
# @option opts [Integer] :page Page number
|
730
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
731
|
+
# @option opts [String] :owned_by filter by user owning job
|
732
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
733
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
734
|
+
# @return [Array<(Response<(Array<Job>)>, Integer, Hash)>] Response<(Array<Job>)> data, response status code and response headers
|
735
|
+
def jobs_by_account_with_http_info(account_id, opts = {})
|
736
|
+
if @api_client.config.debugging
|
737
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.jobs_by_account ...'
|
738
|
+
end
|
739
|
+
# verify the required parameter 'account_id' is set
|
740
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
741
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling JobsApi.jobs_by_account"
|
742
|
+
end
|
743
|
+
# resource path
|
744
|
+
local_var_path = '/accounts/{account_id}/jobs'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
745
|
+
|
746
|
+
# query parameters
|
747
|
+
query_params = opts[:query_params] || {}
|
748
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
749
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
750
|
+
query_params[:'owned_by'] = opts[:'owned_by'] if !opts[:'owned_by'].nil?
|
751
|
+
query_params[:'assigned_to'] = opts[:'assigned_to'] if !opts[:'assigned_to'].nil?
|
752
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
753
|
+
|
754
|
+
# header parameters
|
755
|
+
header_params = opts[:header_params] || {}
|
756
|
+
# HTTP header 'Accept' (if needed)
|
757
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
758
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
759
|
+
|
760
|
+
# form parameters
|
761
|
+
form_params = opts[:form_params] || {}
|
762
|
+
|
763
|
+
# http body (model)
|
764
|
+
post_body = opts[:body]
|
765
|
+
|
766
|
+
# return_type
|
767
|
+
return_type = opts[:return_type] || 'Array<Job>'
|
768
|
+
|
769
|
+
# auth_names
|
770
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
771
|
+
|
772
|
+
new_options = opts.merge(
|
773
|
+
:header_params => header_params,
|
774
|
+
:query_params => query_params,
|
775
|
+
:form_params => form_params,
|
776
|
+
:body => post_body,
|
777
|
+
:auth_names => auth_names,
|
778
|
+
:return_type => return_type
|
779
|
+
)
|
780
|
+
|
781
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
782
|
+
if @api_client.config.debugging
|
783
|
+
@api_client.config.logger.debug "API called: JobsApi#jobs_by_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
784
|
+
end
|
785
|
+
response = ::Phrase::Response.new(data, headers)
|
786
|
+
return response, status_code, headers
|
787
|
+
end
|
788
|
+
|
708
789
|
# List jobs
|
709
790
|
# List all jobs for the given project.
|
710
791
|
# @param project_id [String] Project ID
|
@@ -165,6 +165,7 @@ module Phrase
|
|
165
165
|
# @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
|
166
166
|
# @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
167
167
|
# @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
|
168
|
+
# @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
|
168
169
|
# @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
169
170
|
# @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
|
170
171
|
# @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -191,6 +192,7 @@ module Phrase
|
|
191
192
|
# @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
|
192
193
|
# @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
193
194
|
# @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
|
195
|
+
# @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
|
194
196
|
# @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
195
197
|
# @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
|
196
198
|
# @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -223,6 +225,7 @@ module Phrase
|
|
223
225
|
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
224
226
|
query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
|
225
227
|
query_params[:'include_empty_translations'] = opts[:'include_empty_translations'] if !opts[:'include_empty_translations'].nil?
|
228
|
+
query_params[:'exclude_empty_zero_forms'] = opts[:'exclude_empty_zero_forms'] if !opts[:'exclude_empty_zero_forms'].nil?
|
226
229
|
query_params[:'include_translated_keys'] = opts[:'include_translated_keys'] if !opts[:'include_translated_keys'].nil?
|
227
230
|
query_params[:'keep_notranslate_tags'] = opts[:'keep_notranslate_tags'] if !opts[:'keep_notranslate_tags'].nil?
|
228
231
|
query_params[:'convert_emoji'] = opts[:'convert_emoji'] if !opts[:'convert_emoji'].nil?
|
@@ -310,6 +310,7 @@ module Phrase
|
|
310
310
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
311
311
|
# @option opts [Integer] :page Page number
|
312
312
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
313
|
+
# @option opts [String] :key_id filter by key
|
313
314
|
# @return [Array<Screenshot>]
|
314
315
|
def screenshots_list(project_id, opts = {})
|
315
316
|
data, _status_code, _headers = screenshots_list_with_http_info(project_id, opts)
|
@@ -323,6 +324,7 @@ module Phrase
|
|
323
324
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
324
325
|
# @option opts [Integer] :page Page number
|
325
326
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
327
|
+
# @option opts [String] :key_id filter by key
|
326
328
|
# @return [Array<(Response<(Array<Screenshot>)>, Integer, Hash)>] Response<(Array<Screenshot>)> data, response status code and response headers
|
327
329
|
def screenshots_list_with_http_info(project_id, opts = {})
|
328
330
|
if @api_client.config.debugging
|
@@ -339,6 +341,7 @@ module Phrase
|
|
339
341
|
query_params = opts[:query_params] || {}
|
340
342
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
341
343
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
344
|
+
query_params[:'key_id'] = opts[:'key_id'] if !opts[:'key_id'].nil?
|
342
345
|
|
343
346
|
# header parameters
|
344
347
|
header_params = opts[:header_params] || {}
|
data/lib/phrase/api_client.rb
CHANGED
@@ -128,9 +128,11 @@ module Phrase
|
|
128
128
|
data = {}
|
129
129
|
form_params.each do |key, value|
|
130
130
|
case value
|
131
|
-
when ::File, ::Array, nil
|
132
|
-
# let typhoeus handle File, Array and nil parameters
|
131
|
+
when ::File, ::Tempfile, ::Array, nil
|
132
|
+
# let typhoeus handle File, Tempfile, Array and nil parameters
|
133
133
|
data[key] = value
|
134
|
+
when ::Hash
|
135
|
+
data[key] = build_request_body(header_params, value, body)
|
134
136
|
else
|
135
137
|
data[key] = value.to_s
|
136
138
|
end
|