yandex_dictionary_api 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,20 +14,11 @@ module YandexDictionaryApi
|
|
14
14
|
def execute(str_req_type, params_hash)
|
15
15
|
str_request = BASE_URI + "/#{str_req_type}?"
|
16
16
|
params_hash["key"] = @api_key
|
17
|
-
#str_request = self.add_parameters_to_request(str_request, params_hash)
|
18
17
|
self.exec_request_http(str_request, params_hash)
|
19
18
|
end
|
20
19
|
|
21
20
|
protected
|
22
21
|
|
23
|
-
def add_parameters_to_request(str_request, params_hash)
|
24
|
-
str_res = str_request + "key=#{@api_key}"
|
25
|
-
params_hash.each do |(key, value)|
|
26
|
-
str_res += "&#{key}=#{value}"
|
27
|
-
end
|
28
|
-
str_res
|
29
|
-
end
|
30
|
-
|
31
22
|
def exec_request_http(str_uri, params_hash)
|
32
23
|
@http_client.post(str_uri, params_hash)
|
33
24
|
end
|