files.com 1.1.718 → 1.1.720
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/event_subscription.md +8 -0
- data/lib/files.com/models/event_subscription.rb +12 -0
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +0 -5
- metadata +2 -12
- data/docs/message.md +0 -153
- data/docs/message_comment.md +0 -133
- data/docs/message_comment_reaction.md +0 -92
- data/docs/message_reaction.md +0 -91
- data/docs/project.md +0 -117
- data/lib/files.com/models/message.rb +0 -202
- data/lib/files.com/models/message_comment.rb +0 -168
- data/lib/files.com/models/message_comment_reaction.rb +0 -131
- data/lib/files.com/models/message_reaction.rb +0 -129
- data/lib/files.com/models/project.rb +0 -141
data/docs/project.md
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Project
|
|
2
|
-
|
|
3
|
-
## Example Project Object
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
{
|
|
7
|
-
"id": 1,
|
|
8
|
-
"global_access": "none"
|
|
9
|
-
}
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
* `id` (int64): Project ID
|
|
13
|
-
* `global_access` (string): Global access settings
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## List Projects
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Files::Project.list
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Parameters
|
|
25
|
-
|
|
26
|
-
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
27
|
-
* `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Show Project
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
Files::Project.find(id)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Parameters
|
|
39
|
-
|
|
40
|
-
* `id` (int64): Required - Project ID.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Create Project
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
Files::Project.create(
|
|
49
|
-
global_access: "global_access"
|
|
50
|
-
)
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Parameters
|
|
54
|
-
|
|
55
|
-
* `global_access` (string): Required - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Update Project
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Files::Project.update(id,
|
|
64
|
-
global_access: "global_access"
|
|
65
|
-
)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Parameters
|
|
69
|
-
|
|
70
|
-
* `id` (int64): Required - Project ID.
|
|
71
|
-
* `global_access` (string): Required - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Delete Project
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
Files::Project.delete(id)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Parameters
|
|
83
|
-
|
|
84
|
-
* `id` (int64): Required - Project ID.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Update Project
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
project = Files::Project.find(id)
|
|
93
|
-
|
|
94
|
-
project.update(
|
|
95
|
-
global_access: "global_access"
|
|
96
|
-
)
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Parameters
|
|
100
|
-
|
|
101
|
-
* `id` (int64): Required - Project ID.
|
|
102
|
-
* `global_access` (string): Required - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Delete Project
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
project = Files::Project.find(id)
|
|
111
|
-
|
|
112
|
-
project.delete
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Parameters
|
|
116
|
-
|
|
117
|
-
* `id` (int64): Required - Project ID.
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class Message
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# int64 - Message ID
|
|
13
|
-
def id
|
|
14
|
-
@attributes[:id]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def id=(value)
|
|
18
|
-
@attributes[:id] = value
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# string - Message subject.
|
|
22
|
-
def subject
|
|
23
|
-
@attributes[:subject]
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def subject=(value)
|
|
27
|
-
@attributes[:subject] = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# string - Message body.
|
|
31
|
-
def body
|
|
32
|
-
@attributes[:body]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def body=(value)
|
|
36
|
-
@attributes[:body] = value
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# array(object) - Comments.
|
|
40
|
-
def comments
|
|
41
|
-
@attributes[:comments]
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def comments=(value)
|
|
45
|
-
@attributes[:comments] = value
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
49
|
-
def user_id
|
|
50
|
-
@attributes[:user_id]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def user_id=(value)
|
|
54
|
-
@attributes[:user_id] = value
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# int64 - Project to which the message should be attached.
|
|
58
|
-
def project_id
|
|
59
|
-
@attributes[:project_id]
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def project_id=(value)
|
|
63
|
-
@attributes[:project_id] = value
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Parameters:
|
|
67
|
-
# project_id (required) - int64 - Project to which the message should be attached.
|
|
68
|
-
# subject (required) - string - Message subject.
|
|
69
|
-
# body (required) - string - Message body.
|
|
70
|
-
def update(params = {})
|
|
71
|
-
params ||= {}
|
|
72
|
-
params[:id] = @attributes[:id]
|
|
73
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
74
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
75
|
-
raise InvalidParameterError.new("Bad parameter: project_id must be an Integer") if params[:project_id] and !params[:project_id].is_a?(Integer)
|
|
76
|
-
raise InvalidParameterError.new("Bad parameter: subject must be an String") if params[:subject] and !params[:subject].is_a?(String)
|
|
77
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
78
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
79
|
-
raise MissingParameterError.new("Parameter missing: project_id") unless params[:project_id]
|
|
80
|
-
raise MissingParameterError.new("Parameter missing: subject") unless params[:subject]
|
|
81
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
82
|
-
|
|
83
|
-
Api.send_request("/messages/#{@attributes[:id]}", :patch, params, @options)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def delete(params = {})
|
|
87
|
-
params ||= {}
|
|
88
|
-
params[:id] = @attributes[:id]
|
|
89
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
90
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
91
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
92
|
-
|
|
93
|
-
Api.send_request("/messages/#{@attributes[:id]}", :delete, params, @options)
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def destroy(params = {})
|
|
97
|
-
delete(params)
|
|
98
|
-
nil
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
def save
|
|
102
|
-
if @attributes[:id]
|
|
103
|
-
new_obj = update(@attributes)
|
|
104
|
-
else
|
|
105
|
-
new_obj = Message.create(@attributes, @options)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
@attributes = new_obj.attributes
|
|
109
|
-
true
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
# Parameters:
|
|
113
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
114
|
-
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
115
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
116
|
-
# project_id (required) - int64 - Project for which to return messages.
|
|
117
|
-
def self.list(params = {}, options = {})
|
|
118
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
119
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
120
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
121
|
-
raise InvalidParameterError.new("Bad parameter: project_id must be an Integer") if params[:project_id] and !params[:project_id].is_a?(Integer)
|
|
122
|
-
raise MissingParameterError.new("Parameter missing: project_id") unless params[:project_id]
|
|
123
|
-
|
|
124
|
-
List.new(Message, params) do
|
|
125
|
-
Api.send_request("/messages", :get, params, options)
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
def self.all(params = {}, options = {})
|
|
130
|
-
list(params, options)
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
# Parameters:
|
|
134
|
-
# id (required) - int64 - Message ID.
|
|
135
|
-
def self.find(id, params = {}, options = {})
|
|
136
|
-
params ||= {}
|
|
137
|
-
params[:id] = id
|
|
138
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
139
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
140
|
-
|
|
141
|
-
response, options = Api.send_request("/messages/#{params[:id]}", :get, params, options)
|
|
142
|
-
Message.new(response.data, options)
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
def self.get(id, params = {}, options = {})
|
|
146
|
-
find(id, params, options)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Parameters:
|
|
150
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
151
|
-
# project_id (required) - int64 - Project to which the message should be attached.
|
|
152
|
-
# subject (required) - string - Message subject.
|
|
153
|
-
# body (required) - string - Message body.
|
|
154
|
-
def self.create(params = {}, options = {})
|
|
155
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
156
|
-
raise InvalidParameterError.new("Bad parameter: project_id must be an Integer") if params[:project_id] and !params[:project_id].is_a?(Integer)
|
|
157
|
-
raise InvalidParameterError.new("Bad parameter: subject must be an String") if params[:subject] and !params[:subject].is_a?(String)
|
|
158
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
159
|
-
raise MissingParameterError.new("Parameter missing: project_id") unless params[:project_id]
|
|
160
|
-
raise MissingParameterError.new("Parameter missing: subject") unless params[:subject]
|
|
161
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
162
|
-
|
|
163
|
-
response, options = Api.send_request("/messages", :post, params, options)
|
|
164
|
-
Message.new(response.data, options)
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Parameters:
|
|
168
|
-
# project_id (required) - int64 - Project to which the message should be attached.
|
|
169
|
-
# subject (required) - string - Message subject.
|
|
170
|
-
# body (required) - string - Message body.
|
|
171
|
-
def self.update(id, params = {}, options = {})
|
|
172
|
-
params ||= {}
|
|
173
|
-
params[:id] = id
|
|
174
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
175
|
-
raise InvalidParameterError.new("Bad parameter: project_id must be an Integer") if params[:project_id] and !params[:project_id].is_a?(Integer)
|
|
176
|
-
raise InvalidParameterError.new("Bad parameter: subject must be an String") if params[:subject] and !params[:subject].is_a?(String)
|
|
177
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
178
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
179
|
-
raise MissingParameterError.new("Parameter missing: project_id") unless params[:project_id]
|
|
180
|
-
raise MissingParameterError.new("Parameter missing: subject") unless params[:subject]
|
|
181
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
182
|
-
|
|
183
|
-
response, options = Api.send_request("/messages/#{params[:id]}", :patch, params, options)
|
|
184
|
-
Message.new(response.data, options)
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def self.delete(id, params = {}, options = {})
|
|
188
|
-
params ||= {}
|
|
189
|
-
params[:id] = id
|
|
190
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
191
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
192
|
-
|
|
193
|
-
Api.send_request("/messages/#{params[:id]}", :delete, params, options)
|
|
194
|
-
nil
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def self.destroy(id, params = {}, options = {})
|
|
198
|
-
delete(id, params, options)
|
|
199
|
-
nil
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
end
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class MessageComment
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# int64 - Message Comment ID
|
|
13
|
-
def id
|
|
14
|
-
@attributes[:id]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def id=(value)
|
|
18
|
-
@attributes[:id] = value
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# string - Comment body.
|
|
22
|
-
def body
|
|
23
|
-
@attributes[:body]
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def body=(value)
|
|
27
|
-
@attributes[:body] = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# array(object) - Reactions to this comment.
|
|
31
|
-
def reactions
|
|
32
|
-
@attributes[:reactions]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def reactions=(value)
|
|
36
|
-
@attributes[:reactions] = value
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
40
|
-
def user_id
|
|
41
|
-
@attributes[:user_id]
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def user_id=(value)
|
|
45
|
-
@attributes[:user_id] = value
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Parameters:
|
|
49
|
-
# body (required) - string - Comment body.
|
|
50
|
-
def update(params = {})
|
|
51
|
-
params ||= {}
|
|
52
|
-
params[:id] = @attributes[:id]
|
|
53
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
54
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
55
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
56
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
57
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
58
|
-
|
|
59
|
-
Api.send_request("/message_comments/#{@attributes[:id]}", :patch, params, @options)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def delete(params = {})
|
|
63
|
-
params ||= {}
|
|
64
|
-
params[:id] = @attributes[:id]
|
|
65
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
66
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
67
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
68
|
-
|
|
69
|
-
Api.send_request("/message_comments/#{@attributes[:id]}", :delete, params, @options)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def destroy(params = {})
|
|
73
|
-
delete(params)
|
|
74
|
-
nil
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def save
|
|
78
|
-
if @attributes[:id]
|
|
79
|
-
new_obj = update(@attributes)
|
|
80
|
-
else
|
|
81
|
-
new_obj = MessageComment.create(@attributes, @options)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
@attributes = new_obj.attributes
|
|
85
|
-
true
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# Parameters:
|
|
89
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
90
|
-
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
91
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
92
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
|
93
|
-
# message_id (required) - int64 - Message comment to return comments for.
|
|
94
|
-
def self.list(params = {}, options = {})
|
|
95
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
96
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
97
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
98
|
-
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
99
|
-
raise InvalidParameterError.new("Bad parameter: message_id must be an Integer") if params[:message_id] and !params[:message_id].is_a?(Integer)
|
|
100
|
-
raise MissingParameterError.new("Parameter missing: message_id") unless params[:message_id]
|
|
101
|
-
|
|
102
|
-
List.new(MessageComment, params) do
|
|
103
|
-
Api.send_request("/message_comments", :get, params, options)
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
def self.all(params = {}, options = {})
|
|
108
|
-
list(params, options)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# Parameters:
|
|
112
|
-
# id (required) - int64 - Message Comment ID.
|
|
113
|
-
def self.find(id, params = {}, options = {})
|
|
114
|
-
params ||= {}
|
|
115
|
-
params[:id] = id
|
|
116
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
117
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
118
|
-
|
|
119
|
-
response, options = Api.send_request("/message_comments/#{params[:id]}", :get, params, options)
|
|
120
|
-
MessageComment.new(response.data, options)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
def self.get(id, params = {}, options = {})
|
|
124
|
-
find(id, params, options)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
# Parameters:
|
|
128
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
129
|
-
# body (required) - string - Comment body.
|
|
130
|
-
def self.create(params = {}, options = {})
|
|
131
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
132
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
133
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
134
|
-
|
|
135
|
-
response, options = Api.send_request("/message_comments", :post, params, options)
|
|
136
|
-
MessageComment.new(response.data, options)
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# Parameters:
|
|
140
|
-
# body (required) - string - Comment body.
|
|
141
|
-
def self.update(id, params = {}, options = {})
|
|
142
|
-
params ||= {}
|
|
143
|
-
params[:id] = id
|
|
144
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
145
|
-
raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String)
|
|
146
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
147
|
-
raise MissingParameterError.new("Parameter missing: body") unless params[:body]
|
|
148
|
-
|
|
149
|
-
response, options = Api.send_request("/message_comments/#{params[:id]}", :patch, params, options)
|
|
150
|
-
MessageComment.new(response.data, options)
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
def self.delete(id, params = {}, options = {})
|
|
154
|
-
params ||= {}
|
|
155
|
-
params[:id] = id
|
|
156
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
157
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
158
|
-
|
|
159
|
-
Api.send_request("/message_comments/#{params[:id]}", :delete, params, options)
|
|
160
|
-
nil
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def self.destroy(id, params = {}, options = {})
|
|
164
|
-
delete(id, params, options)
|
|
165
|
-
nil
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
end
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class MessageCommentReaction
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# int64 - Reaction ID
|
|
13
|
-
def id
|
|
14
|
-
@attributes[:id]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def id=(value)
|
|
18
|
-
@attributes[:id] = value
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# string - Emoji used in the reaction.
|
|
22
|
-
def emoji
|
|
23
|
-
@attributes[:emoji]
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def emoji=(value)
|
|
27
|
-
@attributes[:emoji] = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
31
|
-
def user_id
|
|
32
|
-
@attributes[:user_id]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def user_id=(value)
|
|
36
|
-
@attributes[:user_id] = value
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def delete(params = {})
|
|
40
|
-
params ||= {}
|
|
41
|
-
params[:id] = @attributes[:id]
|
|
42
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
43
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
44
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
45
|
-
|
|
46
|
-
Api.send_request("/message_comment_reactions/#{@attributes[:id]}", :delete, params, @options)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def destroy(params = {})
|
|
50
|
-
delete(params)
|
|
51
|
-
nil
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def save
|
|
55
|
-
if @attributes[:id]
|
|
56
|
-
raise NotImplementedError.new("The MessageCommentReaction object doesn't support updates.")
|
|
57
|
-
else
|
|
58
|
-
new_obj = MessageCommentReaction.create(@attributes, @options)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
@attributes = new_obj.attributes
|
|
62
|
-
true
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Parameters:
|
|
66
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
67
|
-
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
68
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
69
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
|
70
|
-
# message_comment_id (required) - int64 - Message comment to return reactions for.
|
|
71
|
-
def self.list(params = {}, options = {})
|
|
72
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
73
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
74
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
75
|
-
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
76
|
-
raise InvalidParameterError.new("Bad parameter: message_comment_id must be an Integer") if params[:message_comment_id] and !params[:message_comment_id].is_a?(Integer)
|
|
77
|
-
raise MissingParameterError.new("Parameter missing: message_comment_id") unless params[:message_comment_id]
|
|
78
|
-
|
|
79
|
-
List.new(MessageCommentReaction, params) do
|
|
80
|
-
Api.send_request("/message_comment_reactions", :get, params, options)
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def self.all(params = {}, options = {})
|
|
85
|
-
list(params, options)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# Parameters:
|
|
89
|
-
# id (required) - int64 - Message Comment Reaction ID.
|
|
90
|
-
def self.find(id, params = {}, options = {})
|
|
91
|
-
params ||= {}
|
|
92
|
-
params[:id] = id
|
|
93
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
94
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
95
|
-
|
|
96
|
-
response, options = Api.send_request("/message_comment_reactions/#{params[:id]}", :get, params, options)
|
|
97
|
-
MessageCommentReaction.new(response.data, options)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
def self.get(id, params = {}, options = {})
|
|
101
|
-
find(id, params, options)
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Parameters:
|
|
105
|
-
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
106
|
-
# emoji (required) - string - Emoji to react with.
|
|
107
|
-
def self.create(params = {}, options = {})
|
|
108
|
-
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
109
|
-
raise InvalidParameterError.new("Bad parameter: emoji must be an String") if params[:emoji] and !params[:emoji].is_a?(String)
|
|
110
|
-
raise MissingParameterError.new("Parameter missing: emoji") unless params[:emoji]
|
|
111
|
-
|
|
112
|
-
response, options = Api.send_request("/message_comment_reactions", :post, params, options)
|
|
113
|
-
MessageCommentReaction.new(response.data, options)
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
def self.delete(id, params = {}, options = {})
|
|
117
|
-
params ||= {}
|
|
118
|
-
params[:id] = id
|
|
119
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
120
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
121
|
-
|
|
122
|
-
Api.send_request("/message_comment_reactions/#{params[:id]}", :delete, params, options)
|
|
123
|
-
nil
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def self.destroy(id, params = {}, options = {})
|
|
127
|
-
delete(id, params, options)
|
|
128
|
-
nil
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
end
|