phrase 2.13.0 → 2.14.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 +9 -3
- data/docs/Comment.md +5 -1
- data/docs/CommentReactionsApi.md +3 -1
- data/docs/CommentRepliesApi.md +427 -0
- data/docs/CommentsApi.md +5 -1
- data/lib/phrase/api/comment_reactions_api.rb +3 -0
- data/lib/phrase/api/comment_replies_api.rb +523 -0
- data/lib/phrase/api/comments_api.rb +6 -0
- data/lib/phrase/models/comment.rb +24 -4
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +1 -0
- data/spec/api/comment_reactions_api_spec.rb +1 -0
- data/spec/api/comment_replies_api_spec.rb +126 -0
- data/spec/api/comments_api_spec.rb +2 -0
- data/spec/models/comment_spec.rb +12 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a84d4b1908bfbb105768607982ae6df42c5d29769a83703e9cf4776022cb14dd
|
4
|
+
data.tar.gz: eaef85f36598f65cd86d4cbdadba04d736023835dee31ce9d014c33420c94d7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44cad7e58e9a1da63e70197af4b725ba8c287edf61eb3a7d7925caea72f5788c4f0eff38098411ca28279705700cef0ee17ecb600fc0ee4cdbe8b29c1f7b372b
|
7
|
+
data.tar.gz: 800dbacc70321c8e8f3d5c93e48aa7df6f402cb110a0880575b0f77b323f17832a00778cd43c929c52b02ffcf35a89fb6c5d86a5e25ca8c90b35cdad7bef255e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.14.0](https://github.com/phrase/openapi/compare/ruby-v2.13.0...ruby-v2.14.0) (2023-08-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** Introduce comment replies endpoints ([#383](https://github.com/phrase/openapi/issues/383)) ([71351ac](https://github.com/phrase/openapi/commit/71351ac285f4f49976092e176c77b09f3485eb65))
|
9
|
+
|
3
10
|
## [2.13.0](https://github.com/phrase/openapi/compare/ruby-v2.12.0...ruby-v2.13.0) (2023-08-22)
|
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.14.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.14.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.14.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -156,6 +156,12 @@ Class | Method | HTTP request | Description
|
|
156
156
|
*Phrase::CommentReactionsApi* | [**reaction_delete**](docs/CommentReactionsApi.md#reaction_delete) | **DELETE** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/reactions/{id} | Delete a reaction
|
157
157
|
*Phrase::CommentReactionsApi* | [**reaction_show**](docs/CommentReactionsApi.md#reaction_show) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/reactions/{id} | Get a single reaction
|
158
158
|
*Phrase::CommentReactionsApi* | [**reactions_list**](docs/CommentReactionsApi.md#reactions_list) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/reactions | List reactions
|
159
|
+
*Phrase::CommentRepliesApi* | [**replies_list**](docs/CommentRepliesApi.md#replies_list) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies | List replies
|
160
|
+
*Phrase::CommentRepliesApi* | [**reply_create**](docs/CommentRepliesApi.md#reply_create) | **POST** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies | Create a reply
|
161
|
+
*Phrase::CommentRepliesApi* | [**reply_delete**](docs/CommentRepliesApi.md#reply_delete) | **DELETE** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id} | Delete a reply
|
162
|
+
*Phrase::CommentRepliesApi* | [**reply_mark_as_read**](docs/CommentRepliesApi.md#reply_mark_as_read) | **PATCH** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_read | Mark a reply as read
|
163
|
+
*Phrase::CommentRepliesApi* | [**reply_mark_as_unread**](docs/CommentRepliesApi.md#reply_mark_as_unread) | **PATCH** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_unread | Mark a reply as unread
|
164
|
+
*Phrase::CommentRepliesApi* | [**reply_show**](docs/CommentRepliesApi.md#reply_show) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id} | Get a single reply
|
159
165
|
*Phrase::CommentsApi* | [**comment_create**](docs/CommentsApi.md#comment_create) | **POST** /projects/{project_id}/keys/{key_id}/comments | Create a comment
|
160
166
|
*Phrase::CommentsApi* | [**comment_delete**](docs/CommentsApi.md#comment_delete) | **DELETE** /projects/{project_id}/keys/{key_id}/comments/{id} | Delete a comment
|
161
167
|
*Phrase::CommentsApi* | [**comment_mark_check**](docs/CommentsApi.md#comment_mark_check) | **GET** /projects/{project_id}/keys/{key_id}/comments/{id}/read | Check if comment is read
|
data/docs/Comment.md
CHANGED
@@ -6,10 +6,12 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**id** | **String** | | [optional]
|
8
8
|
**message** | **String** | | [optional]
|
9
|
+
**has_replies** | **Boolean** | | [optional]
|
9
10
|
**user** | [**UserPreview**](UserPreview.md) | | [optional]
|
10
11
|
**created_at** | **DateTime** | | [optional]
|
11
12
|
**updated_at** | **DateTime** | | [optional]
|
12
13
|
**mentioned_users** | [**Array<UserPreview>**](UserPreview.md) | | [optional]
|
14
|
+
**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
|
13
15
|
|
14
16
|
## Code Sample
|
15
17
|
|
@@ -18,10 +20,12 @@ require 'Phrase'
|
|
18
20
|
|
19
21
|
instance = Phrase::Comment.new(id: null,
|
20
22
|
message: null,
|
23
|
+
has_replies: null,
|
21
24
|
user: null,
|
22
25
|
created_at: null,
|
23
26
|
updated_at: null,
|
24
|
-
mentioned_users: null
|
27
|
+
mentioned_users: null,
|
28
|
+
locales: null)
|
25
29
|
```
|
26
30
|
|
27
31
|
|
data/docs/CommentReactionsApi.md
CHANGED
@@ -41,7 +41,8 @@ key_id = 'key_id_example' # String | Translation Key ID
|
|
41
41
|
comment_id = 'comment_id_example' # String | Comment ID
|
42
42
|
opts = {
|
43
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
|
44
|
+
branch: 'my-feature-branch', # String | specify the branch to use
|
45
|
+
emoji: '👍' # String | specify the emoji for the reaction
|
45
46
|
}
|
46
47
|
|
47
48
|
begin
|
@@ -63,6 +64,7 @@ Name | Type | Description | Notes
|
|
63
64
|
**comment_id** | **String**| Comment ID |
|
64
65
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
65
66
|
**branch** | **String**| specify the branch to use | [optional]
|
67
|
+
**emoji** | **String**| specify the emoji for the reaction | [optional]
|
66
68
|
|
67
69
|
### Return type
|
68
70
|
|
@@ -0,0 +1,427 @@
|
|
1
|
+
# Phrase::CommentRepliesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**replies_list**](CommentRepliesApi.md#replies_list) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies | List replies
|
8
|
+
[**reply_create**](CommentRepliesApi.md#reply_create) | **POST** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies | Create a reply
|
9
|
+
[**reply_delete**](CommentRepliesApi.md#reply_delete) | **DELETE** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id} | Delete a reply
|
10
|
+
[**reply_mark_as_read**](CommentRepliesApi.md#reply_mark_as_read) | **PATCH** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_read | Mark a reply as read
|
11
|
+
[**reply_mark_as_unread**](CommentRepliesApi.md#reply_mark_as_unread) | **PATCH** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_unread | Mark a reply as unread
|
12
|
+
[**reply_show**](CommentRepliesApi.md#reply_show) | **GET** /projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id} | Get a single reply
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## replies_list
|
17
|
+
|
18
|
+
> Array<Comment> replies_list(project_id, key_id, comment_id, opts)
|
19
|
+
|
20
|
+
List replies
|
21
|
+
|
22
|
+
List all replies for a comment.
|
23
|
+
|
24
|
+
### Example
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
# load the gem
|
28
|
+
require 'phrase'
|
29
|
+
# setup authorization
|
30
|
+
Phrase.configure do |config|
|
31
|
+
# Configure HTTP basic authorization: Basic
|
32
|
+
config.username = 'YOUR USERNAME'
|
33
|
+
config.password = 'YOUR PASSWORD'
|
34
|
+
|
35
|
+
# Configure API key authorization: Token
|
36
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
37
|
+
config.api_key_prefix['Authorization'] = 'token'
|
38
|
+
end
|
39
|
+
|
40
|
+
api_instance = Phrase::CommentRepliesApi.new
|
41
|
+
project_id = 'project_id_example' # String | Project ID
|
42
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
43
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
44
|
+
opts = {
|
45
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
46
|
+
page: 1, # Integer | Page number
|
47
|
+
per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
48
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
49
|
+
}
|
50
|
+
|
51
|
+
begin
|
52
|
+
#List replies
|
53
|
+
result = api_instance.replies_list(project_id, key_id, comment_id, opts)
|
54
|
+
pp result
|
55
|
+
rescue Phrase::ApiError => e
|
56
|
+
puts "Exception when calling CommentRepliesApi->replies_list: #{e}"
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
### Parameters
|
61
|
+
|
62
|
+
|
63
|
+
Name | Type | Description | Notes
|
64
|
+
------------- | ------------- | ------------- | -------------
|
65
|
+
**project_id** | **String**| Project ID |
|
66
|
+
**key_id** | **String**| Translation Key ID |
|
67
|
+
**comment_id** | **String**| Comment ID |
|
68
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
69
|
+
**page** | **Integer**| Page number | [optional]
|
70
|
+
**per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
|
71
|
+
**branch** | **String**| specify the branch to use | [optional]
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
Response<([**Array<Comment>**](Comment.md))>
|
76
|
+
|
77
|
+
### Authorization
|
78
|
+
|
79
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
80
|
+
|
81
|
+
### HTTP request headers
|
82
|
+
|
83
|
+
- **Content-Type**: Not defined
|
84
|
+
- **Accept**: application/json
|
85
|
+
|
86
|
+
|
87
|
+
## reply_create
|
88
|
+
|
89
|
+
> Comment reply_create(project_id, key_id, comment_id, opts)
|
90
|
+
|
91
|
+
Create a reply
|
92
|
+
|
93
|
+
Create a new reply for a comment.
|
94
|
+
|
95
|
+
### Example
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
# load the gem
|
99
|
+
require 'phrase'
|
100
|
+
# setup authorization
|
101
|
+
Phrase.configure do |config|
|
102
|
+
# Configure HTTP basic authorization: Basic
|
103
|
+
config.username = 'YOUR USERNAME'
|
104
|
+
config.password = 'YOUR PASSWORD'
|
105
|
+
|
106
|
+
# Configure API key authorization: Token
|
107
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
108
|
+
config.api_key_prefix['Authorization'] = 'token'
|
109
|
+
end
|
110
|
+
|
111
|
+
api_instance = Phrase::CommentRepliesApi.new
|
112
|
+
project_id = 'project_id_example' # String | Project ID
|
113
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
114
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
115
|
+
opts = {
|
116
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
117
|
+
branch: 'my-feature-branch', # String | specify the branch to use
|
118
|
+
message: 'some message...' # String | specify the message for the comment
|
119
|
+
}
|
120
|
+
|
121
|
+
begin
|
122
|
+
#Create a reply
|
123
|
+
result = api_instance.reply_create(project_id, key_id, comment_id, opts)
|
124
|
+
pp result
|
125
|
+
rescue Phrase::ApiError => e
|
126
|
+
puts "Exception when calling CommentRepliesApi->reply_create: #{e}"
|
127
|
+
end
|
128
|
+
```
|
129
|
+
|
130
|
+
### Parameters
|
131
|
+
|
132
|
+
|
133
|
+
Name | Type | Description | Notes
|
134
|
+
------------- | ------------- | ------------- | -------------
|
135
|
+
**project_id** | **String**| Project ID |
|
136
|
+
**key_id** | **String**| Translation Key ID |
|
137
|
+
**comment_id** | **String**| Comment ID |
|
138
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
139
|
+
**branch** | **String**| specify the branch to use | [optional]
|
140
|
+
**message** | **String**| specify the message for the comment | [optional]
|
141
|
+
|
142
|
+
### Return type
|
143
|
+
|
144
|
+
Response<([**Comment**](Comment.md))>
|
145
|
+
|
146
|
+
### Authorization
|
147
|
+
|
148
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
149
|
+
|
150
|
+
### HTTP request headers
|
151
|
+
|
152
|
+
- **Content-Type**: Not defined
|
153
|
+
- **Accept**: application/json
|
154
|
+
|
155
|
+
|
156
|
+
## reply_delete
|
157
|
+
|
158
|
+
> reply_delete(project_id, key_id, comment_id, id, opts)
|
159
|
+
|
160
|
+
Delete a reply
|
161
|
+
|
162
|
+
Delete an existing reply.
|
163
|
+
|
164
|
+
### Example
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
# load the gem
|
168
|
+
require 'phrase'
|
169
|
+
# setup authorization
|
170
|
+
Phrase.configure do |config|
|
171
|
+
# Configure HTTP basic authorization: Basic
|
172
|
+
config.username = 'YOUR USERNAME'
|
173
|
+
config.password = 'YOUR PASSWORD'
|
174
|
+
|
175
|
+
# Configure API key authorization: Token
|
176
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
177
|
+
config.api_key_prefix['Authorization'] = 'token'
|
178
|
+
end
|
179
|
+
|
180
|
+
api_instance = Phrase::CommentRepliesApi.new
|
181
|
+
project_id = 'project_id_example' # String | Project ID
|
182
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
183
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
184
|
+
id = 'id_example' # String | ID
|
185
|
+
opts = {
|
186
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
187
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
188
|
+
}
|
189
|
+
|
190
|
+
begin
|
191
|
+
#Delete a reply
|
192
|
+
api_instance.reply_delete(project_id, key_id, comment_id, id, opts)
|
193
|
+
rescue Phrase::ApiError => e
|
194
|
+
puts "Exception when calling CommentRepliesApi->reply_delete: #{e}"
|
195
|
+
end
|
196
|
+
```
|
197
|
+
|
198
|
+
### Parameters
|
199
|
+
|
200
|
+
|
201
|
+
Name | Type | Description | Notes
|
202
|
+
------------- | ------------- | ------------- | -------------
|
203
|
+
**project_id** | **String**| Project ID |
|
204
|
+
**key_id** | **String**| Translation Key ID |
|
205
|
+
**comment_id** | **String**| Comment ID |
|
206
|
+
**id** | **String**| ID |
|
207
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
208
|
+
**branch** | **String**| specify the branch to use | [optional]
|
209
|
+
|
210
|
+
### Return type
|
211
|
+
|
212
|
+
Response<(nil (empty response body))>
|
213
|
+
|
214
|
+
### Authorization
|
215
|
+
|
216
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
217
|
+
|
218
|
+
### HTTP request headers
|
219
|
+
|
220
|
+
- **Content-Type**: Not defined
|
221
|
+
- **Accept**: Not defined
|
222
|
+
|
223
|
+
|
224
|
+
## reply_mark_as_read
|
225
|
+
|
226
|
+
> reply_mark_as_read(project_id, key_id, comment_id, id, opts)
|
227
|
+
|
228
|
+
Mark a reply as read
|
229
|
+
|
230
|
+
Mark a reply as read.
|
231
|
+
|
232
|
+
### Example
|
233
|
+
|
234
|
+
```ruby
|
235
|
+
# load the gem
|
236
|
+
require 'phrase'
|
237
|
+
# setup authorization
|
238
|
+
Phrase.configure do |config|
|
239
|
+
# Configure HTTP basic authorization: Basic
|
240
|
+
config.username = 'YOUR USERNAME'
|
241
|
+
config.password = 'YOUR PASSWORD'
|
242
|
+
|
243
|
+
# Configure API key authorization: Token
|
244
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
245
|
+
config.api_key_prefix['Authorization'] = 'token'
|
246
|
+
end
|
247
|
+
|
248
|
+
api_instance = Phrase::CommentRepliesApi.new
|
249
|
+
project_id = 'project_id_example' # String | Project ID
|
250
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
251
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
252
|
+
id = 'id_example' # String | ID
|
253
|
+
opts = {
|
254
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
255
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
256
|
+
}
|
257
|
+
|
258
|
+
begin
|
259
|
+
#Mark a reply as read
|
260
|
+
api_instance.reply_mark_as_read(project_id, key_id, comment_id, id, opts)
|
261
|
+
rescue Phrase::ApiError => e
|
262
|
+
puts "Exception when calling CommentRepliesApi->reply_mark_as_read: #{e}"
|
263
|
+
end
|
264
|
+
```
|
265
|
+
|
266
|
+
### Parameters
|
267
|
+
|
268
|
+
|
269
|
+
Name | Type | Description | Notes
|
270
|
+
------------- | ------------- | ------------- | -------------
|
271
|
+
**project_id** | **String**| Project ID |
|
272
|
+
**key_id** | **String**| Translation Key ID |
|
273
|
+
**comment_id** | **String**| Comment ID |
|
274
|
+
**id** | **String**| ID |
|
275
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
276
|
+
**branch** | **String**| specify the branch to use | [optional]
|
277
|
+
|
278
|
+
### Return type
|
279
|
+
|
280
|
+
Response<(nil (empty response body))>
|
281
|
+
|
282
|
+
### Authorization
|
283
|
+
|
284
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
285
|
+
|
286
|
+
### HTTP request headers
|
287
|
+
|
288
|
+
- **Content-Type**: Not defined
|
289
|
+
- **Accept**: Not defined
|
290
|
+
|
291
|
+
|
292
|
+
## reply_mark_as_unread
|
293
|
+
|
294
|
+
> reply_mark_as_unread(project_id, key_id, comment_id, id, opts)
|
295
|
+
|
296
|
+
Mark a reply as unread
|
297
|
+
|
298
|
+
Mark a reply as unread.
|
299
|
+
|
300
|
+
### Example
|
301
|
+
|
302
|
+
```ruby
|
303
|
+
# load the gem
|
304
|
+
require 'phrase'
|
305
|
+
# setup authorization
|
306
|
+
Phrase.configure do |config|
|
307
|
+
# Configure HTTP basic authorization: Basic
|
308
|
+
config.username = 'YOUR USERNAME'
|
309
|
+
config.password = 'YOUR PASSWORD'
|
310
|
+
|
311
|
+
# Configure API key authorization: Token
|
312
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
313
|
+
config.api_key_prefix['Authorization'] = 'token'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = Phrase::CommentRepliesApi.new
|
317
|
+
project_id = 'project_id_example' # String | Project ID
|
318
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
319
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
320
|
+
id = 'id_example' # String | ID
|
321
|
+
opts = {
|
322
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
323
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
324
|
+
}
|
325
|
+
|
326
|
+
begin
|
327
|
+
#Mark a reply as unread
|
328
|
+
api_instance.reply_mark_as_unread(project_id, key_id, comment_id, id, opts)
|
329
|
+
rescue Phrase::ApiError => e
|
330
|
+
puts "Exception when calling CommentRepliesApi->reply_mark_as_unread: #{e}"
|
331
|
+
end
|
332
|
+
```
|
333
|
+
|
334
|
+
### Parameters
|
335
|
+
|
336
|
+
|
337
|
+
Name | Type | Description | Notes
|
338
|
+
------------- | ------------- | ------------- | -------------
|
339
|
+
**project_id** | **String**| Project ID |
|
340
|
+
**key_id** | **String**| Translation Key ID |
|
341
|
+
**comment_id** | **String**| Comment ID |
|
342
|
+
**id** | **String**| ID |
|
343
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
344
|
+
**branch** | **String**| specify the branch to use | [optional]
|
345
|
+
|
346
|
+
### Return type
|
347
|
+
|
348
|
+
Response<(nil (empty response body))>
|
349
|
+
|
350
|
+
### Authorization
|
351
|
+
|
352
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
353
|
+
|
354
|
+
### HTTP request headers
|
355
|
+
|
356
|
+
- **Content-Type**: Not defined
|
357
|
+
- **Accept**: Not defined
|
358
|
+
|
359
|
+
|
360
|
+
## reply_show
|
361
|
+
|
362
|
+
> Comment reply_show(project_id, key_id, comment_id, id, opts)
|
363
|
+
|
364
|
+
Get a single reply
|
365
|
+
|
366
|
+
Get details on a single reply.
|
367
|
+
|
368
|
+
### Example
|
369
|
+
|
370
|
+
```ruby
|
371
|
+
# load the gem
|
372
|
+
require 'phrase'
|
373
|
+
# setup authorization
|
374
|
+
Phrase.configure do |config|
|
375
|
+
# Configure HTTP basic authorization: Basic
|
376
|
+
config.username = 'YOUR USERNAME'
|
377
|
+
config.password = 'YOUR PASSWORD'
|
378
|
+
|
379
|
+
# Configure API key authorization: Token
|
380
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
381
|
+
config.api_key_prefix['Authorization'] = 'token'
|
382
|
+
end
|
383
|
+
|
384
|
+
api_instance = Phrase::CommentRepliesApi.new
|
385
|
+
project_id = 'project_id_example' # String | Project ID
|
386
|
+
key_id = 'key_id_example' # String | Translation Key ID
|
387
|
+
comment_id = 'comment_id_example' # String | Comment ID
|
388
|
+
id = 'id_example' # String | ID
|
389
|
+
opts = {
|
390
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
391
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
392
|
+
}
|
393
|
+
|
394
|
+
begin
|
395
|
+
#Get a single reply
|
396
|
+
result = api_instance.reply_show(project_id, key_id, comment_id, id, opts)
|
397
|
+
pp result
|
398
|
+
rescue Phrase::ApiError => e
|
399
|
+
puts "Exception when calling CommentRepliesApi->reply_show: #{e}"
|
400
|
+
end
|
401
|
+
```
|
402
|
+
|
403
|
+
### Parameters
|
404
|
+
|
405
|
+
|
406
|
+
Name | Type | Description | Notes
|
407
|
+
------------- | ------------- | ------------- | -------------
|
408
|
+
**project_id** | **String**| Project ID |
|
409
|
+
**key_id** | **String**| Translation Key ID |
|
410
|
+
**comment_id** | **String**| Comment ID |
|
411
|
+
**id** | **String**| ID |
|
412
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
413
|
+
**branch** | **String**| specify the branch to use | [optional]
|
414
|
+
|
415
|
+
### Return type
|
416
|
+
|
417
|
+
Response<([**Comment**](Comment.md))>
|
418
|
+
|
419
|
+
### Authorization
|
420
|
+
|
421
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
422
|
+
|
423
|
+
### HTTP request headers
|
424
|
+
|
425
|
+
- **Content-Type**: Not defined
|
426
|
+
- **Accept**: application/json
|
427
|
+
|
data/docs/CommentsApi.md
CHANGED
@@ -44,7 +44,9 @@ project_id = 'project_id_example' # String | Project ID
|
|
44
44
|
key_id = 'key_id_example' # String | Translation Key ID
|
45
45
|
comment_create_parameters = Phrase::CommentCreateParameters.new # CommentCreateParameters |
|
46
46
|
opts = {
|
47
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
47
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
48
|
+
message: 'some message...', # String | specify the message for the comment
|
49
|
+
locale_ids: ['someId'] # Array<String> | specify the locales for the comment
|
48
50
|
}
|
49
51
|
|
50
52
|
begin
|
@@ -65,6 +67,8 @@ Name | Type | Description | Notes
|
|
65
67
|
**key_id** | **String**| Translation Key ID |
|
66
68
|
**comment_create_parameters** | [**CommentCreateParameters**](CommentCreateParameters.md)| |
|
67
69
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
70
|
+
**message** | **String**| specify the message for the comment | [optional]
|
71
|
+
**locale_ids** | [**Array<String>**](String.md)| specify the locales for the comment | [optional]
|
68
72
|
|
69
73
|
### Return type
|
70
74
|
|
@@ -15,6 +15,7 @@ module Phrase
|
|
15
15
|
# @param [Hash] opts the optional parameters
|
16
16
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
17
|
# @option opts [String] :branch specify the branch to use
|
18
|
+
# @option opts [String] :emoji specify the emoji for the reaction
|
18
19
|
# @return [CommentReaction]
|
19
20
|
def reaction_create(project_id, key_id, comment_id, opts = {})
|
20
21
|
data, _status_code, _headers = reaction_create_with_http_info(project_id, key_id, comment_id, opts)
|
@@ -29,6 +30,7 @@ module Phrase
|
|
29
30
|
# @param [Hash] opts the optional parameters
|
30
31
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
31
32
|
# @option opts [String] :branch specify the branch to use
|
33
|
+
# @option opts [String] :emoji specify the emoji for the reaction
|
32
34
|
# @return [Array<(Response<(CommentReaction)>, Integer, Hash)>] Response<(CommentReaction)> data, response status code and response headers
|
33
35
|
def reaction_create_with_http_info(project_id, key_id, comment_id, opts = {})
|
34
36
|
if @api_client.config.debugging
|
@@ -52,6 +54,7 @@ module Phrase
|
|
52
54
|
# query parameters
|
53
55
|
query_params = opts[:query_params] || {}
|
54
56
|
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
57
|
+
query_params[:'emoji'] = opts[:'emoji'] if !opts[:'emoji'].nil?
|
55
58
|
|
56
59
|
# header parameters
|
57
60
|
header_params = opts[:header_params] || {}
|