crowdin-api 1.12.0 → 1.13.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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/crowdin-api/api_resources/dictionaries.rb +7 -0
- data/lib/crowdin-api/api_resources/distributions.rb +22 -0
- data/lib/crowdin-api/api_resources/glossaries.rb +85 -0
- data/lib/crowdin-api/api_resources/string_corrections.rb +86 -0
- data/lib/crowdin-api/api_resources/tasks.rb +76 -0
- data/lib/crowdin-api/api_resources/translations.rb +14 -0
- data/lib/crowdin-api/client/version.rb +1 -1
- data/lib/crowdin-api.rb +1 -1
- data/spec/api_resources/string_corrections_spec.rb +83 -0
- data/spec/api_resources/tasks_spec.rb +45 -0
- data/spec/api_resources/translations_spec.rb +10 -0
- metadata +5 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12f344cc4505d0b72b8aa88ad7be65075b4bd6528b001fcde826b40cf2dee874
|
|
4
|
+
data.tar.gz: 2164d78e4db36ae2e059a7bb9c26279962eeeb6e9f37937bd81ff00fca51201a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 708f2939ae29fbff6d80afc5e894aeaab6b57289fe1ce851e6ecd2de4570790e9965d325d860e2c7eebb770a592e6db9f90a44c9a4c35ba7c15150cdaa28eb0a
|
|
7
|
+
data.tar.gz: 85bae25c856683abae92d778987168d591848682679ce6d3db191c884607d208a2838882f9508ff8bc7ab4e29727d9a1791f3b14642e1291a37609334886ce77
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Crowdin
|
|
4
4
|
module ApiResources
|
|
5
5
|
module Dictionaries
|
|
6
|
+
# @param query [Hash] Request Body
|
|
7
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.getMany API Documentation}
|
|
8
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.getMany Enterprise API Documentation}
|
|
6
9
|
def list_dictionaries(query = {}, project_id = config.project_id)
|
|
7
10
|
project_id || raise_project_id_is_required_error
|
|
8
11
|
|
|
@@ -15,6 +18,10 @@ module Crowdin
|
|
|
15
18
|
Web::SendRequest.new(request).perform
|
|
16
19
|
end
|
|
17
20
|
|
|
21
|
+
# @param language_id [String] Language Identifier
|
|
22
|
+
# @param query [Hash] Request Body
|
|
23
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.patch API Documentation}
|
|
24
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.patch Enterprise API Documentation}
|
|
18
25
|
def edit_dictionary(language_id = nil, query = {}, project_id = config.project_id)
|
|
19
26
|
language_id || raise_parameter_is_required_error(:language_id)
|
|
20
27
|
project_id || raise_project_id_is_required_error
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Crowdin
|
|
4
4
|
module ApiResources
|
|
5
5
|
module Distributions
|
|
6
|
+
# @param query [Hash] Request Body
|
|
7
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.getMany API Documentation}
|
|
8
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.getMany Enterprise API Documentation}
|
|
6
9
|
def list_distributions(query = {}, project_id = config.project_id)
|
|
7
10
|
project_id || raise_project_id_is_required_error
|
|
8
11
|
|
|
@@ -15,6 +18,9 @@ module Crowdin
|
|
|
15
18
|
Web::SendRequest.new(request).perform
|
|
16
19
|
end
|
|
17
20
|
|
|
21
|
+
# @param query [Hash] Request Body
|
|
22
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.post API Documentation}
|
|
23
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.post Enterprise API Documentation}
|
|
18
24
|
def add_distribution(query = {}, project_id = config.project_id)
|
|
19
25
|
project_id || raise_project_id_is_required_error
|
|
20
26
|
|
|
@@ -27,6 +33,9 @@ module Crowdin
|
|
|
27
33
|
Web::SendRequest.new(request).perform
|
|
28
34
|
end
|
|
29
35
|
|
|
36
|
+
# @param hash [String] Hash
|
|
37
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.get API Documentation}
|
|
38
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.get Enterprise API Documentation}
|
|
30
39
|
def get_distribution(hash = nil, project_id = config.project_id)
|
|
31
40
|
hash || raise_parameter_is_required_error(:hash)
|
|
32
41
|
project_id || raise_project_id_is_required_error
|
|
@@ -39,6 +48,9 @@ module Crowdin
|
|
|
39
48
|
Web::SendRequest.new(request).perform
|
|
40
49
|
end
|
|
41
50
|
|
|
51
|
+
# @param hash [String] Hash
|
|
52
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.delete API Documentation}
|
|
53
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.delete Enterprise API Documentation}
|
|
42
54
|
def delete_distribution(hash = nil, project_id = config.project_id)
|
|
43
55
|
hash || raise_parameter_is_required_error(:hash)
|
|
44
56
|
project_id || raise_project_id_is_required_error
|
|
@@ -51,6 +63,10 @@ module Crowdin
|
|
|
51
63
|
Web::SendRequest.new(request).perform
|
|
52
64
|
end
|
|
53
65
|
|
|
66
|
+
# @param hash [String] Hash
|
|
67
|
+
# @param query [Hash] Request Body
|
|
68
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.patch API Documentation}
|
|
69
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.patch Enterprise API Documentation}
|
|
54
70
|
def edit_distribution(hash = nil, query = {}, project_id = config.project_id)
|
|
55
71
|
hash || raise_parameter_is_required_error(:hash)
|
|
56
72
|
project_id || raise_project_id_is_required_error
|
|
@@ -64,6 +80,9 @@ module Crowdin
|
|
|
64
80
|
Web::SendRequest.new(request).perform
|
|
65
81
|
end
|
|
66
82
|
|
|
83
|
+
# @param hash [String] Hash
|
|
84
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.release.get API Documentation}
|
|
85
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.release.get Enterprise API Documentation}
|
|
67
86
|
def get_distribution_release(hash = nil, project_id = config.project_id)
|
|
68
87
|
hash || raise_parameter_is_required_error(:hash)
|
|
69
88
|
project_id || raise_project_id_is_required_error
|
|
@@ -76,6 +95,9 @@ module Crowdin
|
|
|
76
95
|
Web::SendRequest.new(request).perform
|
|
77
96
|
end
|
|
78
97
|
|
|
98
|
+
# @param hash [String] Hash
|
|
99
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.release.post API Documentation}
|
|
100
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.release.post Enterprise API Documentation}
|
|
79
101
|
def release_distribution(hash = nil, project_id = config.project_id)
|
|
80
102
|
hash || raise_parameter_is_required_error(:hash)
|
|
81
103
|
project_id || raise_project_id_is_required_error
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Crowdin
|
|
4
4
|
module ApiResources
|
|
5
5
|
module Glossaries
|
|
6
|
+
# @param query [Hash] Request Body
|
|
7
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.getMany API Documentation}
|
|
8
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.getMany Enterprise API Documentation}
|
|
6
9
|
def list_glossaries(query = {})
|
|
7
10
|
request = Web::Request.new(
|
|
8
11
|
connection,
|
|
@@ -13,6 +16,9 @@ module Crowdin
|
|
|
13
16
|
Web::SendRequest.new(request).perform
|
|
14
17
|
end
|
|
15
18
|
|
|
19
|
+
# @param query [Hash] Request Body
|
|
20
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.post API Documentation}
|
|
21
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.post Enterprise API Documentation}
|
|
16
22
|
def add_glossary(query = {})
|
|
17
23
|
request = Web::Request.new(
|
|
18
24
|
connection,
|
|
@@ -23,6 +29,10 @@ module Crowdin
|
|
|
23
29
|
Web::SendRequest.new(request).perform
|
|
24
30
|
end
|
|
25
31
|
|
|
32
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
33
|
+
# @param query [Hash] Request Body
|
|
34
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.get API Documentation}
|
|
35
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.get Enterprise API Documentation}
|
|
26
36
|
def get_glossary(glossary_id = nil, query = {})
|
|
27
37
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
28
38
|
|
|
@@ -35,6 +45,9 @@ module Crowdin
|
|
|
35
45
|
Web::SendRequest.new(request).perform
|
|
36
46
|
end
|
|
37
47
|
|
|
48
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
49
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.delete API Documentation}
|
|
50
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.delete Enterprise API Documentation}
|
|
38
51
|
def delete_glossary(glossary_id = nil)
|
|
39
52
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
40
53
|
|
|
@@ -46,6 +59,10 @@ module Crowdin
|
|
|
46
59
|
Web::SendRequest.new(request).perform
|
|
47
60
|
end
|
|
48
61
|
|
|
62
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
63
|
+
# @param query [Hash] Request Body
|
|
64
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.patch API Documentation}
|
|
65
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.patch Enterprise API Documentation}
|
|
49
66
|
def edit_glossary(glossary_id = nil, query = {})
|
|
50
67
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
51
68
|
|
|
@@ -58,6 +75,11 @@ module Crowdin
|
|
|
58
75
|
Web::SendRequest.new(request).perform
|
|
59
76
|
end
|
|
60
77
|
|
|
78
|
+
# @param query [Hash] Request Body
|
|
79
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
80
|
+
# @param destination [String] File destination
|
|
81
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.exports.post API Documentation}
|
|
82
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.exports.post Enterprise API Documentation}
|
|
61
83
|
def export_glossary(query = {}, glossary_id = nil, destination = nil)
|
|
62
84
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
63
85
|
|
|
@@ -70,6 +92,10 @@ module Crowdin
|
|
|
70
92
|
Web::SendRequest.new(request, destination).perform
|
|
71
93
|
end
|
|
72
94
|
|
|
95
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
96
|
+
# @param export_id [String] Export Identifier, consists of 36 characters
|
|
97
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.exports.get API Documentation}
|
|
98
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.exports.get Enterprise API Documentation}
|
|
73
99
|
def check_glossary_export_status(glossary_id = nil, export_id = nil)
|
|
74
100
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
75
101
|
export_id || raise_parameter_is_required_error(:export_id)
|
|
@@ -82,6 +108,11 @@ module Crowdin
|
|
|
82
108
|
Web::SendRequest.new(request).perform
|
|
83
109
|
end
|
|
84
110
|
|
|
111
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
112
|
+
# @param export_id [String] Export Identifier, consists of 36 characters
|
|
113
|
+
# @param destination [String] File destination
|
|
114
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.exports.download.download API Documentation}
|
|
115
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.exports.download.download Enterprise API Documentation}
|
|
85
116
|
def download_glossary(glossary_id = nil, export_id = nil, destination = nil)
|
|
86
117
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
87
118
|
export_id || raise_parameter_is_required_error(:export_id)
|
|
@@ -94,6 +125,10 @@ module Crowdin
|
|
|
94
125
|
Web::SendRequest.new(request, destination).perform
|
|
95
126
|
end
|
|
96
127
|
|
|
128
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
129
|
+
# @param query [Hash] Request Body
|
|
130
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.imports.post API Documentation}
|
|
131
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.imports.post Enterprise API Documentation}
|
|
97
132
|
def import_glossary(glossary_id = nil, query = {})
|
|
98
133
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
99
134
|
|
|
@@ -106,6 +141,10 @@ module Crowdin
|
|
|
106
141
|
Web::SendRequest.new(request).perform
|
|
107
142
|
end
|
|
108
143
|
|
|
144
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
145
|
+
# @param import_id [String] Import Identifier, consists of 36 characters
|
|
146
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.imports.get API Documentation}
|
|
147
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.imports.get Enterprise API Documentation}
|
|
109
148
|
def check_glossary_import_status(glossary_id = nil, import_id = nil)
|
|
110
149
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
111
150
|
import_id || raise_parameter_is_required_error(:import_id)
|
|
@@ -118,6 +157,10 @@ module Crowdin
|
|
|
118
157
|
Web::SendRequest.new(request).perform
|
|
119
158
|
end
|
|
120
159
|
|
|
160
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
161
|
+
# @param query [Hash] Request Body
|
|
162
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.getMany API Documentation}
|
|
163
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.getMany Enterprise API Documentation}
|
|
121
164
|
def list_terms(glossary_id = nil, query = {})
|
|
122
165
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
123
166
|
|
|
@@ -130,6 +173,10 @@ module Crowdin
|
|
|
130
173
|
Web::SendRequest.new(request).perform
|
|
131
174
|
end
|
|
132
175
|
|
|
176
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
177
|
+
# @param query [Hash] Request Body
|
|
178
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.post API Documentation}
|
|
179
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.post Enterprise API Documentation}
|
|
133
180
|
def add_term(glossary_id = nil, query = {})
|
|
134
181
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
135
182
|
|
|
@@ -142,6 +189,10 @@ module Crowdin
|
|
|
142
189
|
Web::SendRequest.new(request).perform
|
|
143
190
|
end
|
|
144
191
|
|
|
192
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
193
|
+
# @param query [Hash] Request Body
|
|
194
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.deleteMany API Documentation}
|
|
195
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.deleteMany Enterprise API Documentation}
|
|
145
196
|
def clear_glossary(glossary_id = nil, query = {})
|
|
146
197
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
147
198
|
|
|
@@ -158,6 +209,10 @@ module Crowdin
|
|
|
158
209
|
e.message
|
|
159
210
|
end
|
|
160
211
|
|
|
212
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
213
|
+
# @param term_id [Integer] Term Identifier
|
|
214
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.get API Documentation}
|
|
215
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.get Enterprise API Documentation}
|
|
161
216
|
def get_term(glossary_id = nil, term_id = nil)
|
|
162
217
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
163
218
|
term_id || raise_parameter_is_required_error(:term_id)
|
|
@@ -170,6 +225,10 @@ module Crowdin
|
|
|
170
225
|
Web::SendRequest.new(request).perform
|
|
171
226
|
end
|
|
172
227
|
|
|
228
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
229
|
+
# @param term_id [Integer] Term Identifier
|
|
230
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.delete API Documentation}
|
|
231
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.delete Enterprise API Documentation}
|
|
173
232
|
def delete_term(glossary_id = nil, term_id = nil)
|
|
174
233
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
175
234
|
term_id || raise_parameter_is_required_error(:term_id)
|
|
@@ -182,6 +241,11 @@ module Crowdin
|
|
|
182
241
|
Web::SendRequest.new(request).perform
|
|
183
242
|
end
|
|
184
243
|
|
|
244
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
245
|
+
# @param term_id [Integer] Term Identifier
|
|
246
|
+
# @param query [Hash] Request Body
|
|
247
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.terms.patch API Documentation}
|
|
248
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.terms.patch Enterprise API Documentation}
|
|
185
249
|
def edit_term(glossary_id = nil, term_id = nil, query = {})
|
|
186
250
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
187
251
|
term_id || raise_parameter_is_required_error(:term_id)
|
|
@@ -195,6 +259,10 @@ module Crowdin
|
|
|
195
259
|
Web::SendRequest.new(request).perform
|
|
196
260
|
end
|
|
197
261
|
|
|
262
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
263
|
+
# @param query [Hash] Request Body
|
|
264
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.getMany API Documentation}
|
|
265
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.getMany Enterprise API Documentation}
|
|
198
266
|
def list_concepts(glossary_id = nil, query = {})
|
|
199
267
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
200
268
|
|
|
@@ -207,6 +275,10 @@ module Crowdin
|
|
|
207
275
|
Web::SendRequest.new(request).perform
|
|
208
276
|
end
|
|
209
277
|
|
|
278
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
279
|
+
# @param concept_id [Integer] Concept Identifier
|
|
280
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.get API Documentation}
|
|
281
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.get Enterprise API Documentation}
|
|
210
282
|
def get_concept(glossary_id = nil, concept_id = nil)
|
|
211
283
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
212
284
|
concept_id || raise_parameter_is_required_error(:concept_id)
|
|
@@ -219,6 +291,11 @@ module Crowdin
|
|
|
219
291
|
Web::SendRequest.new(request).perform
|
|
220
292
|
end
|
|
221
293
|
|
|
294
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
295
|
+
# @param concept_id [Integer] Concept Identifier
|
|
296
|
+
# @param query [Hash] Request Body
|
|
297
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.put API Documentation}
|
|
298
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.put Enterprise API Documentation}
|
|
222
299
|
def update_concept(glossary_id = nil, concept_id = nil, query = {})
|
|
223
300
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
224
301
|
concept_id || raise_parameter_is_required_error(:concept_id)
|
|
@@ -232,6 +309,10 @@ module Crowdin
|
|
|
232
309
|
Web::SendRequest.new(request).perform
|
|
233
310
|
end
|
|
234
311
|
|
|
312
|
+
# @param glossary_id [Integer] Glossary Identifier
|
|
313
|
+
# @param concept_id [Integer] Concept Identifier
|
|
314
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.delete API Documentation}
|
|
315
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.glossaries.concepts.delete Enterprise API Documentation}
|
|
235
316
|
def delete_concept(glossary_id = nil, concept_id = nil)
|
|
236
317
|
glossary_id || raise_parameter_is_required_error(:glossary_id)
|
|
237
318
|
concept_id || raise_parameter_is_required_error(:concept_id)
|
|
@@ -244,6 +325,10 @@ module Crowdin
|
|
|
244
325
|
Web::SendRequest.new(request).perform
|
|
245
326
|
end
|
|
246
327
|
|
|
328
|
+
# @param project_id [Integer] Project Identifier
|
|
329
|
+
# @param query [Hash] Request Body
|
|
330
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Glossaries/operation/api.projects.glossaries.concordance.post API Documentation}
|
|
331
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Glossaries/operation/api.projects.glossaries.concordance.post Enterprise API Documentation}
|
|
247
332
|
def search_glossaries_concordance(project_id = nil, query = {})
|
|
248
333
|
project_id || raise_project_id_is_required_error
|
|
249
334
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Crowdin
|
|
4
|
+
module ApiResources
|
|
5
|
+
module StringCorrections
|
|
6
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.getMany Enterprise API Documentation}
|
|
7
|
+
def list_corrections(query = {}, project_id = config.project_id)
|
|
8
|
+
project_id || raise_project_id_is_required_error
|
|
9
|
+
|
|
10
|
+
request = Web::Request.new(
|
|
11
|
+
connection,
|
|
12
|
+
:get,
|
|
13
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections",
|
|
14
|
+
{ params: query }
|
|
15
|
+
)
|
|
16
|
+
Web::SendRequest.new(request).perform
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.post Enterprise API Documentation}
|
|
20
|
+
def add_correction(body = {}, project_id = config.project_id)
|
|
21
|
+
project_id || raise_project_id_is_required_error
|
|
22
|
+
|
|
23
|
+
request = Web::Request.new(
|
|
24
|
+
connection,
|
|
25
|
+
:post,
|
|
26
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections",
|
|
27
|
+
{ params: body }
|
|
28
|
+
)
|
|
29
|
+
Web::SendRequest.new(request).perform
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.get Enterprise API Documentation}
|
|
33
|
+
def get_correction(correction_id = nil, query = {}, project_id = config.project_id)
|
|
34
|
+
correction_id || raise_parameter_is_required_error(:correction_id)
|
|
35
|
+
project_id || raise_project_id_is_required_error
|
|
36
|
+
|
|
37
|
+
request = Web::Request.new(
|
|
38
|
+
connection,
|
|
39
|
+
:get,
|
|
40
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections/#{correction_id}",
|
|
41
|
+
{ params: query }
|
|
42
|
+
)
|
|
43
|
+
Web::SendRequest.new(request).perform
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.deleteMany Enterprise API Documentation}
|
|
47
|
+
def delete_corrections(query = {}, project_id = config.project_id)
|
|
48
|
+
project_id || raise_project_id_is_required_error
|
|
49
|
+
|
|
50
|
+
request = Web::Request.new(
|
|
51
|
+
connection,
|
|
52
|
+
:delete,
|
|
53
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections",
|
|
54
|
+
{ params: query }
|
|
55
|
+
)
|
|
56
|
+
Web::SendRequest.new(request).perform
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.delete Enterprise API Documentation}
|
|
60
|
+
def delete_correction(correction_id = nil, project_id = config.project_id)
|
|
61
|
+
correction_id || raise_parameter_is_required_error(:correction_id)
|
|
62
|
+
project_id || raise_project_id_is_required_error
|
|
63
|
+
|
|
64
|
+
request = Web::Request.new(
|
|
65
|
+
connection,
|
|
66
|
+
:delete,
|
|
67
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections/#{correction_id}"
|
|
68
|
+
)
|
|
69
|
+
Web::SendRequest.new(request).perform
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/String-Corrections/operation/api.projects.corrections.put Enterprise API Documentation}
|
|
73
|
+
def restore_correction(correction_id = nil, project_id = config.project_id)
|
|
74
|
+
correction_id || raise_parameter_is_required_error(:correction_id)
|
|
75
|
+
project_id || raise_project_id_is_required_error
|
|
76
|
+
|
|
77
|
+
request = Web::Request.new(
|
|
78
|
+
connection,
|
|
79
|
+
:put,
|
|
80
|
+
"#{config.target_api_url}/projects/#{project_id}/corrections/#{correction_id}"
|
|
81
|
+
)
|
|
82
|
+
Web::SendRequest.new(request).perform
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -97,6 +97,82 @@ module Crowdin
|
|
|
97
97
|
)
|
|
98
98
|
Web::SendRequest.new(request).perform
|
|
99
99
|
end
|
|
100
|
+
|
|
101
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.getMany API Documentation}
|
|
102
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.getMany Enterprise API Documentation}
|
|
103
|
+
def list_task_comments(task_id = nil, query = {}, project_id = config.project_id)
|
|
104
|
+
project_id || raise_project_id_is_required_error
|
|
105
|
+
task_id || raise_parameter_is_required_error(:task_id)
|
|
106
|
+
|
|
107
|
+
request = Web::Request.new(
|
|
108
|
+
connection,
|
|
109
|
+
:get,
|
|
110
|
+
"#{config.target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments",
|
|
111
|
+
{ params: query }
|
|
112
|
+
)
|
|
113
|
+
Web::SendRequest.new(request).perform
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.get API Documentation}
|
|
117
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.get Enterprise API Documentation}
|
|
118
|
+
def get_task_comment(task_id = nil, comment_id = nil, project_id = config.project_id)
|
|
119
|
+
project_id || raise_project_id_is_required_error
|
|
120
|
+
task_id || raise_parameter_is_required_error(:task_id)
|
|
121
|
+
comment_id || raise_parameter_is_required_error(:comment_id)
|
|
122
|
+
|
|
123
|
+
request = Web::Request.new(
|
|
124
|
+
connection,
|
|
125
|
+
:get,
|
|
126
|
+
"#{config.target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}"
|
|
127
|
+
)
|
|
128
|
+
Web::SendRequest.new(request).perform
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.post API Documentation}
|
|
132
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.post Enterprise API Documentation}
|
|
133
|
+
def add_task_comment(task_id = nil, body = {}, project_id = config.project_id)
|
|
134
|
+
project_id || raise_project_id_is_required_error
|
|
135
|
+
task_id || raise_parameter_is_required_error(:task_id)
|
|
136
|
+
|
|
137
|
+
request = Web::Request.new(
|
|
138
|
+
connection,
|
|
139
|
+
:post,
|
|
140
|
+
"#{config.target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments",
|
|
141
|
+
{ params: body }
|
|
142
|
+
)
|
|
143
|
+
Web::SendRequest.new(request).perform
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.patch API Documentation}
|
|
147
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.patch Enterprise API Documentation}
|
|
148
|
+
def edit_task_comment(task_id = nil, comment_id = nil, body = {}, project_id = config.project_id)
|
|
149
|
+
project_id || raise_project_id_is_required_error
|
|
150
|
+
task_id || raise_parameter_is_required_error(:task_id)
|
|
151
|
+
comment_id || raise_parameter_is_required_error(:comment_id)
|
|
152
|
+
|
|
153
|
+
request = Web::Request.new(
|
|
154
|
+
connection,
|
|
155
|
+
:patch,
|
|
156
|
+
"#{config.target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}",
|
|
157
|
+
{ params: body }
|
|
158
|
+
)
|
|
159
|
+
Web::SendRequest.new(request).perform
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.delete API Documentation}
|
|
163
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.delete Enterprise API Documentation}
|
|
164
|
+
def delete_task_comment(task_id = nil, comment_id = nil, project_id = config.project_id)
|
|
165
|
+
project_id || raise_project_id_is_required_error
|
|
166
|
+
task_id || raise_parameter_is_required_error(:task_id)
|
|
167
|
+
comment_id || raise_parameter_is_required_error(:comment_id)
|
|
168
|
+
|
|
169
|
+
request = Web::Request.new(
|
|
170
|
+
connection,
|
|
171
|
+
:delete,
|
|
172
|
+
"#{config.target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}"
|
|
173
|
+
)
|
|
174
|
+
Web::SendRequest.new(request).perform
|
|
175
|
+
end
|
|
100
176
|
end
|
|
101
177
|
end
|
|
102
178
|
end
|
|
@@ -52,6 +52,20 @@ module Crowdin
|
|
|
52
52
|
Web::SendRequest.new(request).perform
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
# * {https://support.crowdin.com/developer/api/v2/#tag/Translations/operation/api.projects.pre-translations.report.getReport API Documentation}
|
|
56
|
+
# * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Translations/operation/api.projects.pre-translations.report.getReport Enterprise API Documentation}
|
|
57
|
+
def pre_translation_report(pre_translation_id = nil, project_id = config.project_id)
|
|
58
|
+
pre_translation_id || raise_parameter_is_required_error(:pre_translation_id)
|
|
59
|
+
project_id || raise_project_id_is_required_error
|
|
60
|
+
|
|
61
|
+
request = Web::Request.new(
|
|
62
|
+
connection,
|
|
63
|
+
:get,
|
|
64
|
+
"#{config.target_api_url}/projects/#{project_id}/pre-translations/#{pre_translation_id}/report"
|
|
65
|
+
)
|
|
66
|
+
Web::SendRequest.new(request).perform
|
|
67
|
+
end
|
|
68
|
+
|
|
55
69
|
def build_project_directory_translation(directory_id = nil, query = {}, project_id = config.project_id)
|
|
56
70
|
directory_id || raise_parameter_is_required_error(:directory_id)
|
|
57
71
|
project_id || raise_project_id_is_required_error
|
data/lib/crowdin-api.rb
CHANGED
|
@@ -6,7 +6,7 @@ module Crowdin
|
|
|
6
6
|
StringTranslations StringComments Screenshots Glossaries TranslationMemory
|
|
7
7
|
MachineTranslationEngines Reports Tasks Users Teams Vendors Webhooks
|
|
8
8
|
Dictionaries Distributions Labels TranslationStatus Bundles Notifications
|
|
9
|
-
Applications].freeze
|
|
9
|
+
Applications StringCorrections].freeze
|
|
10
10
|
|
|
11
11
|
# Error Raisers modules
|
|
12
12
|
ERROR_RAISERS_MODULES = %i[ApiErrorsRaiser ClientErrorsRaiser].freeze
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
describe Crowdin::ApiResources::StringCorrections do
|
|
4
|
+
describe 'Default endpoints' do
|
|
5
|
+
let(:correction_id) { 35 }
|
|
6
|
+
let(:string_id) { 2 }
|
|
7
|
+
|
|
8
|
+
describe '#list_corrections' do
|
|
9
|
+
it 'when request is valid', :default do
|
|
10
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections")
|
|
11
|
+
.with(query: { stringId: string_id })
|
|
12
|
+
list_corrections = @crowdin.list_corrections({ stringId: string_id }, project_id)
|
|
13
|
+
expect(list_corrections).to eq(200)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'when request is valid', :default do
|
|
17
|
+
query = { stringId: string_id, limit: 50, offset: 10, orderBy: 'createdAt desc', denormalizePlaceholders: 1 }
|
|
18
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections")
|
|
19
|
+
.with(query: query)
|
|
20
|
+
list_corrections = @crowdin.list_corrections(query, project_id)
|
|
21
|
+
expect(list_corrections).to eq(200)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe '#add_correction' do
|
|
26
|
+
it 'when request is valid', :default do
|
|
27
|
+
body = { stringId: 35_434, text: 'This string has been corrected', pluralCategoryName: 'few' }
|
|
28
|
+
stub_request(:post, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections")
|
|
29
|
+
.with(body: body)
|
|
30
|
+
add_correction = @crowdin.add_correction(body, project_id)
|
|
31
|
+
expect(add_correction).to eq(200)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'when request is valid', :default do
|
|
35
|
+
body = { stringId: 35_434, text: 'This string has been corrected' }
|
|
36
|
+
stub_request(:post, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections")
|
|
37
|
+
.with(body: body)
|
|
38
|
+
add_correction = @crowdin.add_correction(body, project_id)
|
|
39
|
+
expect(add_correction).to eq(200)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe '#get_correction' do
|
|
44
|
+
it 'when request is valid', :default do
|
|
45
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections/#{correction_id}")
|
|
46
|
+
get_correction = @crowdin.get_correction(correction_id, {}, project_id)
|
|
47
|
+
expect(get_correction).to eq(200)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'when request is valid', :default do
|
|
51
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections/#{correction_id}")
|
|
52
|
+
.with(query: { denormalizePlaceholders: 1 })
|
|
53
|
+
get_correction = @crowdin.get_correction(correction_id, { denormalizePlaceholders: 1 }, project_id)
|
|
54
|
+
expect(get_correction).to eq(200)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe '#delete_corrections' do
|
|
59
|
+
it 'when request is valid', :default do
|
|
60
|
+
stub_request(:delete, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections")
|
|
61
|
+
.with(query: { stringId: string_id })
|
|
62
|
+
delete_corrections = @crowdin.delete_corrections({ stringId: string_id }, project_id)
|
|
63
|
+
expect(delete_corrections).to eq(200)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
describe '#delete_correction' do
|
|
68
|
+
it 'when request is valid', :default do
|
|
69
|
+
stub_request(:delete, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections/#{correction_id}")
|
|
70
|
+
delete_correction = @crowdin.delete_correction(correction_id, project_id)
|
|
71
|
+
expect(delete_correction).to eq(200)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe '#restore_correction' do
|
|
76
|
+
it 'when request is valid', :default do
|
|
77
|
+
stub_request(:put, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/corrections/#{correction_id}")
|
|
78
|
+
restore_correction = @crowdin.restore_correction(correction_id, project_id)
|
|
79
|
+
expect(restore_correction).to eq(200)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -76,4 +76,49 @@ describe Crowdin::ApiResources::Tasks do
|
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
|
+
|
|
80
|
+
describe 'Task Comments endpoints' do
|
|
81
|
+
let(:task_id) { 1 }
|
|
82
|
+
let(:comment_id) { 101 }
|
|
83
|
+
|
|
84
|
+
describe '#list_task_comments' do
|
|
85
|
+
it 'when request is valid', :default do
|
|
86
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments")
|
|
87
|
+
list_task_comments = @crowdin.list_task_comments(task_id, {}, project_id)
|
|
88
|
+
expect(list_task_comments).to eq(200)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
describe '#get_task_comment' do
|
|
93
|
+
it 'when request is valid', :default do
|
|
94
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}")
|
|
95
|
+
get_task_comment = @crowdin.get_task_comment(task_id, comment_id, project_id)
|
|
96
|
+
expect(get_task_comment).to eq(200)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
describe '#add_task_comment' do
|
|
101
|
+
it 'when request is valid', :default do
|
|
102
|
+
stub_request(:post, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments")
|
|
103
|
+
add_task_comment = @crowdin.add_task_comment(task_id, { text: 'New comment' }, project_id)
|
|
104
|
+
expect(add_task_comment).to eq(200)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
describe '#edit_task_comment' do
|
|
109
|
+
it 'when request is valid', :default do
|
|
110
|
+
stub_request(:patch, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}")
|
|
111
|
+
edit_task_comment = @crowdin.edit_task_comment(task_id, comment_id, { text: 'Updated comment' }, project_id)
|
|
112
|
+
expect(edit_task_comment).to eq(200)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
describe '#delete_task_comment' do
|
|
117
|
+
it 'when request is valid', :default do
|
|
118
|
+
stub_request(:delete, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/tasks/#{task_id}/comments/#{comment_id}")
|
|
119
|
+
delete_task_comment = @crowdin.delete_task_comment(task_id, comment_id, project_id)
|
|
120
|
+
expect(delete_task_comment).to eq(200)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
79
124
|
end
|
|
@@ -38,6 +38,16 @@ describe Crowdin::ApiResources::Translations do
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
describe '#pre_translation_report' do
|
|
42
|
+
let(:pre_translation_id) { 1 }
|
|
43
|
+
|
|
44
|
+
it 'when request are valid', :default do
|
|
45
|
+
stub_request(:get, "https://api.crowdin.com/#{target_api_url}/projects/#{project_id}/pre-translations/#{pre_translation_id}/report")
|
|
46
|
+
pre_translation_report = @crowdin.pre_translation_report(pre_translation_id, project_id)
|
|
47
|
+
expect(pre_translation_report).to eq(200)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
41
51
|
describe '#build_project_directory_translation' do
|
|
42
52
|
let(:directory_id) { 1 }
|
|
43
53
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crowdin-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Crowdin
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: open-uri
|
|
@@ -221,6 +220,7 @@ files:
|
|
|
221
220
|
- lib/crowdin-api/api_resources/source_strings.rb
|
|
222
221
|
- lib/crowdin-api/api_resources/storages.rb
|
|
223
222
|
- lib/crowdin-api/api_resources/string_comments.rb
|
|
223
|
+
- lib/crowdin-api/api_resources/string_corrections.rb
|
|
224
224
|
- lib/crowdin-api/api_resources/string_translations.rb
|
|
225
225
|
- lib/crowdin-api/api_resources/tasks.rb
|
|
226
226
|
- lib/crowdin-api/api_resources/teams.rb
|
|
@@ -255,6 +255,7 @@ files:
|
|
|
255
255
|
- spec/api_resources/source_strings_spec.rb
|
|
256
256
|
- spec/api_resources/storages_spec.rb
|
|
257
257
|
- spec/api_resources/string_comments_spec.rb
|
|
258
|
+
- spec/api_resources/string_corrections_spec.rb
|
|
258
259
|
- spec/api_resources/string_translations_spec.rb
|
|
259
260
|
- spec/api_resources/tasks_spec.rb
|
|
260
261
|
- spec/api_resources/teams_spec.rb
|
|
@@ -271,7 +272,6 @@ homepage: https://github.com/crowdin/crowdin-api-client-ruby
|
|
|
271
272
|
licenses:
|
|
272
273
|
- MIT
|
|
273
274
|
metadata: {}
|
|
274
|
-
post_install_message:
|
|
275
275
|
rdoc_options: []
|
|
276
276
|
require_paths:
|
|
277
277
|
- lib
|
|
@@ -286,8 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
286
286
|
- !ruby/object:Gem::Version
|
|
287
287
|
version: '0'
|
|
288
288
|
requirements: []
|
|
289
|
-
rubygems_version: 3.
|
|
290
|
-
signing_key:
|
|
289
|
+
rubygems_version: 3.6.9
|
|
291
290
|
specification_version: 4
|
|
292
291
|
summary: Ruby Client for the Crowdin API
|
|
293
292
|
test_files: []
|