deepl-rb 2.3.1 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -4
- data/README.md +100 -1
- data/VERSION +1 -1
- data/deepl-rb.gemspec +25 -4
- data/lib/deepl/configuration.rb +2 -2
- data/lib/deepl/exceptions/not_found.rb +13 -0
- data/lib/deepl/exceptions/not_supported.rb +11 -0
- data/lib/deepl/glossary_api.rb +35 -0
- data/lib/deepl/requests/base.rb +21 -4
- data/lib/deepl/requests/glossary/create.rb +45 -0
- data/lib/deepl/requests/glossary/destroy.rb +30 -0
- data/lib/deepl/requests/glossary/entries.rb +30 -0
- data/lib/deepl/requests/glossary/find.rb +31 -0
- data/lib/deepl/requests/glossary/language_pairs.rb +31 -0
- data/lib/deepl/requests/glossary/list.rb +30 -0
- data/lib/deepl/requests/languages.rb +3 -1
- data/lib/deepl/requests/translate.rb +4 -2
- data/lib/deepl/resources/glossary.rb +25 -0
- data/lib/deepl/resources/language.rb +8 -1
- data/lib/deepl/resources/language_pair.rb +20 -0
- data/lib/deepl.rb +16 -0
- data/spec/api/configuration_spec.rb +1 -1
- data/spec/api/deepl_spec.rb +189 -0
- data/spec/fixtures/vcr_cassettes/deepl_glossaries.yml +374 -0
- data/spec/fixtures/vcr_cassettes/deepl_languages.yml +3 -1
- data/spec/fixtures/vcr_cassettes/deepl_translate.yml +212 -1
- data/spec/fixtures/vcr_cassettes/deepl_usage.yml +3 -1
- data/spec/fixtures/vcr_cassettes/glossaries.yml +480 -0
- data/spec/fixtures/vcr_cassettes/languages.yml +9 -3
- data/spec/fixtures/vcr_cassettes/translate_texts.yml +101 -44
- data/spec/fixtures/vcr_cassettes/usage.yml +3 -1
- data/spec/requests/glossary/create_spec.rb +55 -0
- data/spec/requests/glossary/destroy_spec.rb +50 -0
- data/spec/requests/glossary/entries_spec.rb +48 -0
- data/spec/requests/glossary/find_spec.rb +54 -0
- data/spec/requests/glossary/language_pairs_spec.rb +30 -0
- data/spec/requests/glossary/list_spec.rb +44 -0
- data/spec/requests/translate_spec.rb +74 -2
- data/spec/resources/glossary_spec.rb +35 -0
- data/spec/resources/language_pair_spec.rb +20 -0
- data/spec/resources/language_spec.rb +23 -1
- data/spec/spec_helper.rb +3 -3
- metadata +24 -3
@@ -2,11 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://api-free.deepl.com/v2/translate?
|
5
|
+
uri: https://api-free.deepl.com/v2/translate?param=fake
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: text=Sample&source_lang=EN&target_lang=ES
|
9
9
|
headers:
|
10
|
+
Authorization:
|
11
|
+
- DeepL-Auth-Key VALID_TOKEN
|
10
12
|
Accept-Encoding:
|
11
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
14
|
Accept:
|
@@ -36,4 +38,213 @@ http_interactions:
|
|
36
38
|
encoding: UTF-8
|
37
39
|
string: '{"translations":[{"detected_source_language":"EN","text":"Muestra"}]}'
|
38
40
|
recorded_at: Mon, 17 May 2021 14:42:56 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: name=fixture&source_lang=EN&target_lang=ES&entries=World%09Tierra%0A&entries_format=tsv
|
47
|
+
headers:
|
48
|
+
Authorization:
|
49
|
+
- DeepL-Auth-Key VALID_TOKEN
|
50
|
+
Accept-Encoding:
|
51
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
52
|
+
Accept:
|
53
|
+
- "*/*"
|
54
|
+
User-Agent:
|
55
|
+
- Ruby
|
56
|
+
Content-Type:
|
57
|
+
- application/x-www-form-urlencoded
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 201
|
61
|
+
message: Created
|
62
|
+
headers:
|
63
|
+
Server:
|
64
|
+
- nginx
|
65
|
+
Date:
|
66
|
+
- Mon, 24 Jan 2022 23:22:45 GMT
|
67
|
+
Content-Type:
|
68
|
+
- application/json; charset=utf-8
|
69
|
+
Transfer-Encoding:
|
70
|
+
- chunked
|
71
|
+
Connection:
|
72
|
+
- keep-alive
|
73
|
+
body:
|
74
|
+
encoding: UTF-8
|
75
|
+
string: '{"glossary_id":"c8ec9224-f13c-4af5-94eb-25e2d6112d34","name":"fixture","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-24T23:22:45.4428+00:00","entry_count":1}'
|
76
|
+
recorded_at: Mon, 24 Jan 2022 23:22:45 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: https://api-free.deepl.com/v2/translate?glossary_id=c8ec9224-f13c-4af5-94eb-25e2d6112d34
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: text=Hello+World&source_lang=EN&target_lang=ES
|
83
|
+
headers:
|
84
|
+
Authorization:
|
85
|
+
- DeepL-Auth-Key VALID_TOKEN
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
88
|
+
Accept:
|
89
|
+
- "*/*"
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
Content-Type:
|
93
|
+
- application/x-www-form-urlencoded
|
94
|
+
response:
|
95
|
+
status:
|
96
|
+
code: 200
|
97
|
+
message: OK
|
98
|
+
headers:
|
99
|
+
Server:
|
100
|
+
- nginx
|
101
|
+
Date:
|
102
|
+
- Mon, 24 Jan 2022 23:22:47 GMT
|
103
|
+
Content-Type:
|
104
|
+
- application/json
|
105
|
+
Content-Length:
|
106
|
+
- '73'
|
107
|
+
Connection:
|
108
|
+
- keep-alive
|
109
|
+
Access-Control-Allow-Origin:
|
110
|
+
- "*"
|
111
|
+
body:
|
112
|
+
encoding: UTF-8
|
113
|
+
string: '{"translations":[{"detected_source_language":"EN","text":"Hola Tierra"}]}'
|
114
|
+
recorded_at: Mon, 24 Jan 2022 23:22:47 GMT
|
115
|
+
- request:
|
116
|
+
method: delete
|
117
|
+
uri: https://api-free.deepl.com/v2/glossaries/c8ec9224-f13c-4af5-94eb-25e2d6112d34
|
118
|
+
body:
|
119
|
+
encoding: US-ASCII
|
120
|
+
string: ''
|
121
|
+
headers:
|
122
|
+
Authorization:
|
123
|
+
- DeepL-Auth-Key VALID_TOKEN
|
124
|
+
Accept-Encoding:
|
125
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
126
|
+
Accept:
|
127
|
+
- "*/*"
|
128
|
+
User-Agent:
|
129
|
+
- Ruby
|
130
|
+
response:
|
131
|
+
status:
|
132
|
+
code: 204
|
133
|
+
message: No Content
|
134
|
+
headers:
|
135
|
+
Server:
|
136
|
+
- nginx
|
137
|
+
Date:
|
138
|
+
- Mon, 24 Jan 2022 23:22:48 GMT
|
139
|
+
Connection:
|
140
|
+
- keep-alive
|
141
|
+
body:
|
142
|
+
encoding: UTF-8
|
143
|
+
string: ''
|
144
|
+
recorded_at: Mon, 24 Jan 2022 23:22:48 GMT
|
145
|
+
- request:
|
146
|
+
method: post
|
147
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
148
|
+
body:
|
149
|
+
encoding: US-ASCII
|
150
|
+
string: name=fixture&source_lang=EN&target_lang=ES&entries=car%09auto%0A&entries_format=tsv
|
151
|
+
headers:
|
152
|
+
Authorization:
|
153
|
+
- DeepL-Auth-Key VALID_TOKEN
|
154
|
+
Accept-Encoding:
|
155
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
156
|
+
Accept:
|
157
|
+
- "*/*"
|
158
|
+
User-Agent:
|
159
|
+
- Ruby
|
160
|
+
Content-Type:
|
161
|
+
- application/x-www-form-urlencoded
|
162
|
+
response:
|
163
|
+
status:
|
164
|
+
code: 201
|
165
|
+
message: Created
|
166
|
+
headers:
|
167
|
+
Server:
|
168
|
+
- nginx
|
169
|
+
Date:
|
170
|
+
- Tue, 25 Jan 2022 00:52:04 GMT
|
171
|
+
Content-Type:
|
172
|
+
- application/json; charset=utf-8
|
173
|
+
Transfer-Encoding:
|
174
|
+
- chunked
|
175
|
+
Connection:
|
176
|
+
- keep-alive
|
177
|
+
body:
|
178
|
+
encoding: UTF-8
|
179
|
+
string: '{"glossary_id":"0d425d16-dbdf-4d26-aca1-12d41e9ea484","name":"fixture","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-25T00:52:04.21883+00:00","entry_count":1}'
|
180
|
+
recorded_at: Tue, 25 Jan 2022 00:52:04 GMT
|
181
|
+
- request:
|
182
|
+
method: post
|
183
|
+
uri: https://api-free.deepl.com/v2/translate?glossary_id=0d425d16-dbdf-4d26-aca1-12d41e9ea484
|
184
|
+
body:
|
185
|
+
encoding: US-ASCII
|
186
|
+
string: text=I+wish+we+had+a+car.&source_lang=EN&target_lang=ES
|
187
|
+
headers:
|
188
|
+
Authorization:
|
189
|
+
- DeepL-Auth-Key VALID_TOKEN
|
190
|
+
Accept-Encoding:
|
191
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
192
|
+
Accept:
|
193
|
+
- "*/*"
|
194
|
+
User-Agent:
|
195
|
+
- Ruby
|
196
|
+
Content-Type:
|
197
|
+
- application/x-www-form-urlencoded
|
198
|
+
response:
|
199
|
+
status:
|
200
|
+
code: 200
|
201
|
+
message: OK
|
202
|
+
headers:
|
203
|
+
Server:
|
204
|
+
- nginx
|
205
|
+
Date:
|
206
|
+
- Tue, 25 Jan 2022 00:52:04 GMT
|
207
|
+
Content-Type:
|
208
|
+
- application/json
|
209
|
+
Content-Length:
|
210
|
+
- '89'
|
211
|
+
Connection:
|
212
|
+
- keep-alive
|
213
|
+
Access-Control-Allow-Origin:
|
214
|
+
- "*"
|
215
|
+
body:
|
216
|
+
encoding: ASCII-8BIT
|
217
|
+
string: !binary |-
|
218
|
+
eyJ0cmFuc2xhdGlvbnMiOlt7ImRldGVjdGVkX3NvdXJjZV9sYW5ndWFnZSI6IkVOIiwidGV4dCI6Ik9qYWzDoSB0dXZpw6lyYW1vcyB1biBhdXRvLiJ9XX0=
|
219
|
+
recorded_at: Tue, 25 Jan 2022 00:52:04 GMT
|
220
|
+
- request:
|
221
|
+
method: delete
|
222
|
+
uri: https://api-free.deepl.com/v2/glossaries/0d425d16-dbdf-4d26-aca1-12d41e9ea484
|
223
|
+
body:
|
224
|
+
encoding: US-ASCII
|
225
|
+
string: ''
|
226
|
+
headers:
|
227
|
+
Authorization:
|
228
|
+
- DeepL-Auth-Key VALID_TOKEN
|
229
|
+
Accept-Encoding:
|
230
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
231
|
+
Accept:
|
232
|
+
- "*/*"
|
233
|
+
User-Agent:
|
234
|
+
- Ruby
|
235
|
+
response:
|
236
|
+
status:
|
237
|
+
code: 204
|
238
|
+
message: No Content
|
239
|
+
headers:
|
240
|
+
Server:
|
241
|
+
- nginx
|
242
|
+
Date:
|
243
|
+
- Tue, 25 Jan 2022 00:52:05 GMT
|
244
|
+
Connection:
|
245
|
+
- keep-alive
|
246
|
+
body:
|
247
|
+
encoding: UTF-8
|
248
|
+
string: ''
|
249
|
+
recorded_at: Tue, 25 Jan 2022 00:52:05 GMT
|
39
250
|
recorded_with: VCR 6.0.0
|
@@ -2,11 +2,13 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api-free.deepl.com/v2/usage
|
5
|
+
uri: https://api-free.deepl.com/v2/usage
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
+
Authorization:
|
11
|
+
- DeepL-Auth-Key VALID_TOKEN
|
10
12
|
Accept-Encoding:
|
11
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
14
|
Accept:
|
@@ -0,0 +1,480 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: name=Mi+Glosario&source_lang=EN&target_lang=ES&entries=Hello%09Hola%0AWorld%09Mundo%0A&entries_format=tsv
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- DeepL-Auth-Key VALID_TOKEN
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
Content-Type:
|
19
|
+
- application/x-www-form-urlencoded
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Mon, 24 Jan 2022 01:32:33 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"glossary_id":"3d12b7d8-012d-47b8-8378-c7085644026d","name":"Mi Glosario","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-24T01:32:33.045005+00:00","entry_count":2}'
|
38
|
+
recorded_at: Mon, 24 Jan 2022 01:32:33 GMT
|
39
|
+
- request:
|
40
|
+
method: get
|
41
|
+
uri: https://api-free.deepl.com/v2/glossaries/d9ad833f-c818-430c-a3c9-47071384fa3e
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ''
|
45
|
+
headers:
|
46
|
+
Authorization:
|
47
|
+
- DeepL-Auth-Key VALID_TOKEN
|
48
|
+
Accept-Encoding:
|
49
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
50
|
+
Accept:
|
51
|
+
- "*/*"
|
52
|
+
User-Agent:
|
53
|
+
- Ruby
|
54
|
+
response:
|
55
|
+
status:
|
56
|
+
code: 200
|
57
|
+
message: OK
|
58
|
+
headers:
|
59
|
+
Server:
|
60
|
+
- nginx
|
61
|
+
Date:
|
62
|
+
- Mon, 24 Jan 2022 01:32:36 GMT
|
63
|
+
Content-Type:
|
64
|
+
- application/json; charset=utf-8
|
65
|
+
Transfer-Encoding:
|
66
|
+
- chunked
|
67
|
+
Connection:
|
68
|
+
- keep-alive
|
69
|
+
body:
|
70
|
+
encoding: UTF-8
|
71
|
+
string: '{"glossary_id":"d9ad833f-c818-430c-a3c9-47071384fa3e","name":"Mi Glosario","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-23T23:01:10.073429+00:00","entry_count":2}'
|
72
|
+
recorded_at: Mon, 24 Jan 2022 01:32:36 GMT
|
73
|
+
- request:
|
74
|
+
method: get
|
75
|
+
uri: https://api-free.deepl.com/v2/glossaries/a0af40e1-d81b-4aab-a95c-7cafbcfd1eb1
|
76
|
+
body:
|
77
|
+
encoding: US-ASCII
|
78
|
+
string: ''
|
79
|
+
headers:
|
80
|
+
Authorization:
|
81
|
+
- DeepL-Auth-Key VALID_TOKEN
|
82
|
+
Accept-Encoding:
|
83
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
84
|
+
Accept:
|
85
|
+
- "*/*"
|
86
|
+
User-Agent:
|
87
|
+
- Ruby
|
88
|
+
response:
|
89
|
+
status:
|
90
|
+
code: 404
|
91
|
+
message: Not Found
|
92
|
+
headers:
|
93
|
+
Server:
|
94
|
+
- nginx
|
95
|
+
Date:
|
96
|
+
- Mon, 24 Jan 2022 01:32:36 GMT
|
97
|
+
Content-Type:
|
98
|
+
- application/json; charset=utf-8
|
99
|
+
Transfer-Encoding:
|
100
|
+
- chunked
|
101
|
+
Connection:
|
102
|
+
- keep-alive
|
103
|
+
body:
|
104
|
+
encoding: UTF-8
|
105
|
+
string: '{"message":"Not found"}'
|
106
|
+
recorded_at: Mon, 24 Jan 2022 01:32:36 GMT
|
107
|
+
- request:
|
108
|
+
method: get
|
109
|
+
uri: https://api-free.deepl.com/v2/glossaries/invalid-uuid
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: ''
|
113
|
+
headers:
|
114
|
+
Authorization:
|
115
|
+
- DeepL-Auth-Key VALID_TOKEN
|
116
|
+
Accept-Encoding:
|
117
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
118
|
+
Accept:
|
119
|
+
- "*/*"
|
120
|
+
User-Agent:
|
121
|
+
- Ruby
|
122
|
+
response:
|
123
|
+
status:
|
124
|
+
code: 400
|
125
|
+
message: Bad Request
|
126
|
+
headers:
|
127
|
+
Server:
|
128
|
+
- nginx
|
129
|
+
Date:
|
130
|
+
- Mon, 24 Jan 2022 01:32:36 GMT
|
131
|
+
Content-Type:
|
132
|
+
- application/json; charset=utf-8
|
133
|
+
Transfer-Encoding:
|
134
|
+
- chunked
|
135
|
+
Connection:
|
136
|
+
- keep-alive
|
137
|
+
body:
|
138
|
+
encoding: UTF-8
|
139
|
+
string: '{"message":"Invalid or missing glossary id"}'
|
140
|
+
recorded_at: Mon, 24 Jan 2022 01:32:36 GMT
|
141
|
+
- request:
|
142
|
+
method: get
|
143
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
144
|
+
body:
|
145
|
+
encoding: US-ASCII
|
146
|
+
string: ''
|
147
|
+
headers:
|
148
|
+
Authorization:
|
149
|
+
- DeepL-Auth-Key VALID_TOKEN
|
150
|
+
Accept-Encoding:
|
151
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
152
|
+
Accept:
|
153
|
+
- "*/*"
|
154
|
+
User-Agent:
|
155
|
+
- Ruby
|
156
|
+
response:
|
157
|
+
status:
|
158
|
+
code: 200
|
159
|
+
message: OK
|
160
|
+
headers:
|
161
|
+
Server:
|
162
|
+
- nginx
|
163
|
+
Date:
|
164
|
+
- Mon, 24 Jan 2022 02:22:25 GMT
|
165
|
+
Content-Type:
|
166
|
+
- application/json; charset=utf-8
|
167
|
+
Transfer-Encoding:
|
168
|
+
- chunked
|
169
|
+
Connection:
|
170
|
+
- keep-alive
|
171
|
+
body:
|
172
|
+
encoding: UTF-8
|
173
|
+
string: '{"glossaries":[{"glossary_id":"012a5576-b551-4d4c-b917-ce01bc8debb6","name":"Mi
|
174
|
+
Glosario","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-24T02:21:43.300323+00:00","entry_count":2}]}'
|
175
|
+
recorded_at: Mon, 24 Jan 2022 02:22:25 GMT
|
176
|
+
- request:
|
177
|
+
method: get
|
178
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
179
|
+
body:
|
180
|
+
encoding: US-ASCII
|
181
|
+
string: ''
|
182
|
+
headers:
|
183
|
+
Authorization:
|
184
|
+
- DeepL-Auth-Key invalid
|
185
|
+
Accept-Encoding:
|
186
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
187
|
+
Accept:
|
188
|
+
- "*/*"
|
189
|
+
User-Agent:
|
190
|
+
- Ruby
|
191
|
+
response:
|
192
|
+
status:
|
193
|
+
code: 401
|
194
|
+
message: Unauthorized
|
195
|
+
headers:
|
196
|
+
Server:
|
197
|
+
- nginx
|
198
|
+
Date:
|
199
|
+
- Mon, 24 Jan 2022 02:22:26 GMT
|
200
|
+
Content-Type:
|
201
|
+
- application/json; charset=utf-8
|
202
|
+
Transfer-Encoding:
|
203
|
+
- chunked
|
204
|
+
Connection:
|
205
|
+
- keep-alive
|
206
|
+
body:
|
207
|
+
encoding: UTF-8
|
208
|
+
string: '{"message":"Unauthorized"}'
|
209
|
+
recorded_at: Mon, 24 Jan 2022 02:22:26 GMT
|
210
|
+
- request:
|
211
|
+
method: delete
|
212
|
+
uri: https://api-free.deepl.com/v2/glossaries/00000000-0000-0000-0000-000000000000
|
213
|
+
body:
|
214
|
+
encoding: US-ASCII
|
215
|
+
string: ''
|
216
|
+
headers:
|
217
|
+
Authorization:
|
218
|
+
- DeepL-Auth-Key VALID_TOKEN
|
219
|
+
Accept-Encoding:
|
220
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
221
|
+
Accept:
|
222
|
+
- "*/*"
|
223
|
+
User-Agent:
|
224
|
+
- Ruby
|
225
|
+
response:
|
226
|
+
status:
|
227
|
+
code: 404
|
228
|
+
message: Not Found
|
229
|
+
headers:
|
230
|
+
Server:
|
231
|
+
- nginx
|
232
|
+
Date:
|
233
|
+
- Mon, 24 Jan 2022 02:37:52 GMT
|
234
|
+
Content-Type:
|
235
|
+
- application/json; charset=utf-8
|
236
|
+
Transfer-Encoding:
|
237
|
+
- chunked
|
238
|
+
Connection:
|
239
|
+
- keep-alive
|
240
|
+
body:
|
241
|
+
encoding: UTF-8
|
242
|
+
string: '{"message":"Not found"}'
|
243
|
+
recorded_at: Mon, 24 Jan 2022 02:37:52 GMT
|
244
|
+
- request:
|
245
|
+
method: delete
|
246
|
+
uri: https://api-free.deepl.com/v2/glossaries/invalid-uuid
|
247
|
+
body:
|
248
|
+
encoding: US-ASCII
|
249
|
+
string: ''
|
250
|
+
headers:
|
251
|
+
Authorization:
|
252
|
+
- DeepL-Auth-Key VALID_TOKEN
|
253
|
+
Accept-Encoding:
|
254
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
255
|
+
Accept:
|
256
|
+
- "*/*"
|
257
|
+
User-Agent:
|
258
|
+
- Ruby
|
259
|
+
response:
|
260
|
+
status:
|
261
|
+
code: 400
|
262
|
+
message: Bad Request
|
263
|
+
headers:
|
264
|
+
Server:
|
265
|
+
- nginx
|
266
|
+
Date:
|
267
|
+
- Mon, 24 Jan 2022 02:37:53 GMT
|
268
|
+
Content-Type:
|
269
|
+
- application/json; charset=utf-8
|
270
|
+
Transfer-Encoding:
|
271
|
+
- chunked
|
272
|
+
Connection:
|
273
|
+
- keep-alive
|
274
|
+
body:
|
275
|
+
encoding: UTF-8
|
276
|
+
string: '{"message":"Invalid or missing glossary id"}'
|
277
|
+
recorded_at: Mon, 24 Jan 2022 02:37:53 GMT
|
278
|
+
- request:
|
279
|
+
method: get
|
280
|
+
uri: https://api-free.deepl.com/v2/glossaries/012a5576-b551-4d4c-b917-ce01bc8debb6/entries
|
281
|
+
body:
|
282
|
+
encoding: US-ASCII
|
283
|
+
string: ''
|
284
|
+
headers:
|
285
|
+
Authorization:
|
286
|
+
- DeepL-Auth-Key VALID_TOKEN
|
287
|
+
Accept-Encoding:
|
288
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
289
|
+
Accept:
|
290
|
+
- "*/*"
|
291
|
+
User-Agent:
|
292
|
+
- Ruby
|
293
|
+
response:
|
294
|
+
status:
|
295
|
+
code: 200
|
296
|
+
message: OK
|
297
|
+
headers:
|
298
|
+
Server:
|
299
|
+
- nginx
|
300
|
+
Date:
|
301
|
+
- Mon, 24 Jan 2022 02:46:13 GMT
|
302
|
+
Content-Type:
|
303
|
+
- text/tab-separated-values; charset=UTF-8
|
304
|
+
Content-Length:
|
305
|
+
- '22'
|
306
|
+
Connection:
|
307
|
+
- keep-alive
|
308
|
+
body:
|
309
|
+
encoding: UTF-8
|
310
|
+
string: "Hello\tHola\nWorld\tMundo"
|
311
|
+
recorded_at: Mon, 24 Jan 2022 02:46:13 GMT
|
312
|
+
- request:
|
313
|
+
method: get
|
314
|
+
uri: https://api-free.deepl.com/v2/glossaries/00000000-0000-0000-0000-000000000000/entries
|
315
|
+
body:
|
316
|
+
encoding: US-ASCII
|
317
|
+
string: ''
|
318
|
+
headers:
|
319
|
+
Authorization:
|
320
|
+
- DeepL-Auth-Key VALID_TOKEN
|
321
|
+
Accept-Encoding:
|
322
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
323
|
+
Accept:
|
324
|
+
- "*/*"
|
325
|
+
User-Agent:
|
326
|
+
- Ruby
|
327
|
+
response:
|
328
|
+
status:
|
329
|
+
code: 404
|
330
|
+
message: Not Found
|
331
|
+
headers:
|
332
|
+
Server:
|
333
|
+
- nginx
|
334
|
+
Date:
|
335
|
+
- Mon, 24 Jan 2022 02:46:13 GMT
|
336
|
+
Content-Type:
|
337
|
+
- application/json; charset=utf-8
|
338
|
+
Transfer-Encoding:
|
339
|
+
- chunked
|
340
|
+
Connection:
|
341
|
+
- keep-alive
|
342
|
+
body:
|
343
|
+
encoding: UTF-8
|
344
|
+
string: '{"message":"Not found"}'
|
345
|
+
recorded_at: Mon, 24 Jan 2022 02:46:13 GMT
|
346
|
+
- request:
|
347
|
+
method: get
|
348
|
+
uri: https://api-free.deepl.com/v2/glossaries/invalid-uuid/entries
|
349
|
+
body:
|
350
|
+
encoding: US-ASCII
|
351
|
+
string: ''
|
352
|
+
headers:
|
353
|
+
Authorization:
|
354
|
+
- DeepL-Auth-Key VALID_TOKEN
|
355
|
+
Accept-Encoding:
|
356
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
357
|
+
Accept:
|
358
|
+
- "*/*"
|
359
|
+
User-Agent:
|
360
|
+
- Ruby
|
361
|
+
response:
|
362
|
+
status:
|
363
|
+
code: 400
|
364
|
+
message: Bad Request
|
365
|
+
headers:
|
366
|
+
Server:
|
367
|
+
- nginx
|
368
|
+
Date:
|
369
|
+
- Mon, 24 Jan 2022 02:46:14 GMT
|
370
|
+
Content-Type:
|
371
|
+
- application/json; charset=utf-8
|
372
|
+
Transfer-Encoding:
|
373
|
+
- chunked
|
374
|
+
Connection:
|
375
|
+
- keep-alive
|
376
|
+
body:
|
377
|
+
encoding: UTF-8
|
378
|
+
string: '{"message":"Invalid or missing glossary id"}'
|
379
|
+
recorded_at: Mon, 24 Jan 2022 02:46:14 GMT
|
380
|
+
- request:
|
381
|
+
method: get
|
382
|
+
uri: https://api-free.deepl.com/v2/glossary-language-pairs
|
383
|
+
body:
|
384
|
+
encoding: US-ASCII
|
385
|
+
string: ''
|
386
|
+
headers:
|
387
|
+
Authorization:
|
388
|
+
- DeepL-Auth-Key VALID_TOKEN
|
389
|
+
Accept-Encoding:
|
390
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
391
|
+
Accept:
|
392
|
+
- "*/*"
|
393
|
+
User-Agent:
|
394
|
+
- Ruby
|
395
|
+
response:
|
396
|
+
status:
|
397
|
+
code: 200
|
398
|
+
message: OK
|
399
|
+
headers:
|
400
|
+
Server:
|
401
|
+
- nginx
|
402
|
+
Date:
|
403
|
+
- Mon, 24 Jan 2022 02:57:52 GMT
|
404
|
+
Content-Type:
|
405
|
+
- application/json; charset=utf-8
|
406
|
+
Transfer-Encoding:
|
407
|
+
- chunked
|
408
|
+
Connection:
|
409
|
+
- keep-alive
|
410
|
+
body:
|
411
|
+
encoding: UTF-8
|
412
|
+
string: '{"supported_languages":[{"source_lang":"de","target_lang":"en"},{"source_lang":"en","target_lang":"de"},{"source_lang":"en","target_lang":"es"},{"source_lang":"en","target_lang":"fr"},{"source_lang":"es","target_lang":"en"},{"source_lang":"fr","target_lang":"en"}]}'
|
413
|
+
recorded_at: Mon, 24 Jan 2022 02:57:52 GMT
|
414
|
+
- request:
|
415
|
+
method: post
|
416
|
+
uri: https://api-free.deepl.com/v2/glossaries
|
417
|
+
body:
|
418
|
+
encoding: US-ASCII
|
419
|
+
string: name=fixture&source_lang=EN&target_lang=ES&entries=Hello%09Hola%0A&entries_format=tsv
|
420
|
+
headers:
|
421
|
+
Authorization:
|
422
|
+
- DeepL-Auth-Key VALID_TOKEN
|
423
|
+
Accept-Encoding:
|
424
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
425
|
+
Accept:
|
426
|
+
- "*/*"
|
427
|
+
User-Agent:
|
428
|
+
- Ruby
|
429
|
+
Content-Type:
|
430
|
+
- application/x-www-form-urlencoded
|
431
|
+
response:
|
432
|
+
status:
|
433
|
+
code: 201
|
434
|
+
message: Created
|
435
|
+
headers:
|
436
|
+
Server:
|
437
|
+
- nginx
|
438
|
+
Date:
|
439
|
+
- Tue, 25 Jan 2022 00:56:19 GMT
|
440
|
+
Content-Type:
|
441
|
+
- application/json; charset=utf-8
|
442
|
+
Transfer-Encoding:
|
443
|
+
- chunked
|
444
|
+
Connection:
|
445
|
+
- keep-alive
|
446
|
+
body:
|
447
|
+
encoding: UTF-8
|
448
|
+
string: '{"glossary_id":"0d893a5f-a841-439b-8a25-ee7d67cb0451","name":"fixture","ready":true,"source_lang":"en","target_lang":"es","creation_time":"2022-01-25T00:56:18.944299+00:00","entry_count":1}'
|
449
|
+
recorded_at: Tue, 25 Jan 2022 00:56:19 GMT
|
450
|
+
- request:
|
451
|
+
method: delete
|
452
|
+
uri: https://api-free.deepl.com/v2/glossaries/0d893a5f-a841-439b-8a25-ee7d67cb0451
|
453
|
+
body:
|
454
|
+
encoding: US-ASCII
|
455
|
+
string: ''
|
456
|
+
headers:
|
457
|
+
Authorization:
|
458
|
+
- DeepL-Auth-Key VALID_TOKEN
|
459
|
+
Accept-Encoding:
|
460
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
461
|
+
Accept:
|
462
|
+
- "*/*"
|
463
|
+
User-Agent:
|
464
|
+
- Ruby
|
465
|
+
response:
|
466
|
+
status:
|
467
|
+
code: 204
|
468
|
+
message: No Content
|
469
|
+
headers:
|
470
|
+
Server:
|
471
|
+
- nginx
|
472
|
+
Date:
|
473
|
+
- Tue, 25 Jan 2022 00:56:19 GMT
|
474
|
+
Connection:
|
475
|
+
- keep-alive
|
476
|
+
body:
|
477
|
+
encoding: UTF-8
|
478
|
+
string: ''
|
479
|
+
recorded_at: Tue, 25 Jan 2022 00:56:19 GMT
|
480
|
+
recorded_with: VCR 6.0.0
|