Class: DictionaryAPI::DictionaryAPI::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/dictionary_api/client.rb

Constant Summary collapse

BASE_URL =
"https://dictionary.yandex.net/api/v1/dicservice.json/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



7
8
9
# File 'lib/dictionary_api/client.rb', line 7

def api_key
  @api_key
end

Instance Method Details

#execute(path, options = {}) ⇒ Object



11
12
13
14
# File 'lib/dictionary_api/client.rb', line 11

def execute(path, options = {})
	response = HTTPClient.post(BASE_URL + path, options)	
	self.check_errors(response)
end