onlyoffice_api 0.12.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/teamlab/modules/crm/crm_common.rb +19 -1
- data/lib/teamlab/modules/crm/crm_contacts.rb +31 -0
- data/lib/teamlab/modules/crm/crm_invoices.rb +14 -0
- data/lib/teamlab/modules/crm/crm_opportunities.rb +7 -0
- data/lib/teamlab/modules/crm/crm_tags.rb +9 -0
- data/lib/teamlab/modules/people/people_reassign.rb +4 -1
- data/lib/teamlab/modules/people/people_remove.rb +27 -0
- data/lib/teamlab/modules/people.rb +28 -4
- data/lib/teamlab/modules/portals.rb +6 -0
- data/lib/teamlab/modules/projects/projects_comments.rb +16 -0
- data/lib/teamlab/modules/projects/projects_discussions.rb +14 -0
- data/lib/teamlab/modules/projects/projects_milestones.rb +37 -0
- data/lib/teamlab/modules/projects/projects_projects.rb +7 -12
- data/lib/teamlab/modules/projects/projects_reports.rb +7 -0
- data/lib/teamlab/modules/projects/projects_settings.rb +11 -0
- data/lib/teamlab/response.rb +12 -0
- data/lib/teamlab/version.rb +1 -1
- metadata +33 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f8c8455b783aef58695e2f11ac059804435a6be117b76b453cdebd0a996e41a
|
4
|
+
data.tar.gz: 46cf0de4e5b2a8a8ad1215c7f86f50d182b5b4bcc1f364054c50015a0b522123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88170f761bb8384014573a865dc1e5d2614054bf8e7f4e032f36b043160763ad2d6226cf4151cd145a7b8cfc42a1313fd6a7670e8fa532298cad3c49c32ac00
|
7
|
+
data.tar.gz: ffa186f53c8b0077ca1af6e04495c6a83992a02f02cc861a8a6f26335fc4f022f2a1ecc3a9555a2a5a0ea5537dd6fd710dbeebfa96d92ebf3e3e1281f0a5f6c9
|
@@ -23,7 +23,7 @@ module Teamlab
|
|
23
23
|
@request.get(%w[currency rates], {})
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def create_currency_rate(from = 'EUR', to = 'USD', rate = '1.0')
|
27
27
|
@request.post(%w[currency rates], fromCurrency: from, toCurrency: to, rate: rate)
|
28
28
|
end
|
29
29
|
|
@@ -31,6 +31,14 @@ module Teamlab
|
|
31
31
|
@request.get(['currency', 'rates', id.to_s], {})
|
32
32
|
end
|
33
33
|
|
34
|
+
# Get currency rate by currencies
|
35
|
+
# @param from_currency [String] rate from currency
|
36
|
+
# @param to_currency [String] rate to currency
|
37
|
+
# @return [Hash] currency rate data
|
38
|
+
def get_currency_rate_by_currency(from_currency, to_currency)
|
39
|
+
@request.get(['currency', 'rates', from_currency.to_s, to_currency.to_s])
|
40
|
+
end
|
41
|
+
|
34
42
|
def delete_currency_rate_by_id(id)
|
35
43
|
@request.delete(['currency', 'rates', id.to_s], {})
|
36
44
|
end
|
@@ -38,5 +46,15 @@ module Teamlab
|
|
38
46
|
def set_is_portal_configured(options = {})
|
39
47
|
@request.put(%w[settings], options)
|
40
48
|
end
|
49
|
+
|
50
|
+
# Update currency rate object
|
51
|
+
# @param id [String] id of rate currency
|
52
|
+
# @param from [String] rate from currency
|
53
|
+
# @param to [String] rate to currency
|
54
|
+
# @param rate [String] currency rate
|
55
|
+
# @return [Hash] currency and rate data
|
56
|
+
def update_currency_rate(id, from, to, rate)
|
57
|
+
@request.put(['currency', 'rates', id.to_s], fromCurrency: from, toCurrency: to, rate: rate)
|
58
|
+
end
|
41
59
|
end
|
42
60
|
end
|
@@ -139,6 +139,13 @@ module Teamlab
|
|
139
139
|
@request.get(['contact', 'company', company_id.to_s, 'person'])
|
140
140
|
end
|
141
141
|
|
142
|
+
# Returns the detailed information about the contacts Email, Phone, Web Site/Social Networks and Address information with the ID
|
143
|
+
# @param contact_id [String] Contact ID
|
144
|
+
# @return [Hash] Contact information
|
145
|
+
def get_contact_information(contact_id)
|
146
|
+
@request.get(['contact', contact_id.to_s, 'data'])
|
147
|
+
end
|
148
|
+
|
142
149
|
def get_contact_information_by_type(contact_id, info_type)
|
143
150
|
@request.get(['contact', contact_id.to_s, 'data', info_type.to_s])
|
144
151
|
end
|
@@ -192,6 +199,13 @@ module Teamlab
|
|
192
199
|
@request.put(['contact', contact_id.to_s, 'access'], options)
|
193
200
|
end
|
194
201
|
|
202
|
+
# Returns access rights to the contact with the ID specified in the request
|
203
|
+
# @param contact_id [String] Contact ID
|
204
|
+
# @return [Array] List of contacts
|
205
|
+
def get_contact_access_rights(contact_id)
|
206
|
+
@request.get(['contact', contact_id.to_s, 'access'])
|
207
|
+
end
|
208
|
+
|
195
209
|
def update_company(company_id, company_name, options = {})
|
196
210
|
@request.put(['contact', 'company', company_id.to_s], { companyName: company_name.to_s }.merge(options))
|
197
211
|
end
|
@@ -239,5 +253,22 @@ module Teamlab
|
|
239
253
|
def remove_contact_from_project(contact_id, project_id)
|
240
254
|
@request.delete(['contact', contact_id.to_s, 'project', project_id.to_s])
|
241
255
|
end
|
256
|
+
|
257
|
+
# Adds the address information to the contact with the selected ID
|
258
|
+
# @param contact_id [String] Contact ID
|
259
|
+
# @param address [Hash] Contact address parameters: street, city, state, zip, country, isPrimary
|
260
|
+
# @return [Hash] Contact information
|
261
|
+
def add_address_info(contact_id, address = {})
|
262
|
+
@request.post(['contact', contact_id.to_s, 'addressdata'], { address: address })
|
263
|
+
end
|
264
|
+
|
265
|
+
# Updates the address information with the parameters specified in the request for the contact with the selected ID
|
266
|
+
# @param contact_id [String] Contact ID
|
267
|
+
# @param info_id [String] Contact information record ID
|
268
|
+
# @param address [Hash] Contact address parameters: street, city, state, zip, country, isPrimary
|
269
|
+
# @return [Hash] Contact information
|
270
|
+
def update_address_info(contact_id, info_id, address = {})
|
271
|
+
@request.put(['contact', contact_id.to_s, 'addressdata', info_id.to_s], { address: address })
|
272
|
+
end
|
242
273
|
end
|
243
274
|
end
|
@@ -117,5 +117,19 @@ module Teamlab
|
|
117
117
|
def get_invoice_item_by_id(invoice_item_id)
|
118
118
|
@request.get(['invoiceitem', invoice_item_id])
|
119
119
|
end
|
120
|
+
|
121
|
+
# Returns the existence of an invoice with the number specified in the request
|
122
|
+
# @param number [String] Invoice number
|
123
|
+
# @return [Boolean] Invoice existence
|
124
|
+
def check_invoice_existence_by_number(number)
|
125
|
+
@request.get(%w[invoice bynumber exist], number: number)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Returns the detailed information about an invoice with the number specified in the request
|
129
|
+
# @param number [String] Invoice number
|
130
|
+
# @return [Hash] Invoice data
|
131
|
+
def get_invoice_by_number(number)
|
132
|
+
@request.get(%w[invoice bynumber], number: number)
|
133
|
+
end
|
120
134
|
end
|
121
135
|
end
|
@@ -23,6 +23,13 @@ module Teamlab
|
|
23
23
|
@request.get(['opportunity', opportunity_id.to_s, 'contact'])
|
24
24
|
end
|
25
25
|
|
26
|
+
# Returns a list of all the opportunities for the contact with the ID specified in the request
|
27
|
+
# @param contact_id [String, Integer] Contact ID
|
28
|
+
# @return [Array] List of opportunities
|
29
|
+
def get_contact_opportunities(contact_id)
|
30
|
+
@request.get(['opportunity', 'bycontact', contact_id.to_s])
|
31
|
+
end
|
32
|
+
|
26
33
|
def create_opportunity(stage_id, title, responsible_id, options = {})
|
27
34
|
options[:bidCurrencyAbbr] ||= 'USD'
|
28
35
|
@request.post(%w[opportunity], { stageId: stage_id, title: title, responsibleid: responsible_id }.merge(options))
|
@@ -50,5 +50,14 @@ module Teamlab
|
|
50
50
|
def add_contact_tag_to_group(entity_type, entity_id, tag)
|
51
51
|
@request.post([entity_type.to_s, entity_id.to_s, 'tag', 'group'], tagName: tag)
|
52
52
|
end
|
53
|
+
|
54
|
+
# Deletes the selected tag from the entity (company or person) specified in the request and from all the related contacts
|
55
|
+
# @param entity_type [String, Symbol] Entity type
|
56
|
+
# @param entity_id [String] Entity ID
|
57
|
+
# @param tag [String] Tag name
|
58
|
+
# @return [String] Tag name
|
59
|
+
def delete_contact_tag_of_group(entity_type, entity_id, tag)
|
60
|
+
@request.delete([entity_type.to_s, entity_id, 'tag', 'group'], tagName: tag)
|
61
|
+
end
|
53
62
|
end
|
54
63
|
end
|
@@ -7,18 +7,21 @@ module Teamlab
|
|
7
7
|
# @param from_user_id [String] guid of user from whom reassign
|
8
8
|
# @param to_user_id [String] guid of user to whom reassign
|
9
9
|
# @param delete_profile [True, False] Delete profile when reassignment will be finished
|
10
|
+
# @return [Hash] reassign progress data
|
10
11
|
def start_reassign_user_data(from_user_id, to_user_id, delete_profile = true)
|
11
12
|
@request.post(%w[reassign start], fromUserId: from_user_id, toUserId: to_user_id, deleteProfile: delete_profile)
|
12
13
|
end
|
13
14
|
|
14
15
|
# Returns the progress of the started reassign process
|
15
16
|
# @param from_user_id [String] User ID (guid) whose data is reassigned
|
16
|
-
|
17
|
+
# @return [Hash] reassign progress data
|
18
|
+
def reassign_progress(from_user_id)
|
17
19
|
@request.get(%w[reassign progress], userId: from_user_id)
|
18
20
|
end
|
19
21
|
|
20
22
|
# Terminate reassign process
|
21
23
|
# @param user_id [String] User ID (guid) whose data is reassigned
|
24
|
+
# @return [Void]
|
22
25
|
def terminate_reassign(user_id)
|
23
26
|
@request.put(%w[reassign terminate], userId: user_id)
|
24
27
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Teamlab
|
4
|
+
# Module for people removing process
|
5
|
+
module PeopleRemove
|
6
|
+
# Start a remove process
|
7
|
+
# @param userId [String] guid of user to remove
|
8
|
+
# @return [Hash] remove progress data
|
9
|
+
def start_remove(user_id)
|
10
|
+
@request.post(%w[remove start], userId: user_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns the progress of the started remove process
|
14
|
+
# @param userId [String] guid of user to remove
|
15
|
+
# @return [Hash] remove progress data
|
16
|
+
def remove_progress(user_id)
|
17
|
+
@request.get(%w[remove progress], userId: user_id)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Terminate remove process
|
21
|
+
# @param userId [String] guid of user to remove
|
22
|
+
# @return [Void]
|
23
|
+
def terminate_remove(user_id)
|
24
|
+
@request.put(%w[remove terminate], userId: user_id)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'people/people_reassign'
|
4
|
+
require_relative 'people/people_remove'
|
4
5
|
module Teamlab
|
5
6
|
class People
|
6
7
|
include PeopleReassign
|
8
|
+
include PeopleRemove
|
7
9
|
|
8
10
|
def initialize(config = nil)
|
9
11
|
@request = Teamlab::Request.new(config, 'people')
|
@@ -45,10 +47,6 @@ module Teamlab
|
|
45
47
|
@request.post(nil, { isVisitor: is_visitor, email: email, firstname: firstname, lastname: lastname }.merge(options))
|
46
48
|
end
|
47
49
|
|
48
|
-
def active(options = {})
|
49
|
-
@request.post(['active'], options) # TODO: need some fixing
|
50
|
-
end
|
51
|
-
|
52
50
|
def update_contacts(user_id, contacts = {})
|
53
51
|
@request.post([user_id, 'contacts'], contacts)
|
54
52
|
end
|
@@ -100,5 +98,31 @@ module Teamlab
|
|
100
98
|
def unlink_account(provider)
|
101
99
|
@request.delete([%w[thirdparty unlinkaccount]], provider: provider)
|
102
100
|
end
|
101
|
+
|
102
|
+
# Return the detailed information about the profile of the user with the email specified in the request
|
103
|
+
# @param email [String] User email
|
104
|
+
# @return [Hash] result user search by email
|
105
|
+
def get_user_by_email(email)
|
106
|
+
@request.get(['email'], email: email)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Get user photos
|
110
|
+
# @param userid [String] User ID
|
111
|
+
# @return [Hash] result user photos
|
112
|
+
def get_user_photoes(user_id)
|
113
|
+
@request.get([user_id, 'photo'])
|
114
|
+
end
|
115
|
+
|
116
|
+
# Send instructions for delete user own profile
|
117
|
+
# @return [Void] send `Deletion of your profile` letter
|
118
|
+
def send_delete_instruction
|
119
|
+
@request.put(%w[self delete])
|
120
|
+
end
|
121
|
+
|
122
|
+
# Join to affiliate programme
|
123
|
+
# @return [String] link to affiliate programme
|
124
|
+
def join_to_affiliate_programme
|
125
|
+
@request.put(%w[self joinaffiliate])
|
126
|
+
end
|
103
127
|
end
|
104
128
|
end
|
@@ -13,5 +13,11 @@ module Teamlab
|
|
13
13
|
def invite_visitor_url
|
14
14
|
@request.get(%w[users invite visitor])
|
15
15
|
end
|
16
|
+
|
17
|
+
# Deletes the current portal immediately
|
18
|
+
# WARNING: Do not test this method in specs in this project
|
19
|
+
def delete_portal
|
20
|
+
@request.delete(%w[deleteportalimmediately])
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
@@ -30,5 +30,21 @@ module Teamlab
|
|
30
30
|
def delete_comment(comment_id)
|
31
31
|
@request.delete(['comment', comment_id.to_s])
|
32
32
|
end
|
33
|
+
|
34
|
+
# Adds a project comment with the parameters specified in the request
|
35
|
+
# @param entity_id [String] Entity ID
|
36
|
+
# @param content [String] Comment text
|
37
|
+
# @param type [String, Symbol] Comment type (message or task)
|
38
|
+
# @return [Hash] Comment information
|
39
|
+
def add_project_comment(entity_id, content, type, options = {})
|
40
|
+
@request.post(%w[comment], { entityid: entity_id, content: content, type: type.to_s }.merge(options))
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get a preview of a project comment with the ID specified in the request
|
44
|
+
# @param htmltext [String] Comment text in the HTML format
|
45
|
+
# @return [Hash] Comment information
|
46
|
+
def get_a_comment_preview(htmltext, options = {})
|
47
|
+
@request.post(%w[comment preview], { htmltext: htmltext }.merge(options))
|
48
|
+
end
|
33
49
|
end
|
34
50
|
end
|
@@ -39,8 +39,22 @@ module Teamlab
|
|
39
39
|
@request.put(['message', message_id.to_s, 'subscribe'])
|
40
40
|
end
|
41
41
|
|
42
|
+
# Returns a list of all the subscribers of the discussion with the selected message
|
43
|
+
# @param message_id [Integer, String] Message ID
|
44
|
+
# @return [Array] List of subscibers
|
45
|
+
def discussion_subscribers(message_id)
|
46
|
+
@request.get(['message', message_id.to_s, 'subscribes'])
|
47
|
+
end
|
48
|
+
|
42
49
|
def delete_message(message_id)
|
43
50
|
@request.delete(['message', message_id.to_s])
|
44
51
|
end
|
52
|
+
|
53
|
+
# Returns a preview of the discussion message
|
54
|
+
# @param [String] Message text in the HTML format
|
55
|
+
# @return [Hash] Message preview
|
56
|
+
def preview_of_discussion_message(htmltext)
|
57
|
+
@request.post(%w[message discussion preview], htmltext: htmltext)
|
58
|
+
end
|
45
59
|
end
|
46
60
|
end
|
@@ -31,6 +31,36 @@ module Teamlab
|
|
31
31
|
@request.get(['milestone', year.to_s, month.to_s, day.to_s])
|
32
32
|
end
|
33
33
|
|
34
|
+
# Returns a list of all the milestones within a project with the ID specified in the request
|
35
|
+
# @param project_id [Symbol, String] Project ID
|
36
|
+
# @return [Array] List of milestones
|
37
|
+
def milestones_by_project_id(project_id)
|
38
|
+
@request.get([project_id.to_s, 'milestone'])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns a list of all the milestones within a project with the ID and status specified in the request
|
42
|
+
# @param project_id [Symbol, String] Project ID
|
43
|
+
# @param status [Symbol, String] Milestone status
|
44
|
+
# @return [Array] List of milestones
|
45
|
+
def milestones_by_project_id_and_status(project_id, status)
|
46
|
+
@request.get([project_id.to_s, 'milestone', status.to_s])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Adds a new milestone using the parameters (project ID, milestone title, deadline, etc) specified in the request
|
50
|
+
# @param project_id [Symbol, String] Project ID
|
51
|
+
# @param title [String] Milestone title
|
52
|
+
# @param deadline [String] Milestone deadline
|
53
|
+
# @param responsible_id [String] Milestone responsible
|
54
|
+
# @param options [Hash] options to create a Milestone with
|
55
|
+
# @option isKey [Boolean] Specifies if this is a key milestone or not
|
56
|
+
# @option isNotify [Boolean] Reminds me 48 hours before the milestone due date
|
57
|
+
# @option description [String] Milestone description
|
58
|
+
# @option notifyResponsible [Boolean] Notifies the responsible about the milestone actions or not
|
59
|
+
# @return [Hash] Added milestone
|
60
|
+
def add_milestone(project_id, title, deadline, responsible_id, options = {})
|
61
|
+
@request.post([project_id.to_s, 'milestone'], { title: title, deadline: deadline, responsible: responsible_id }.merge(options))
|
62
|
+
end
|
63
|
+
|
34
64
|
def update_milestone(id, title, deadline, options = {})
|
35
65
|
@request.put(['milestone', id.to_s], { title: title, deadline: deadline }.merge(options))
|
36
66
|
end
|
@@ -42,5 +72,12 @@ module Teamlab
|
|
42
72
|
def delete_milestone(id)
|
43
73
|
@request.delete(['milestone', id.to_s])
|
44
74
|
end
|
75
|
+
|
76
|
+
# Deletes the milestones with the IDs specified in the request
|
77
|
+
# @param ids [Array] Milestone IDs
|
78
|
+
# @return [Array] Deleted milestones
|
79
|
+
def delete_milestones(ids)
|
80
|
+
@request.delete(['milestone'], { ids: ids })
|
81
|
+
end
|
45
82
|
end
|
46
83
|
end
|
@@ -35,10 +35,6 @@ module Teamlab
|
|
35
35
|
@request.get([project_id.to_s, 'files'])
|
36
36
|
end
|
37
37
|
|
38
|
-
def get_milestones(project_id)
|
39
|
-
@request.get([project_id.to_s, 'milestone'])
|
40
|
-
end
|
41
|
-
|
42
38
|
def search_all_projects(query)
|
43
39
|
@request.get(['@search', query.to_s])
|
44
40
|
end
|
@@ -47,18 +43,10 @@ module Teamlab
|
|
47
43
|
@request.get([project_id.to_s, '@search', query.to_s])
|
48
44
|
end
|
49
45
|
|
50
|
-
def get_milestones_with_status(project_id, status)
|
51
|
-
@request.get([project_id.to_s, 'milestone', status.to_s])
|
52
|
-
end
|
53
|
-
|
54
46
|
def create_project(title, description, responsible_id, tags, private, options = {})
|
55
47
|
@request.post('', { title: title, description: description, responsibleid: responsible_id, tags: tags, private: private }.merge(options))
|
56
48
|
end
|
57
49
|
|
58
|
-
def add_milestone(project_id, title, deadline, responsible_id, options = {})
|
59
|
-
@request.post([project_id.to_s, 'milestone'], { title: title, deadline: deadline, responsible: responsible_id }.merge(options))
|
60
|
-
end
|
61
|
-
|
62
50
|
def update_project(id, title, responsible_id, options = {})
|
63
51
|
@request.put([id.to_s], { title: title, responsibleId: responsible_id }.merge(options))
|
64
52
|
end
|
@@ -78,5 +66,12 @@ module Teamlab
|
|
78
66
|
def delete_project(id)
|
79
67
|
@request.delete([id.to_s])
|
80
68
|
end
|
69
|
+
|
70
|
+
# Deletes the projects with the IDs specified in the request from the portal
|
71
|
+
# @param ids [Array] List of project IDs
|
72
|
+
# @return [Array] Deleted projects
|
73
|
+
def delete_projects(ids)
|
74
|
+
@request.delete('', { projectids: ids })
|
75
|
+
end
|
81
76
|
end
|
82
77
|
end
|
@@ -11,6 +11,13 @@ module Teamlab
|
|
11
11
|
@request.put(['report', report_id.to_s], { name: name }.merge(options))
|
12
12
|
end
|
13
13
|
|
14
|
+
# Returns a project report template with the ID specified in the request
|
15
|
+
# @param report_id [Symbol, String] Report template ID
|
16
|
+
# @return [Hash] Project report template
|
17
|
+
def report_template(report_id)
|
18
|
+
@request.get(['report', report_id.to_s])
|
19
|
+
end
|
20
|
+
|
14
21
|
def delete_report_template(report_id)
|
15
22
|
@request.delete(['report', report_id.to_s])
|
16
23
|
end
|
@@ -7,5 +7,16 @@ module Teamlab
|
|
7
7
|
def projects_settings
|
8
8
|
@request.get(%w[settings])
|
9
9
|
end
|
10
|
+
|
11
|
+
# Updates the project settings with the parameters specified in the request
|
12
|
+
# @param options [Hash] options to change Projects module settings
|
13
|
+
# @option everebodyCanCreate [Boolean] Specifies if all the portal users can create projects or not
|
14
|
+
# @option hideEntitiesInPausedProjects [Boolean] Specifies if the entities will be hidden in the paused projects or not
|
15
|
+
# @option startModule [String] Module type: Projects, Tasks, Discussions, TimeTracking
|
16
|
+
# @option folderId [String] Folder ID
|
17
|
+
# @return [Hash] Updated settings
|
18
|
+
def update_projects_settings(options = {})
|
19
|
+
@request.put(%w[settings], options)
|
20
|
+
end
|
10
21
|
end
|
11
22
|
end
|
data/lib/teamlab/response.rb
CHANGED
@@ -40,6 +40,18 @@ module Teamlab
|
|
40
40
|
@body['response']
|
41
41
|
end
|
42
42
|
|
43
|
+
# Check if responce is succeed, has nil error and has hash body
|
44
|
+
# @param [Symbol] current api method
|
45
|
+
# @return [Boolean] result of responce check
|
46
|
+
def correct?(command)
|
47
|
+
result = @success && @error.nil? && @body.is_a?(Hash)
|
48
|
+
raise("Response should be always successful for #{command}") unless @success
|
49
|
+
raise("Response should not contain errors for #{command}") unless @error.nil?
|
50
|
+
raise("Response should be Hash for #{command}") unless @body.is_a?(Hash)
|
51
|
+
|
52
|
+
result
|
53
|
+
end
|
54
|
+
|
43
55
|
private
|
44
56
|
|
45
57
|
# Sometime in strange situation, like maybe nginx errors
|
data/lib/teamlab/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: httparty
|
@@ -27,20 +27,6 @@ dependencies:
|
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0.16'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: codecov
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
requirements:
|
34
|
-
- - "~>"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '0'
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - "~>"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '0'
|
44
30
|
- !ruby/object:Gem::Dependency
|
45
31
|
name: faker
|
46
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,6 +83,20 @@ dependencies:
|
|
97
83
|
- - "~>"
|
98
84
|
- !ruby/object:Gem::Version
|
99
85
|
version: '3'
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: rspec-retry
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
type: :development
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
101
|
name: rubocop
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,6 +153,20 @@ dependencies:
|
|
153
153
|
- - "~>"
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '2'
|
156
|
+
- !ruby/object:Gem::Dependency
|
157
|
+
name: simplecov-cobertura
|
158
|
+
requirement: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - "~>"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '2'
|
163
|
+
type: :development
|
164
|
+
prerelease: false
|
165
|
+
version_requirements: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '2'
|
156
170
|
- !ruby/object:Gem::Dependency
|
157
171
|
name: yard
|
158
172
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,6 +233,7 @@ files:
|
|
219
233
|
- lib/teamlab/modules/mailserver/mailboxes.rb
|
220
234
|
- lib/teamlab/modules/people.rb
|
221
235
|
- lib/teamlab/modules/people/people_reassign.rb
|
236
|
+
- lib/teamlab/modules/people/people_remove.rb
|
222
237
|
- lib/teamlab/modules/portals.rb
|
223
238
|
- lib/teamlab/modules/project.rb
|
224
239
|
- lib/teamlab/modules/projects/projects_comments.rb
|
@@ -249,6 +264,7 @@ metadata:
|
|
249
264
|
documentation_uri: https://www.rubydoc.info/gems/onlyoffice_api
|
250
265
|
homepage_uri: https://github.com/ONLYOFFICE/onlyoffice_api_gem
|
251
266
|
source_code_uri: https://github.com/ONLYOFFICE/onlyoffice_api_gem
|
267
|
+
rubygems_mfa_required: 'true'
|
252
268
|
post_install_message:
|
253
269
|
rdoc_options: []
|
254
270
|
require_paths:
|
@@ -264,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
280
|
- !ruby/object:Gem::Version
|
265
281
|
version: '0'
|
266
282
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
283
|
+
rubygems_version: 3.3.4
|
268
284
|
signing_key:
|
269
285
|
specification_version: 4
|
270
286
|
summary: Ruby gem for OnlyOffice. Formerly known as `teamlab`.
|