Module: Teamlab
- Defined in:
- lib/teamlab.rb,
lib/teamlab/config.rb,
lib/teamlab/request.rb,
lib/teamlab/version.rb,
lib/teamlab/response.rb,
lib/teamlab/modules/crm.rb,
lib/teamlab/modules/mail.rb,
lib/teamlab/modules/files.rb,
lib/teamlab/modules/group.rb,
lib/teamlab/modules/people.rb,
lib/teamlab/modules/portals.rb,
lib/teamlab/modules/project.rb,
lib/teamlab/modules/calendar.rb,
lib/teamlab/modules/settings.rb,
lib/teamlab/modules/community.rb
Defined Under Namespace
Classes: Calendar, Community, Config, Crm, Files, Group, Mail, People, Portal, Project, Request, Response, Settings
Constant Summary
collapse
- VERSION =
'0.6'
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
6
7
8
|
# File 'lib/teamlab/config.rb', line 6
def config
@config
end
|
Class Method Details
.calendar ⇒ Object
49
50
51
|
# File 'lib/teamlab.rb', line 49
def self.calendar
@calendar ||= Teamlab::Calendar.new
end
|
.config ⇒ Object
18
19
20
|
# File 'lib/teamlab/config.rb', line 18
def self.config
@config ||= Config.new
end
|
8
9
10
11
12
13
14
15
16
|
# 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. = { 'authorization' => @config.token }
end
|
.crm ⇒ Object
41
42
43
|
# File 'lib/teamlab.rb', line 41
def self.crm
@crm ||= Teamlab::Crm.new
end
|
.files ⇒ Object
29
30
31
|
# File 'lib/teamlab.rb', line 29
def self.files
@files ||= Teamlab::Files.new
end
|
.group ⇒ Object
21
22
23
|
# File 'lib/teamlab.rb', line 21
def self.group
@group ||= Teamlab::Group.new
end
|
.mail ⇒ Object
53
54
55
|
# File 'lib/teamlab.rb', line 53
def self.mail
@mail ||= Teamlab::Mail.new
end
|
.people ⇒ Object
17
18
19
|
# File 'lib/teamlab.rb', line 17
def self.people
@people ||= Teamlab::People.new
end
|
.portal ⇒ Object
37
38
39
|
# File 'lib/teamlab.rb', line 37
def self.portal
@portal ||= Teamlab::Portal.new
end
|
.project ⇒ Object
33
34
35
|
# File 'lib/teamlab.rb', line 33
def self.project
@project ||= Teamlab::Project.new
end
|
.settings ⇒ Object
25
26
27
|
# File 'lib/teamlab.rb', line 25
def self.settings
@settings ||= Teamlab::Settings.new
end
|