module Teamlab

Constants

VERSION

Attributes

config[R]

Public Class Methods

calendar() click to toggle source
# File lib/teamlab.rb, line 49
def self.calendar
  @calendar ||= Teamlab::Calendar.new
end
community() click to toggle source
# File lib/teamlab.rb, line 45
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)
  warn '[DEPRECATION] This gem has been renamed to `onlyoffice_api` and will no longer be supported. Please switch to `onlyoffice_api` gem as soon as possible.'
  @config ||= Config.new
  yield @config if block_given?
  auth_response = Teamlab::Request.new('authentication').post('', userName: @config.username, password: @config.password).body
  fail "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/teamlab.rb, line 41
def self.crm
  @crm ||= Teamlab::Crm.new
end
files() click to toggle source
# File lib/teamlab.rb, line 29
def self.files
  @files ||= Teamlab::Files.new
end
group() click to toggle source
# File lib/teamlab.rb, line 21
def self.group
  @group ||= Teamlab::Group.new
end
mail() click to toggle source
# File lib/teamlab.rb, line 53
def self.mail
  @mail ||= Teamlab::Mail.new
end
people() click to toggle source
# File lib/teamlab.rb, line 17
def self.people
  @people ||= Teamlab::People.new
end
portal() click to toggle source
# File lib/teamlab.rb, line 37
def self.portal
  @portal ||= Teamlab::Portal.new
end
project() click to toggle source
# File lib/teamlab.rb, line 33
def self.project
  @project ||= Teamlab::Project.new
end
settings() click to toggle source
# File lib/teamlab.rb, line 25
def self.settings
  @settings ||= Teamlab::Settings.new
end