Class: DeepL::GlossaryApi
- Inherits:
-
Object
- Object
- DeepL::GlossaryApi
- Defined in:
- lib/deepl/glossary_api.rb
Instance Method Summary collapse
- #create(name, source_lang, target_lang, entries, options = {}) ⇒ Object
- #destroy(glossary_id, options = {}) ⇒ Object
- #entries(glossary_id, options = {}) ⇒ Object
- #find(glossary_id, options = {}) ⇒ Object
-
#initialize(api, options = {}) ⇒ GlossaryApi
constructor
A new instance of GlossaryApi.
- #language_pairs(options = {}) ⇒ Object
- #list(options = {}) ⇒ Object
Constructor Details
#initialize(api, options = {}) ⇒ GlossaryApi
Returns a new instance of GlossaryApi.
8 9 10 11 |
# File 'lib/deepl/glossary_api.rb', line 8 def initialize(api, = {}) @api = api @options = end |
Instance Method Details
#create(name, source_lang, target_lang, entries, options = {}) ⇒ Object
13 14 15 16 |
# File 'lib/deepl/glossary_api.rb', line 13 def create(name, source_lang, target_lang, entries, = {}) DeepL::Requests::Glossary::Create.new(@api, name, source_lang, target_lang, entries, ) .request end |
#destroy(glossary_id, options = {}) ⇒ Object
18 19 20 |
# File 'lib/deepl/glossary_api.rb', line 18 def destroy(glossary_id, = {}) DeepL::Requests::Glossary::Destroy.new(@api, glossary_id, ).request end |
#entries(glossary_id, options = {}) ⇒ Object
22 23 24 |
# File 'lib/deepl/glossary_api.rb', line 22 def entries(glossary_id, = {}) DeepL::Requests::Glossary::Entries.new(@api, glossary_id, ).request end |
#find(glossary_id, options = {}) ⇒ Object
26 27 28 |
# File 'lib/deepl/glossary_api.rb', line 26 def find(glossary_id, = {}) DeepL::Requests::Glossary::Find.new(@api, glossary_id, ).request end |