phrase 2.15.0 → 2.17.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 +15 -0
- data/Gemfile +1 -0
- data/README.md +13 -3
- data/docs/FigmaAttachment.md +23 -0
- data/docs/FigmaAttachmentCreateParameters.md +19 -0
- data/docs/FigmaAttachmentUpdateParameters.md +19 -0
- data/docs/FigmaAttachmentsApi.md +341 -0
- data/docs/KeysFigmaAttachmentsApi.md +142 -0
- data/docs/LocalesApi.md +8 -8
- data/docs/TranslationsApi.md +2 -2
- data/docs/UploadCreateParameters.md +3 -1
- data/docs/UploadsApi.md +3 -1
- data/lib/phrase/api/figma_attachments_api.rb +393 -0
- data/lib/phrase/api/keys_figma_attachments_api.rb +168 -0
- data/lib/phrase/api/locales_api.rb +8 -8
- data/lib/phrase/api/translations_api.rb +2 -2
- data/lib/phrase/api/uploads_api.rb +3 -0
- data/lib/phrase/models/figma_attachment.rb +221 -0
- data/lib/phrase/models/figma_attachment_create_parameters.rb +205 -0
- data/lib/phrase/models/figma_attachment_update_parameters.rb +205 -0
- data/lib/phrase/models/upload_create_parameters.rb +16 -4
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +5 -0
- data/spec/api/figma_attachments_api_spec.rb +100 -0
- data/spec/api/keys_figma_attachments_api_spec.rb +55 -0
- data/spec/api/locales_api_spec.rb +112 -8
- data/spec/api/translations_api_spec.rb +1 -1
- data/spec/api/uploads_api_spec.rb +16 -1
- data/spec/models/figma_attachment_create_parameters_spec.rb +35 -0
- data/spec/models/figma_attachment_spec.rb +47 -0
- data/spec/models/figma_attachment_update_parameters_spec.rb +35 -0
- data/spec/models/upload_create_parameters_spec.rb +6 -0
- data/spec/spec_helper.rb +1 -0
- metadata +239 -219
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e256910e1eee281300838e5c2ccbe1d372e61bb6fc0ea0120cf3ad3943256ca2
|
4
|
+
data.tar.gz: 23488afa28edeb726cd0313ddd09724a3b6ecd4ed889194152b6beaa072d75ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ff947242548cbb7d30d90ea410cc8b1e55521e8aa1e219fb46b3353c6eb2bb431f117ea91a22c034af26230e749859d8da62c427579bcdd2571e4f60cde95e0
|
7
|
+
data.tar.gz: 924205ceff36840e33741e21126e92e507793cb2aa56c15a1ced53e3bbab040be28a4680c04244d99d7a38e02069c62203c99a9c61efef85cc225eed5cb11ab6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.17.0](https://github.com/phrase/openapi/compare/ruby-v2.16.0...ruby-v2.17.0) (2023-10-13)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** Implement figma attachments endpoints ([#415](https://github.com/phrase/openapi/issues/415)) ([970e612](https://github.com/phrase/openapi/commit/970e612fda620ca882a221ef541036b8d200b675))
|
9
|
+
|
10
|
+
## [2.16.0](https://github.com/phrase/openapi/compare/ruby-v2.15.0...ruby-v2.16.0) (2023-09-12)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* Optionally tag only affected keys on upload [TSI-2041] ([#412](https://github.com/phrase/openapi/issues/412)) ([e8f958e](https://github.com/phrase/openapi/commit/e8f958e91469c2542f44ab68469c933688958383))
|
16
|
+
* **TSI-1946:** Add reviewed_at to translations ([#396](https://github.com/phrase/openapi/issues/396)) ([3e663d9](https://github.com/phrase/openapi/commit/3e663d971a99a816f0165dd6653a9a1e8a87c95e))
|
17
|
+
|
3
18
|
## [2.15.0](https://github.com/phrase/openapi/compare/ruby-v2.14.0...ruby-v2.15.0) (2023-08-28)
|
4
19
|
|
5
20
|
|
data/Gemfile
CHANGED
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.17.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.17.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.17.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -177,6 +177,11 @@ Class | Method | HTTP request | Description
|
|
177
177
|
*Phrase::DistributionsApi* | [**distributions_list**](docs/DistributionsApi.md#distributions_list) | **GET** /accounts/{account_id}/distributions | List distributions
|
178
178
|
*Phrase::DocumentsApi* | [**document_delete**](docs/DocumentsApi.md#document_delete) | **DELETE** /projects/{project_id}/documents/{id} | Delete document
|
179
179
|
*Phrase::DocumentsApi* | [**documents_list**](docs/DocumentsApi.md#documents_list) | **GET** /projects/{project_id}/documents | List documents
|
180
|
+
*Phrase::FigmaAttachmentsApi* | [**figma_attachment_create**](docs/FigmaAttachmentsApi.md#figma_attachment_create) | **POST** /projects/{project_id}/figma_attachments | Create a Figma attachment
|
181
|
+
*Phrase::FigmaAttachmentsApi* | [**figma_attachment_delete**](docs/FigmaAttachmentsApi.md#figma_attachment_delete) | **DELETE** /projects/{project_id}/figma_attachments/{id} | Delete a Figma attachment
|
182
|
+
*Phrase::FigmaAttachmentsApi* | [**figma_attachment_show**](docs/FigmaAttachmentsApi.md#figma_attachment_show) | **GET** /projects/{project_id}/figma_attachments/{id} | Get a single Figma attachment
|
183
|
+
*Phrase::FigmaAttachmentsApi* | [**figma_attachment_update**](docs/FigmaAttachmentsApi.md#figma_attachment_update) | **PATCH** /projects/{project_id}/figma_attachments/{id} | Update a Figma attachment
|
184
|
+
*Phrase::FigmaAttachmentsApi* | [**figma_attachments_list**](docs/FigmaAttachmentsApi.md#figma_attachments_list) | **GET** /projects/{project_id}/figma_attachments | List Figma attachments
|
180
185
|
*Phrase::FormatsApi* | [**formats_list**](docs/FormatsApi.md#formats_list) | **GET** /formats | List formats
|
181
186
|
*Phrase::GitHubSyncApi* | [**github_sync_export**](docs/GitHubSyncApi.md#github_sync_export) | **POST** /github_syncs/export | Export from Phrase Strings to GitHub
|
182
187
|
*Phrase::GitHubSyncApi* | [**github_sync_import**](docs/GitHubSyncApi.md#github_sync_import) | **POST** /github_syncs/import | Import to Phrase Strings from GitHub
|
@@ -255,6 +260,8 @@ Class | Method | HTTP request | Description
|
|
255
260
|
*Phrase::KeysApi* | [**keys_search**](docs/KeysApi.md#keys_search) | **POST** /projects/{project_id}/keys/search | Search keys
|
256
261
|
*Phrase::KeysApi* | [**keys_tag**](docs/KeysApi.md#keys_tag) | **PATCH** /projects/{project_id}/keys/tag | Add tags to collection of keys
|
257
262
|
*Phrase::KeysApi* | [**keys_untag**](docs/KeysApi.md#keys_untag) | **PATCH** /projects/{project_id}/keys/untag | Remove tags from collection of keys
|
263
|
+
*Phrase::KeysFigmaAttachmentsApi* | [**figma_attachment_attach_to_key**](docs/KeysFigmaAttachmentsApi.md#figma_attachment_attach_to_key) | **POST** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys | Attach the Figma attachment to a key
|
264
|
+
*Phrase::KeysFigmaAttachmentsApi* | [**figma_attachment_detach_from_key**](docs/KeysFigmaAttachmentsApi.md#figma_attachment_detach_from_key) | **DELETE** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} | Detach the Figma attachment from a key
|
258
265
|
*Phrase::LocalesApi* | [**account_locales**](docs/LocalesApi.md#account_locales) | **GET** /accounts/{id}/locales | List locales used in account
|
259
266
|
*Phrase::LocalesApi* | [**locale_create**](docs/LocalesApi.md#locale_create) | **POST** /projects/{project_id}/locales | Create a locale
|
260
267
|
*Phrase::LocalesApi* | [**locale_delete**](docs/LocalesApi.md#locale_delete) | **DELETE** /projects/{project_id}/locales/{id} | Delete a locale
|
@@ -414,6 +421,9 @@ Class | Method | HTTP request | Description
|
|
414
421
|
- [Phrase::DistributionPreview](docs/DistributionPreview.md)
|
415
422
|
- [Phrase::DistributionUpdateParameters](docs/DistributionUpdateParameters.md)
|
416
423
|
- [Phrase::Document](docs/Document.md)
|
424
|
+
- [Phrase::FigmaAttachment](docs/FigmaAttachment.md)
|
425
|
+
- [Phrase::FigmaAttachmentCreateParameters](docs/FigmaAttachmentCreateParameters.md)
|
426
|
+
- [Phrase::FigmaAttachmentUpdateParameters](docs/FigmaAttachmentUpdateParameters.md)
|
417
427
|
- [Phrase::Format](docs/Format.md)
|
418
428
|
- [Phrase::GithubSyncExportParameters](docs/GithubSyncExportParameters.md)
|
419
429
|
- [Phrase::GithubSyncImportParameters](docs/GithubSyncImportParameters.md)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Phrase::FigmaAttachment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional]
|
8
|
+
**url** | **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::FigmaAttachment.new(id: null,
|
18
|
+
url: null,
|
19
|
+
created_at: null,
|
20
|
+
updated_at: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Phrase::FigmaAttachmentCreateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**branch** | **String** | specify the branch to use | [optional]
|
8
|
+
**url** | **String** | Figma file url | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'Phrase'
|
14
|
+
|
15
|
+
instance = Phrase::FigmaAttachmentCreateParameters.new(branch: my-feature-branch,
|
16
|
+
url: https://figma.com/file/xxxxx/sample)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Phrase::FigmaAttachmentUpdateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**branch** | **String** | specify the branch to use | [optional]
|
8
|
+
**url** | **String** | Figma file url | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'Phrase'
|
14
|
+
|
15
|
+
instance = Phrase::FigmaAttachmentUpdateParameters.new(branch: my-feature-branch,
|
16
|
+
url: https://figma.com/file/xxxxx/sample)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,341 @@
|
|
1
|
+
# Phrase::FigmaAttachmentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**figma_attachment_create**](FigmaAttachmentsApi.md#figma_attachment_create) | **POST** /projects/{project_id}/figma_attachments | Create a Figma attachment
|
8
|
+
[**figma_attachment_delete**](FigmaAttachmentsApi.md#figma_attachment_delete) | **DELETE** /projects/{project_id}/figma_attachments/{id} | Delete a Figma attachment
|
9
|
+
[**figma_attachment_show**](FigmaAttachmentsApi.md#figma_attachment_show) | **GET** /projects/{project_id}/figma_attachments/{id} | Get a single Figma attachment
|
10
|
+
[**figma_attachment_update**](FigmaAttachmentsApi.md#figma_attachment_update) | **PATCH** /projects/{project_id}/figma_attachments/{id} | Update a Figma attachment
|
11
|
+
[**figma_attachments_list**](FigmaAttachmentsApi.md#figma_attachments_list) | **GET** /projects/{project_id}/figma_attachments | List Figma attachments
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
## figma_attachment_create
|
16
|
+
|
17
|
+
> FigmaAttachment figma_attachment_create(project_id, figma_attachment_create_parameters, opts)
|
18
|
+
|
19
|
+
Create a Figma attachment
|
20
|
+
|
21
|
+
Create a new Figma attachment.
|
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::FigmaAttachmentsApi.new
|
40
|
+
project_id = 'project_id_example' # String | Project ID
|
41
|
+
figma_attachment_create_parameters = Phrase::FigmaAttachmentCreateParameters.new # FigmaAttachmentCreateParameters |
|
42
|
+
opts = {
|
43
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
44
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
45
|
+
}
|
46
|
+
|
47
|
+
begin
|
48
|
+
#Create a Figma attachment
|
49
|
+
result = api_instance.figma_attachment_create(project_id, figma_attachment_create_parameters, opts)
|
50
|
+
pp result
|
51
|
+
rescue Phrase::ApiError => e
|
52
|
+
puts "Exception when calling FigmaAttachmentsApi->figma_attachment_create: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
|
59
|
+
Name | Type | Description | Notes
|
60
|
+
------------- | ------------- | ------------- | -------------
|
61
|
+
**project_id** | **String**| Project ID |
|
62
|
+
**figma_attachment_create_parameters** | [**FigmaAttachmentCreateParameters**](FigmaAttachmentCreateParameters.md)| |
|
63
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
64
|
+
**branch** | **String**| specify the branch to use | [optional]
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
Response<([**FigmaAttachment**](FigmaAttachment.md))>
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: application/json
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## figma_attachment_delete
|
81
|
+
|
82
|
+
> figma_attachment_delete(project_id, id, opts)
|
83
|
+
|
84
|
+
Delete a Figma attachment
|
85
|
+
|
86
|
+
Delete an existing Figma attachment.
|
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::FigmaAttachmentsApi.new
|
105
|
+
project_id = 'project_id_example' # String | Project ID
|
106
|
+
id = 'id_example' # String | ID
|
107
|
+
opts = {
|
108
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
109
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
110
|
+
}
|
111
|
+
|
112
|
+
begin
|
113
|
+
#Delete a Figma attachment
|
114
|
+
api_instance.figma_attachment_delete(project_id, id, opts)
|
115
|
+
rescue Phrase::ApiError => e
|
116
|
+
puts "Exception when calling FigmaAttachmentsApi->figma_attachment_delete: #{e}"
|
117
|
+
end
|
118
|
+
```
|
119
|
+
|
120
|
+
### Parameters
|
121
|
+
|
122
|
+
|
123
|
+
Name | Type | Description | Notes
|
124
|
+
------------- | ------------- | ------------- | -------------
|
125
|
+
**project_id** | **String**| Project ID |
|
126
|
+
**id** | **String**| ID |
|
127
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
128
|
+
**branch** | **String**| specify the branch to use | [optional]
|
129
|
+
|
130
|
+
### Return type
|
131
|
+
|
132
|
+
Response<(nil (empty response body))>
|
133
|
+
|
134
|
+
### Authorization
|
135
|
+
|
136
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
137
|
+
|
138
|
+
### HTTP request headers
|
139
|
+
|
140
|
+
- **Content-Type**: Not defined
|
141
|
+
- **Accept**: Not defined
|
142
|
+
|
143
|
+
|
144
|
+
## figma_attachment_show
|
145
|
+
|
146
|
+
> FigmaAttachment figma_attachment_show(project_id, id, opts)
|
147
|
+
|
148
|
+
Get a single Figma attachment
|
149
|
+
|
150
|
+
Get details on a single Figma attachment for a given project.
|
151
|
+
|
152
|
+
### Example
|
153
|
+
|
154
|
+
```ruby
|
155
|
+
# load the gem
|
156
|
+
require 'phrase'
|
157
|
+
# setup authorization
|
158
|
+
Phrase.configure do |config|
|
159
|
+
# Configure HTTP basic authorization: Basic
|
160
|
+
config.username = 'YOUR USERNAME'
|
161
|
+
config.password = 'YOUR PASSWORD'
|
162
|
+
|
163
|
+
# Configure API key authorization: Token
|
164
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
165
|
+
config.api_key_prefix['Authorization'] = 'token'
|
166
|
+
end
|
167
|
+
|
168
|
+
api_instance = Phrase::FigmaAttachmentsApi.new
|
169
|
+
project_id = 'project_id_example' # String | Project ID
|
170
|
+
id = 'id_example' # String | ID
|
171
|
+
opts = {
|
172
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
173
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
174
|
+
}
|
175
|
+
|
176
|
+
begin
|
177
|
+
#Get a single Figma attachment
|
178
|
+
result = api_instance.figma_attachment_show(project_id, id, opts)
|
179
|
+
pp result
|
180
|
+
rescue Phrase::ApiError => e
|
181
|
+
puts "Exception when calling FigmaAttachmentsApi->figma_attachment_show: #{e}"
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
### Parameters
|
186
|
+
|
187
|
+
|
188
|
+
Name | Type | Description | Notes
|
189
|
+
------------- | ------------- | ------------- | -------------
|
190
|
+
**project_id** | **String**| Project ID |
|
191
|
+
**id** | **String**| ID |
|
192
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
193
|
+
**branch** | **String**| specify the branch to use | [optional]
|
194
|
+
|
195
|
+
### Return type
|
196
|
+
|
197
|
+
Response<([**FigmaAttachment**](FigmaAttachment.md))>
|
198
|
+
|
199
|
+
### Authorization
|
200
|
+
|
201
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
202
|
+
|
203
|
+
### HTTP request headers
|
204
|
+
|
205
|
+
- **Content-Type**: Not defined
|
206
|
+
- **Accept**: application/json
|
207
|
+
|
208
|
+
|
209
|
+
## figma_attachment_update
|
210
|
+
|
211
|
+
> FigmaAttachment figma_attachment_update(project_id, id, figma_attachment_update_parameters, opts)
|
212
|
+
|
213
|
+
Update a Figma attachment
|
214
|
+
|
215
|
+
Update an existing Figma attachment.
|
216
|
+
|
217
|
+
### Example
|
218
|
+
|
219
|
+
```ruby
|
220
|
+
# load the gem
|
221
|
+
require 'phrase'
|
222
|
+
# setup authorization
|
223
|
+
Phrase.configure do |config|
|
224
|
+
# Configure HTTP basic authorization: Basic
|
225
|
+
config.username = 'YOUR USERNAME'
|
226
|
+
config.password = 'YOUR PASSWORD'
|
227
|
+
|
228
|
+
# Configure API key authorization: Token
|
229
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
230
|
+
config.api_key_prefix['Authorization'] = 'token'
|
231
|
+
end
|
232
|
+
|
233
|
+
api_instance = Phrase::FigmaAttachmentsApi.new
|
234
|
+
project_id = 'project_id_example' # String | Project ID
|
235
|
+
id = 'id_example' # String | ID
|
236
|
+
figma_attachment_update_parameters = Phrase::FigmaAttachmentUpdateParameters.new # FigmaAttachmentUpdateParameters |
|
237
|
+
opts = {
|
238
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
239
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
240
|
+
}
|
241
|
+
|
242
|
+
begin
|
243
|
+
#Update a Figma attachment
|
244
|
+
result = api_instance.figma_attachment_update(project_id, id, figma_attachment_update_parameters, opts)
|
245
|
+
pp result
|
246
|
+
rescue Phrase::ApiError => e
|
247
|
+
puts "Exception when calling FigmaAttachmentsApi->figma_attachment_update: #{e}"
|
248
|
+
end
|
249
|
+
```
|
250
|
+
|
251
|
+
### Parameters
|
252
|
+
|
253
|
+
|
254
|
+
Name | Type | Description | Notes
|
255
|
+
------------- | ------------- | ------------- | -------------
|
256
|
+
**project_id** | **String**| Project ID |
|
257
|
+
**id** | **String**| ID |
|
258
|
+
**figma_attachment_update_parameters** | [**FigmaAttachmentUpdateParameters**](FigmaAttachmentUpdateParameters.md)| |
|
259
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
260
|
+
**branch** | **String**| specify the branch to use | [optional]
|
261
|
+
|
262
|
+
### Return type
|
263
|
+
|
264
|
+
Response<([**FigmaAttachment**](FigmaAttachment.md))>
|
265
|
+
|
266
|
+
### Authorization
|
267
|
+
|
268
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
269
|
+
|
270
|
+
### HTTP request headers
|
271
|
+
|
272
|
+
- **Content-Type**: application/json
|
273
|
+
- **Accept**: application/json
|
274
|
+
|
275
|
+
|
276
|
+
## figma_attachments_list
|
277
|
+
|
278
|
+
> Array<FigmaAttachment> figma_attachments_list(project_id, opts)
|
279
|
+
|
280
|
+
List Figma attachments
|
281
|
+
|
282
|
+
List all Figma attachments for the given project
|
283
|
+
|
284
|
+
### Example
|
285
|
+
|
286
|
+
```ruby
|
287
|
+
# load the gem
|
288
|
+
require 'phrase'
|
289
|
+
# setup authorization
|
290
|
+
Phrase.configure do |config|
|
291
|
+
# Configure HTTP basic authorization: Basic
|
292
|
+
config.username = 'YOUR USERNAME'
|
293
|
+
config.password = 'YOUR PASSWORD'
|
294
|
+
|
295
|
+
# Configure API key authorization: Token
|
296
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
297
|
+
config.api_key_prefix['Authorization'] = 'token'
|
298
|
+
end
|
299
|
+
|
300
|
+
api_instance = Phrase::FigmaAttachmentsApi.new
|
301
|
+
project_id = 'project_id_example' # String | Project ID
|
302
|
+
opts = {
|
303
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
304
|
+
page: 1, # Integer | Page number
|
305
|
+
per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
306
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
307
|
+
}
|
308
|
+
|
309
|
+
begin
|
310
|
+
#List Figma attachments
|
311
|
+
result = api_instance.figma_attachments_list(project_id, opts)
|
312
|
+
pp result
|
313
|
+
rescue Phrase::ApiError => e
|
314
|
+
puts "Exception when calling FigmaAttachmentsApi->figma_attachments_list: #{e}"
|
315
|
+
end
|
316
|
+
```
|
317
|
+
|
318
|
+
### Parameters
|
319
|
+
|
320
|
+
|
321
|
+
Name | Type | Description | Notes
|
322
|
+
------------- | ------------- | ------------- | -------------
|
323
|
+
**project_id** | **String**| Project ID |
|
324
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
325
|
+
**page** | **Integer**| Page number | [optional]
|
326
|
+
**per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
|
327
|
+
**branch** | **String**| specify the branch to use | [optional]
|
328
|
+
|
329
|
+
### Return type
|
330
|
+
|
331
|
+
Response<([**Array<FigmaAttachment>**](FigmaAttachment.md))>
|
332
|
+
|
333
|
+
### Authorization
|
334
|
+
|
335
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
336
|
+
|
337
|
+
### HTTP request headers
|
338
|
+
|
339
|
+
- **Content-Type**: Not defined
|
340
|
+
- **Accept**: application/json
|
341
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# Phrase::KeysFigmaAttachmentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**figma_attachment_attach_to_key**](KeysFigmaAttachmentsApi.md#figma_attachment_attach_to_key) | **POST** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys | Attach the Figma attachment to a key
|
8
|
+
[**figma_attachment_detach_from_key**](KeysFigmaAttachmentsApi.md#figma_attachment_detach_from_key) | **DELETE** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} | Detach the Figma attachment from a key
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
## figma_attachment_attach_to_key
|
13
|
+
|
14
|
+
> figma_attachment_attach_to_key(project_id, figma_attachment_id, id, opts)
|
15
|
+
|
16
|
+
Attach the Figma attachment to a key
|
17
|
+
|
18
|
+
Attach the Figma attachment to a key
|
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::KeysFigmaAttachmentsApi.new
|
37
|
+
project_id = 'project_id_example' # String | Project ID
|
38
|
+
figma_attachment_id = 'figma_attachment_id_example' # String | Figma attachment ID
|
39
|
+
id = 'id_example' # String | ID
|
40
|
+
opts = {
|
41
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
42
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
43
|
+
}
|
44
|
+
|
45
|
+
begin
|
46
|
+
#Attach the Figma attachment to a key
|
47
|
+
api_instance.figma_attachment_attach_to_key(project_id, figma_attachment_id, id, opts)
|
48
|
+
rescue Phrase::ApiError => e
|
49
|
+
puts "Exception when calling KeysFigmaAttachmentsApi->figma_attachment_attach_to_key: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
### Parameters
|
54
|
+
|
55
|
+
|
56
|
+
Name | Type | Description | Notes
|
57
|
+
------------- | ------------- | ------------- | -------------
|
58
|
+
**project_id** | **String**| Project ID |
|
59
|
+
**figma_attachment_id** | **String**| Figma attachment ID |
|
60
|
+
**id** | **String**| ID |
|
61
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
62
|
+
**branch** | **String**| specify the branch to use | [optional]
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
Response<(nil (empty response body))>
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: Not defined
|
75
|
+
- **Accept**: Not defined
|
76
|
+
|
77
|
+
|
78
|
+
## figma_attachment_detach_from_key
|
79
|
+
|
80
|
+
> figma_attachment_detach_from_key(project_id, figma_attachment_id, id, opts)
|
81
|
+
|
82
|
+
Detach the Figma attachment from a key
|
83
|
+
|
84
|
+
Detach the Figma attachment from a key
|
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::KeysFigmaAttachmentsApi.new
|
103
|
+
project_id = 'project_id_example' # String | Project ID
|
104
|
+
figma_attachment_id = 'figma_attachment_id_example' # String | Figma attachment ID
|
105
|
+
id = 'id_example' # String | ID
|
106
|
+
opts = {
|
107
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
108
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
109
|
+
}
|
110
|
+
|
111
|
+
begin
|
112
|
+
#Detach the Figma attachment from a key
|
113
|
+
api_instance.figma_attachment_detach_from_key(project_id, figma_attachment_id, id, opts)
|
114
|
+
rescue Phrase::ApiError => e
|
115
|
+
puts "Exception when calling KeysFigmaAttachmentsApi->figma_attachment_detach_from_key: #{e}"
|
116
|
+
end
|
117
|
+
```
|
118
|
+
|
119
|
+
### Parameters
|
120
|
+
|
121
|
+
|
122
|
+
Name | Type | Description | Notes
|
123
|
+
------------- | ------------- | ------------- | -------------
|
124
|
+
**project_id** | **String**| Project ID |
|
125
|
+
**figma_attachment_id** | **String**| Figma attachment ID |
|
126
|
+
**id** | **String**| ID |
|
127
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
128
|
+
**branch** | **String**| specify the branch to use | [optional]
|
129
|
+
|
130
|
+
### Return type
|
131
|
+
|
132
|
+
Response<(nil (empty response body))>
|
133
|
+
|
134
|
+
### Authorization
|
135
|
+
|
136
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
137
|
+
|
138
|
+
### HTTP request headers
|
139
|
+
|
140
|
+
- **Content-Type**: Not defined
|
141
|
+
- **Accept**: Not defined
|
142
|
+
|