Skip to content

Commit f7f5ba4

Browse files
committed
2.19.0
- New languages were added for getContext & getTranslation methods. These are Arabic, Hebrew, Japanese, Dutch, Portuguese, Romanian and Turkish. - Added languages' compability checker. There are some language combinations that are not supported (getContext and getTranslation methods only). - Added repository logotype. - Minor bug fixes and other improvements.
1 parent 18eafa1 commit f7f5ba4

File tree

10 files changed

+398
-72
lines changed

10 files changed

+398
-72
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# (Unofficial) Reverso API
2-
The API allows you to manipulate with your text in different ways. Almost all the features from the website are supported by this API. Currently supported: context, translation, spell check, synonyms.
1+
# Reverso API
2+
[![version](https://badgen.net/npm/v/reverso-api)](https://npmjs.com/package/reverso-api)
3+
[![downloads](https://badgen.net/npm/dm/reverso-api)](https://www.npmjs.com/package/reverso-api)
4+
[![telegram chat](https://img.shields.io/badge/Ask%20a%20Question-Telegram-blue)](https://t.me/reversoapi)
5+
6+
[![logotype](/assets/reversoapi-logo.png)](https://npmjs.com/package/reverso-api)
7+
8+
First of all, this API `is not official`! The API allows you to manipulate with your text in different ways. Almost all the features from the website are supported by this API. Currently supported: context, translation, spell check, synonyms.
39

410
## Navigation
511
- [Installing](#installing)
@@ -74,7 +80,7 @@ Error:
7480
{ method: String, error: String }
7581
```
7682

77-
_Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish, Chinese._
83+
_Available languages for this method: English, Arabic, German, Spanish, French, Hebrew, Italian, Japanese, Dutch, Polish, Portuguese, Romanian, Russian, Turkish, Chinese._
7884

7985
### `getSpellCheck`
8086
```javascript
@@ -135,9 +141,9 @@ Error:
135141
_Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish._
136142

137143
### `getTranslation`
138-
> **WARNING:** eventually, your server's IP address might get banned by Reverso moderators and you won't receive any data.
144+
> ⚠️ **WARNING:** eventually, your server's IP address might get banned by Reverso moderators and you won't receive any data.
139145
```javascript
140-
reverso.getTranslation('Hello', 'English', 'French', (response) => {
146+
reverso.getTranslation('how is going?', 'English', 'Chinese', (response) => {
141147
console.log(response);
142148
}).catch(err => {
143149
console.error(err);
@@ -173,8 +179,9 @@ Error:
173179
{ method: String, error: String }
174180
```
175181

176-
_Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish._
182+
_Available languages for this method: English, Arabic, German, Spanish, French, Hebrew, Italian, Japanese, Dutch, Polish, Portuguese, Romanian, Russian, Turkish, Chinese._
177183

178184
### Credits
179185
* All the data is fetched from [reverso.net](https://reverso.net).
180-
* Author of the API [@vychs](https://t.me/vychs).
186+
* Author of the API [@vychs](https://t.me/vychs).
187+
* Want to talk about the API? Join our [Telegram chat](https://t.me/reversoapi).

assets/reversoapi-logo.png

55.2 KB
Loading

example/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ reverso.getSynonyms('dzień dobry', 'Polish', (response) => {
3333
});
3434

3535
// getTranslation method example
36-
reverso.getTranslation('Hello', 'English', 'French', (response) => {
36+
reverso.getTranslation('how is going?', 'English', 'Chinese', (response) => {
3737
console.log(response);
3838
}).catch(err => {
3939
console.error(err);

package-lock.json

Lines changed: 25 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/languages/compatibility.json

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
[
2+
{
3+
"method": "context",
4+
"language": [
5+
{
6+
"name": "english",
7+
"compatible_with": [
8+
"arabic", "german", "spanish", "french",
9+
"hebrew", "italian", "japanese", "dutch",
10+
"polish", "portuguese", "romanian", "russian",
11+
"turkish", "chinese"
12+
]
13+
},
14+
{
15+
"name": "arabic",
16+
"compatible_with": [
17+
"english", "german", "spanish", "french",
18+
"hebrew", "italian", "portuguese", "russian",
19+
"turkish"
20+
]
21+
},
22+
{
23+
"name": "german",
24+
"compatible_with": [
25+
"arabic", "english", "spanish", "french",
26+
"hebrew", "italian", "japanese", "dutch",
27+
"polish", "portuguese", "romanian", "russian",
28+
"turkish"
29+
]
30+
},
31+
{
32+
"name": "spanish",
33+
"compatible_with": [
34+
"arabic", "german", "english", "french",
35+
"hebrew", "italian", "japanese", "dutch",
36+
"polish", "portuguese", "romanian", "russian",
37+
"turkish", "chinese"
38+
]
39+
},
40+
{
41+
"name": "french",
42+
"compatible_with": [
43+
"arabic", "german", "spanish", "english",
44+
"hebrew", "italian", "japanese", "dutch",
45+
"polish", "portuguese", "romanian", "russian",
46+
"turkish", "chinese"
47+
]
48+
},
49+
{
50+
"name": "hebrew",
51+
"compatible_with": [
52+
"arabic", "german", "spanish", "french",
53+
"english", "italian", "dutch", "portuguese",
54+
"russian"
55+
]
56+
},
57+
{
58+
"name": "italian",
59+
"compatible_with": [
60+
"arabic", "german", "spanish", "french",
61+
"hebrew", "english", "japanese", "dutch",
62+
"polish", "portuguese", "romanian", "russian",
63+
"turkish", "chinese"
64+
]
65+
},
66+
{
67+
"name": "japanese",
68+
"compatible_with": [
69+
"german", "spanish", "french", "italian",
70+
"english", "portuguese", "russian"
71+
]
72+
},
73+
{
74+
"name": "dutch",
75+
"compatible_with": [
76+
"german", "spanish", "french", "hebrew",
77+
"italian", "english", "portuguese", "russian"
78+
]
79+
},
80+
{
81+
"name": "polish",
82+
"compatible_with": [
83+
"german", "spanish", "french", "italian",
84+
"english"
85+
]
86+
},
87+
{
88+
"name": "portuguese",
89+
"compatible_with": [
90+
"arabic", "german", "spanish", "french",
91+
"hebrew", "italian", "japanese", "dutch",
92+
"english", "russian", "turkish"
93+
]
94+
},
95+
{
96+
"name": "romanian",
97+
"compatible_with": [
98+
"german", "spanish", "french",
99+
"italian", "english", "turkish"
100+
]
101+
},
102+
{
103+
"name": "russian",
104+
"compatible_with": [
105+
"arabic", "german", "spanish", "french",
106+
"hebrew", "italian", "japanese", "dutch",
107+
"portuguese", "english"
108+
]
109+
},
110+
{
111+
"name": "turkish",
112+
"compatible_with": [
113+
"arabic", "german", "spanish", "french",
114+
"italian", "portuguese", "romanian",
115+
"english"
116+
]
117+
},
118+
{
119+
"name": "chinese",
120+
"compatible_with": [
121+
"english", "spanish", "french"
122+
]
123+
}
124+
]
125+
},
126+
{
127+
"method": "translation",
128+
"language": [
129+
{
130+
"name": "english",
131+
"compatible_with": [
132+
"arabic", "german", "spanish", "french",
133+
"hebrew", "italian", "japanese", "dutch",
134+
"polish", "portuguese", "romanian", "russian",
135+
"turkish", "chinese"
136+
]
137+
},
138+
{
139+
"name": "arabic",
140+
"compatible_with": [
141+
"english", "german", "spanish", "french",
142+
"hebrew", "italian", "japanese", "dutch",
143+
"polish", "portuguese", "romanian", "russian",
144+
"turkish", "chinese"
145+
]
146+
},
147+
{
148+
"name": "german",
149+
"compatible_with": [
150+
"arabic", "english", "spanish", "french",
151+
"hebrew", "italian", "japanese", "dutch",
152+
"polish", "portuguese", "romanian", "russian",
153+
"turkish", "chinese"
154+
]
155+
},
156+
{
157+
"name": "spanish",
158+
"compatible_with": [
159+
"arabic", "german", "english", "french",
160+
"hebrew", "italian", "japanese", "dutch",
161+
"polish", "portuguese", "romanian", "russian",
162+
"turkish", "chinese"
163+
]
164+
},
165+
{
166+
"name": "french",
167+
"compatible_with": [
168+
"arabic", "german", "spanish", "english",
169+
"hebrew", "italian", "japanese", "dutch",
170+
"polish", "portuguese", "romanian", "russian",
171+
"turkish", "chinese"
172+
]
173+
},
174+
{
175+
"name": "hebrew",
176+
"compatible_with": [
177+
"arabic", "german", "spanish", "french",
178+
"english", "italian", "japanese", "dutch",
179+
"polish", "portuguese", "romanian", "russian",
180+
"turkish", "chinese"
181+
]
182+
},
183+
{
184+
"name": "italian",
185+
"compatible_with": [
186+
"arabic", "german", "spanish", "french",
187+
"hebrew", "english", "japanese", "dutch",
188+
"polish", "portuguese", "romanian", "russian",
189+
"turkish", "chinese"
190+
]
191+
},
192+
{
193+
"name": "japanese",
194+
"compatible_with": [
195+
"arabic", "german", "spanish", "french",
196+
"hebrew", "italian", "english", "dutch",
197+
"polish", "portuguese", "romanian", "russian",
198+
"turkish", "chinese"
199+
]
200+
},
201+
{
202+
"name": "dutch",
203+
"compatible_with": [
204+
"arabic", "german", "spanish", "french",
205+
"hebrew", "italian", "japanese", "english",
206+
"polish", "portuguese", "romanian", "russian",
207+
"turkish", "chinese"
208+
]
209+
},
210+
{
211+
"name": "polish",
212+
"compatible_with": [
213+
"arabic", "german", "spanish", "french",
214+
"hebrew", "italian", "japanese", "dutch",
215+
"english", "portuguese", "romanian", "russian",
216+
"turkish", "chinese"
217+
]
218+
},
219+
{
220+
"name": "portuguese",
221+
"compatible_with": [
222+
"arabic", "german", "spanish", "french",
223+
"hebrew", "italian", "japanese", "dutch",
224+
"polish", "english", "romanian", "russian",
225+
"turkish", "chinese"
226+
]
227+
},
228+
{
229+
"name": "romanian",
230+
"compatible_with": [
231+
"arabic", "german", "spanish", "french",
232+
"hebrew", "italian", "japanese", "dutch",
233+
"polish", "portuguese", "english", "russian",
234+
"turkish", "chinese"
235+
]
236+
},
237+
{
238+
"name": "russian",
239+
"compatible_with": [
240+
"arabic", "german", "spanish", "french",
241+
"hebrew", "italian", "japanese", "dutch",
242+
"polish", "portuguese", "romanian", "english",
243+
"turkish", "chinese"
244+
]
245+
},
246+
{
247+
"name": "turkish",
248+
"compatible_with": [
249+
"arabic", "german", "spanish", "french",
250+
"hebrew", "italian", "japanese", "dutch",
251+
"polish", "portuguese", "romanian", "russian",
252+
"english", "chinese"
253+
]
254+
},
255+
{
256+
"name": "chinese",
257+
"compatible_with": [
258+
"arabic", "german", "spanish", "french",
259+
"hebrew", "italian", "japanese", "dutch",
260+
"polish", "portuguese", "romanian", "russian",
261+
"turkish", "english"
262+
]
263+
}
264+
]
265+
}
266+
]

0 commit comments

Comments
 (0)