Class: WatsonLanguage::Model
- Inherits:
-
ActiveMethod::Base
- Object
- ActiveMethod::Extra
- ActiveMethod::Base
- WatsonLanguage::Model
- Defined in:
- lib/watson-language-translator/model.rb
Instance Attribute Summary
Attributes inherited from ActiveMethod::Base
#http_method, #json_result, #options, #password, #text, #username
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ActiveMethod::Base
#fetch_http_method, #initialize, #params_addressable, #request
Methods included from Generators::LanguageRequest
#base_url_request, #json_parser, #rest_client_api
Methods inherited from ActiveMethod::Extra
Constructor Details
This class inherits a constructor from WatsonLanguage::ActiveMethod::Base
Class Method Details
.create(options = {}) ⇒ Object
6 7 8 |
# File 'lib/watson-language-translator/model.rb', line 6 def self.create(={}) self.new(nil, ) end |
.delete(options = {}) ⇒ Object
10 11 12 |
# File 'lib/watson-language-translator/model.rb', line 10 def self.delete(={}) self.new(nil, ) end |
Instance Method Details
#endpoint ⇒ Object
14 15 16 17 18 19 |
# File 'lib/watson-language-translator/model.rb', line 14 def endpoint return url = "models/#{@options[:model_id]}" if @options[:model_id] url = "models" url << "&#{params_addressable}" unless params_addressable.empty? url end |