Class: Teamlab::OnlyofficeApiInstance
- Inherits:
-
Object
- Object
- Teamlab::OnlyofficeApiInstance
- Defined in:
- lib/onlyoffice_api/onlyoffice_api_instance.rb
Overview
Class for multiuser instance
Instance Method Summary collapse
- #calendar ⇒ Object
- #community ⇒ Object
- #crm ⇒ Object
- #feed ⇒ Object
- #files ⇒ Object
- #group ⇒ Object
-
#initialize(params = {}) ⇒ OnlyofficeApiInstance
constructor
A new instance of OnlyofficeApiInstance.
- #mail ⇒ Object
- #mailserver ⇒ Object
- #people ⇒ Object
- #portal ⇒ Object
- #project ⇒ Object
- #settings ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ OnlyofficeApiInstance
Returns a new instance of OnlyofficeApiInstance.
8 9 10 11 12 13 14 15 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 8 def initialize(params = {}) @config = Config.new(params) auth_response = Teamlab::Request.new(@config, 'authentication').post('', userName: @config.username, password: @config.password).body raise "Cannot get response token for #{auth_response}" if auth_response['response'].nil? || auth_response['response']['token'].nil? @config.token = auth_response['response']['token'] @config.headers = { 'authorization' => @config.token } end |
Instance Method Details
#calendar ⇒ Object
49 50 51 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 49 def calendar @calendar ||= Teamlab::Calendar.new(@config) end |
#community ⇒ Object
45 46 47 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 45 def community @community ||= Teamlab::Community.new(@config) end |
#crm ⇒ Object
41 42 43 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 41 def crm @crm ||= Teamlab::Crm.new(@config) end |
#feed ⇒ Object
61 62 63 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 61 def feed @feed ||= Teamlab::Feed.new(@config) end |
#files ⇒ Object
29 30 31 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 29 def files @files ||= Teamlab::Files.new(@config) end |
#group ⇒ Object
21 22 23 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 21 def group @group ||= Teamlab::Group.new(@config) end |
#mail ⇒ Object
53 54 55 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 53 def mail @mail ||= Teamlab::Mail.new(@config) end |
#mailserver ⇒ Object
57 58 59 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 57 def mailserver @mailserver ||= Teamlab::MailServer.new(@config) end |
#people ⇒ Object
17 18 19 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 17 def people @people ||= Teamlab::People.new(@config) end |
#portal ⇒ Object
37 38 39 |
# File 'lib/onlyoffice_api/onlyoffice_api_instance.rb', line 37 def portal @portal ||= Teamlab::Portal.new(@config) end |