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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50cea2c7a2d79ab3759604e73e2f4a66b27eb4e4
4
- data.tar.gz: c8978a341f333d97240d11eb3326ac78678775c1
3
+ metadata.gz: c495f31a55f95fbdf8ef2b3dbeab0727adbadf36
4
+ data.tar.gz: 02624e122eb9ea6ebae58909ab48cbc401d37d88
5
5
  SHA512:
6
- metadata.gz: 0fc3356564434895e3e7b01f9116c22a2c9efd3c8b1d2957c65ca4047b33d5060acf6ac0c86d9a495d2e3a8bf5e9e4aa14518c995ce9fa7542cfbbae417ebb42
7
- data.tar.gz: 42af21ac51b9b0486edf8266d1bccf89863e095a551728caacad54d84e4153b390358afa6e389187b2b4b08d7c1a9f9fd8d991cbf44ce663219962c2e808b19a
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
- puts @content_string['dirs']
37
+ @content_string['dirs']
38
38
  elsif @content_string.include? 'text'
39
- puts @content_string['text']
39
+ @content_string['text']
40
40
  else
41
- puts @content_string['lang']
41
+ @content_string['lang']
42
42
  end
43
43
  end
44
44
  end
@@ -1,3 +1,3 @@
1
1
  module YatranslateAPI
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.2"
3
3
  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.3.2
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-21 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler