YatranslateAPI 0.3.2 → 0.4.2
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/lib/yatranslateAPI/client.rb +4 -1
- data/lib/yatranslateAPI/gateway.rb +3 -3
- data/lib/yatranslateAPI/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c495f31a55f95fbdf8ef2b3dbeab0727adbadf36
|
4
|
+
data.tar.gz: 02624e122eb9ea6ebae58909ab48cbc401d37d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8beb84d1ac20e8c450a820176fc313c1d82a42d93808c1f9f46ae9bf5c23151891523472802aaffbbfec8f72cc91de630bc0bb72ffe72ed47b88a619cb1fa2f
|
7
|
+
data.tar.gz: 7ea59f55752b9563a83bc06b4e4be4e951eeeb6ecfc7e526fa691fc0d44583e3c00944e96d267b00982d6d3a074e99a1db1c277d95464c3b595ea5a2624f9b30
|
@@ -17,11 +17,12 @@ module YatranslateAPI
|
|
17
17
|
&key=#{@api_key}"
|
18
18
|
|
19
19
|
@request.send_request('getLangs', params)
|
20
|
+
@request.get_request
|
20
21
|
end
|
21
22
|
|
22
23
|
def print_result
|
23
24
|
begin
|
24
|
-
@request.get_request
|
25
|
+
puts @request.get_request
|
25
26
|
rescue => exception
|
26
27
|
puts 'Request not found!'
|
27
28
|
end
|
@@ -36,6 +37,7 @@ module YatranslateAPI
|
|
36
37
|
&key=#{@api_key}"
|
37
38
|
|
38
39
|
@request.send_request('detect', params)
|
40
|
+
@request.get_request
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -46,6 +48,7 @@ module YatranslateAPI
|
|
46
48
|
&key=#{@api_key}"
|
47
49
|
|
48
50
|
@request.send_request('translate', params)
|
51
|
+
@request.get_request
|
49
52
|
end
|
50
53
|
end
|
51
54
|
end
|
@@ -34,11 +34,11 @@ module YatranslateAPI
|
|
34
34
|
@content_string = JSON.parse(@res.content)
|
35
35
|
|
36
36
|
if @content_string.include? 'dirs'
|
37
|
-
|
37
|
+
@content_string['dirs']
|
38
38
|
elsif @content_string.include? 'text'
|
39
|
-
|
39
|
+
@content_string['text']
|
40
40
|
else
|
41
|
-
|
41
|
+
@content_string['lang']
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: YatranslateAPI
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GeorSh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|