module Teamlab

Constants

NAME
VERSION

Attributes

config[R]

Public Class Methods

calendar() click to toggle source
# File lib/onlyoffice_api.rb, line 54
def self.calendar
  @calendar ||= Teamlab::Calendar.new
end
community() click to toggle source
# File lib/onlyoffice_api.rb, line 50
def self.community
  @community ||= Teamlab::Community.new
end
config() click to toggle source
# File lib/teamlab/config.rb, line 18
def self.config
  @config ||= Config.new
end
configure() { |config| ... } click to toggle source
# File lib/teamlab/config.rb, line 8
def self.configure(&block)
  @config ||= Config.new
  yield @config if block
  auth_response = Teamlab::Request.new(nil, '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
crm() click to toggle source
# File lib/onlyoffice_api.rb, line 46
def self.crm
  @crm ||= Teamlab::Crm.new
end
feed() click to toggle source
# File lib/onlyoffice_api.rb, line 66
def self.feed
  @feed ||= Teamlab::Feed.new
end
files() click to toggle source
# File lib/onlyoffice_api.rb, line 34
def self.files
  @files ||= Teamlab::Files.new
end
group() click to toggle source
# File lib/onlyoffice_api.rb, line 26
def self.group
  @group ||= Teamlab::Group.new
end
mail() click to toggle source
# File lib/onlyoffice_api.rb, line 58
def self.mail
  @mail ||= Teamlab::Mail.new
end
mailserver() click to toggle source
# File lib/onlyoffice_api.rb, line 62
def self.mailserver
  @mailserver ||= Teamlab::MailServer.new
end
people() click to toggle source
# File lib/onlyoffice_api.rb, line 22
def self.people
  @people ||= Teamlab::People.new
end
portal() click to toggle source
# File lib/onlyoffice_api.rb, line 42
def self.portal
  @portal ||= Teamlab::Portal.new
end
project() click to toggle source
# File lib/onlyoffice_api.rb, line 38
def self.project
  @project ||= Teamlab::Project.new
end
settings() click to toggle source
# File lib/onlyoffice_api.rb, line 30
def self.settings
  @settings ||= Teamlab::Settings.new
end