files.com 1.0.92
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 +7 -0
- data/CONTRIBUTORS +4 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +82 -0
- data/LICENSE +21 -0
- data/README.md +119 -0
- data/Rakefile +12 -0
- data/SECURITY.md +24 -0
- data/_VERSION +1 -0
- data/bin/files +8 -0
- data/bin/files-console +16 -0
- data/docs/account_line_item.md +41 -0
- data/docs/action.md +37 -0
- data/docs/api_key.md +202 -0
- data/docs/app.md +59 -0
- data/docs/as2_key.md +133 -0
- data/docs/auto.md +11 -0
- data/docs/automation.md +190 -0
- data/docs/behavior.md +208 -0
- data/docs/bundle.md +252 -0
- data/docs/bundle_download.md +35 -0
- data/docs/clickwrap.md +143 -0
- data/docs/dns_record.md +35 -0
- data/docs/errors.md +17 -0
- data/docs/file.md +204 -0
- data/docs/file_action.md +126 -0
- data/docs/file_comment.md +116 -0
- data/docs/file_comment_reaction.md +62 -0
- data/docs/file_part_upload.md +37 -0
- data/docs/file_utils.md +4 -0
- data/docs/folder.md +90 -0
- data/docs/group.md +153 -0
- data/docs/group_user.md +124 -0
- data/docs/history.md +171 -0
- data/docs/history_export.md +174 -0
- data/docs/image.md +13 -0
- data/docs/invoice.md +72 -0
- data/docs/invoice_line_item.md +27 -0
- data/docs/ip_address.md +55 -0
- data/docs/lock.md +98 -0
- data/docs/message.md +147 -0
- data/docs/message_comment.md +132 -0
- data/docs/message_comment_reaction.md +94 -0
- data/docs/message_reaction.md +94 -0
- data/docs/notification.md +177 -0
- data/docs/payment.md +72 -0
- data/docs/payment_line_item.md +19 -0
- data/docs/permission.md +95 -0
- data/docs/preview.md +19 -0
- data/docs/project.md +121 -0
- data/docs/public_ip_address.md +13 -0
- data/docs/public_key.md +133 -0
- data/docs/remote_server.md +356 -0
- data/docs/request.md +100 -0
- data/docs/session.md +78 -0
- data/docs/site.md +448 -0
- data/docs/sso_strategy.md +114 -0
- data/docs/status.md +21 -0
- data/docs/style.md +93 -0
- data/docs/usage_daily_snapshot.md +45 -0
- data/docs/usage_snapshot.md +53 -0
- data/docs/user.md +535 -0
- data/docs/user_cipher_use.md +41 -0
- data/docs/user_request.md +93 -0
- data/files.com.gemspec +22 -0
- data/lib/files.com.rb +184 -0
- data/lib/files.com/api.rb +38 -0
- data/lib/files.com/api_client.rb +340 -0
- data/lib/files.com/errors.rb +41 -0
- data/lib/files.com/list.rb +95 -0
- data/lib/files.com/models/account_line_item.rb +82 -0
- data/lib/files.com/models/action.rb +77 -0
- data/lib/files.com/models/api_key.rb +270 -0
- data/lib/files.com/models/app.rb +106 -0
- data/lib/files.com/models/as2_key.rb +179 -0
- data/lib/files.com/models/auto.rb +17 -0
- data/lib/files.com/models/automation.rb +304 -0
- data/lib/files.com/models/behavior.rb +266 -0
- data/lib/files.com/models/bundle.rb +371 -0
- data/lib/files.com/models/bundle_download.rb +49 -0
- data/lib/files.com/models/clickwrap.rb +197 -0
- data/lib/files.com/models/dir.rb +3 -0
- data/lib/files.com/models/dns_record.rb +51 -0
- data/lib/files.com/models/errors.rb +22 -0
- data/lib/files.com/models/file.rb +968 -0
- data/lib/files.com/models/file_action.rb +126 -0
- data/lib/files.com/models/file_comment.rb +146 -0
- data/lib/files.com/models/file_comment_reaction.rb +100 -0
- data/lib/files.com/models/file_part_upload.rb +82 -0
- data/lib/files.com/models/file_utils.rb +118 -0
- data/lib/files.com/models/folder.rb +357 -0
- data/lib/files.com/models/group.rb +208 -0
- data/lib/files.com/models/group_user.rb +171 -0
- data/lib/files.com/models/history.rb +228 -0
- data/lib/files.com/models/history_export.rb +353 -0
- data/lib/files.com/models/image.rb +22 -0
- data/lib/files.com/models/invoice.rb +117 -0
- data/lib/files.com/models/invoice_line_item.rb +57 -0
- data/lib/files.com/models/ip_address.rb +66 -0
- data/lib/files.com/models/lock.rb +173 -0
- data/lib/files.com/models/message.rb +201 -0
- data/lib/files.com/models/message_comment.rb +165 -0
- data/lib/files.com/models/message_comment_reaction.rb +128 -0
- data/lib/files.com/models/message_reaction.rb +128 -0
- data/lib/files.com/models/notification.rb +263 -0
- data/lib/files.com/models/payment.rb +117 -0
- data/lib/files.com/models/payment_line_item.rb +37 -0
- data/lib/files.com/models/permission.rb +172 -0
- data/lib/files.com/models/preview.rb +37 -0
- data/lib/files.com/models/project.rb +140 -0
- data/lib/files.com/models/public_ip_address.rb +22 -0
- data/lib/files.com/models/public_key.rb +179 -0
- data/lib/files.com/models/remote_server.rb +680 -0
- data/lib/files.com/models/request.rb +179 -0
- data/lib/files.com/models/session.rb +247 -0
- data/lib/files.com/models/site.rb +733 -0
- data/lib/files.com/models/sso_strategy.rb +227 -0
- data/lib/files.com/models/status.rb +37 -0
- data/lib/files.com/models/style.rb +131 -0
- data/lib/files.com/models/usage_daily_snapshot.rb +66 -0
- data/lib/files.com/models/usage_snapshot.rb +96 -0
- data/lib/files.com/models/user.rb +876 -0
- data/lib/files.com/models/user_cipher_use.rb +63 -0
- data/lib/files.com/models/user_request.rb +127 -0
- data/lib/files.com/response.rb +25 -0
- data/lib/files.com/sizable_io.rb +32 -0
- data/lib/files.com/system_profiler.rb +56 -0
- data/lib/files.com/util.rb +106 -0
- data/lib/files.com/version.rb +5 -0
- data/spec/list_spec.rb +214 -0
- data/spec/models/file_spec.rb +68 -0
- data/spec/models/folder_spec.rb +40 -0
- data/spec/spec_helper.rb +36 -0
- data/test.sh +8 -0
- data/test/test.rb +75 -0
- metadata +235 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
# FileCommentReaction
|
2
|
+
|
3
|
+
## Example FileCommentReaction Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"emoji": "👍"
|
9
|
+
}
|
10
|
+
```
|
11
|
+
|
12
|
+
* `id` (int64): Reaction ID
|
13
|
+
* `emoji` (string): Emoji used in the reaction.
|
14
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
15
|
+
* `file_comment_id` (int64): ID of file comment to attach reaction to.
|
16
|
+
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
## Create File Comment Reaction
|
21
|
+
|
22
|
+
```
|
23
|
+
Files::FileCommentReaction.create(
|
24
|
+
user_id: 1,
|
25
|
+
file_comment_id: 1,
|
26
|
+
emoji: "emoji"
|
27
|
+
)
|
28
|
+
```
|
29
|
+
|
30
|
+
### Parameters
|
31
|
+
|
32
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
33
|
+
* `file_comment_id` (int64): Required - ID of file comment to attach reaction to.
|
34
|
+
* `emoji` (string): Required - Emoji to react with.
|
35
|
+
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
## Delete File Comment Reaction
|
40
|
+
|
41
|
+
```
|
42
|
+
Files::FileCommentReaction.delete(id)
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
* `id` (int64): Required - File Comment Reaction ID.
|
48
|
+
|
49
|
+
|
50
|
+
---
|
51
|
+
|
52
|
+
## Delete File Comment Reaction
|
53
|
+
|
54
|
+
```
|
55
|
+
file_comment_reaction = Files::FileCommentReaction.list_for(path).first
|
56
|
+
|
57
|
+
file_comment_reaction.delete
|
58
|
+
```
|
59
|
+
|
60
|
+
### Parameters
|
61
|
+
|
62
|
+
* `id` (int64): Required - File Comment Reaction ID.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# FilePartUpload
|
2
|
+
|
3
|
+
## Example FilePartUpload Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"send": "",
|
8
|
+
"action": "upload/direct",
|
9
|
+
"ask_about_overwrites": true,
|
10
|
+
"available_parts": "",
|
11
|
+
"expires": "",
|
12
|
+
"headers": "",
|
13
|
+
"http_method": "POST",
|
14
|
+
"next_partsize": "",
|
15
|
+
"parameters": "",
|
16
|
+
"part_number": "",
|
17
|
+
"partsize": "",
|
18
|
+
"path": "path",
|
19
|
+
"ref": "upload-1",
|
20
|
+
"upload_uri": ""
|
21
|
+
}
|
22
|
+
```
|
23
|
+
|
24
|
+
* `send` (object): Content-Type and File to send
|
25
|
+
* `action` (string): Type of upload
|
26
|
+
* `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation
|
27
|
+
* `available_parts` (string): Currently unused
|
28
|
+
* `expires` (string): Currently unused
|
29
|
+
* `headers` (object): Additional upload headers
|
30
|
+
* `http_method` (string): Upload method, usually POST
|
31
|
+
* `next_partsize` (string): Currently unused
|
32
|
+
* `parameters` (string): Additional upload parameters
|
33
|
+
* `part_number` (string): Currently unused
|
34
|
+
* `partsize` (string): Currently unused
|
35
|
+
* `path` (string): Upload path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
36
|
+
* `ref` (string): Reference name for this upload part
|
37
|
+
* `upload_uri` (string): URI to upload this part to
|
data/docs/file_utils.md
ADDED
data/docs/folder.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# Folder
|
2
|
+
|
3
|
+
The Files::Folder object emulates a Ruby Dir object and can be used in
|
4
|
+
may places where a Ruby Dir object can be used.
|
5
|
+
|
6
|
+
Files::Dir is an alias of Files::Folder
|
7
|
+
|
8
|
+
## Example Folder Object
|
9
|
+
|
10
|
+
```
|
11
|
+
{
|
12
|
+
"id": 1,
|
13
|
+
"path": "path/file.txt",
|
14
|
+
"display_name": "file.txt",
|
15
|
+
"type": "file",
|
16
|
+
"size": 1024,
|
17
|
+
"mtime": "2000-01-01T01:00:00Z",
|
18
|
+
"provided_mtime": "2000-01-01T01:00:00Z",
|
19
|
+
"crc32": "70976923",
|
20
|
+
"md5": "17c54824e9931a4688ca032d03f6663c",
|
21
|
+
"mime_type": "application/octet-stream",
|
22
|
+
"region": "us-east-1",
|
23
|
+
"permissions": "rpw",
|
24
|
+
"subfolders_locked?": true,
|
25
|
+
"download_uri": "https://mysite.files.com/...",
|
26
|
+
"priority_color": "red",
|
27
|
+
"preview_id": 1,
|
28
|
+
"preview": ""
|
29
|
+
}
|
30
|
+
```
|
31
|
+
|
32
|
+
* `id` (int64): File/Folder ID
|
33
|
+
* `path` (string): File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
34
|
+
* `display_name` (string): File/Folder display name
|
35
|
+
* `type` (string): Type: `directory` or `file`.
|
36
|
+
* `size` (int64): File/Folder size
|
37
|
+
* `mtime` (date-time): File last modified date/time, according to the server. This is the timestamp of the last Files.com operation of the file, regardless of what modified timestamp was sent.
|
38
|
+
* `provided_mtime` (date-time): File last modified date/time, according to the client who set it. Files.com allows desktop, FTP, SFTP, and WebDAV clients to set modified at times. This allows Desktop<->Cloud syncing to preserve modified at times.
|
39
|
+
* `crc32` (string): File CRC32 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
|
40
|
+
* `md5` (string): File MD5 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
|
41
|
+
* `mime_type` (string): MIME Type. This is determined by the filename extension and is not stored separately internally.
|
42
|
+
* `region` (string): Region location
|
43
|
+
* `permissions` (string): A short string representing the current user's permissions. Can be `r`,`w`,`p`, or any combination
|
44
|
+
* `subfolders_locked?` (boolean): Are subfolders locked and unable to be modified?
|
45
|
+
* `download_uri` (string): Link to download file. Provided only in response to a download request.
|
46
|
+
* `priority_color` (string): Bookmark/priority color of file/folder
|
47
|
+
* `preview_id` (int64): File preview ID
|
48
|
+
* `preview`: File preview
|
49
|
+
|
50
|
+
|
51
|
+
---
|
52
|
+
|
53
|
+
## List Folders by path
|
54
|
+
|
55
|
+
```
|
56
|
+
Files::Folder.list_for(path,
|
57
|
+
page: 1,
|
58
|
+
per_page: 1,
|
59
|
+
search_all: true,
|
60
|
+
with_previews: true,
|
61
|
+
with_priority_color: true
|
62
|
+
)
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
* `page` (int64): Current page number.
|
68
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
69
|
+
* `action` (string): Action to take. Can be `count`, `count_nrs` (non recursive), `size`, `permissions`, or blank.
|
70
|
+
* `path` (string): Required - Path to operate on.
|
71
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor header.
|
72
|
+
* `filter` (string): If specified, will to filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
73
|
+
* `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
74
|
+
* `search` (string): If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
75
|
+
* `search_all` (boolean): Search entire site?
|
76
|
+
* `with_previews` (boolean): Include file previews?
|
77
|
+
* `with_priority_color` (boolean): Include file priority color information?
|
78
|
+
|
79
|
+
|
80
|
+
---
|
81
|
+
|
82
|
+
## Create folder
|
83
|
+
|
84
|
+
```
|
85
|
+
Files::Folder.create(path)
|
86
|
+
```
|
87
|
+
|
88
|
+
### Parameters
|
89
|
+
|
90
|
+
* `path` (string): Required - Path to operate on.
|
data/docs/group.md
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
# Group
|
2
|
+
|
3
|
+
## Example Group Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"name": "owners",
|
9
|
+
"admin_ids": [
|
10
|
+
|
11
|
+
],
|
12
|
+
"notes": "",
|
13
|
+
"user_ids": [
|
14
|
+
|
15
|
+
],
|
16
|
+
"usernames": [
|
17
|
+
|
18
|
+
]
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
22
|
+
* `id` (int64): Group ID
|
23
|
+
* `name` (string): Group name
|
24
|
+
* `admin_ids` (array): List of user IDs who are group administrators (separated by commas)
|
25
|
+
* `notes` (string): Notes about this group
|
26
|
+
* `user_ids` (array): List of user IDs who belong to this group (separated by commas)
|
27
|
+
* `usernames` (array): List of usernames who belong to this group (separated by commas)
|
28
|
+
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
## List Groups
|
33
|
+
|
34
|
+
```
|
35
|
+
Files::Group.list(
|
36
|
+
page: 1,
|
37
|
+
per_page: 1
|
38
|
+
)
|
39
|
+
```
|
40
|
+
|
41
|
+
### Parameters
|
42
|
+
|
43
|
+
* `page` (int64): Current page number.
|
44
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
45
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
46
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
47
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `active`, `deleted_at`, `site_id` or `name`.
|
48
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name`.
|
49
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `name`.
|
50
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `name`.
|
51
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name`.
|
52
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `name`.
|
53
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `name`.
|
54
|
+
* `ids` (string): Comma-separated list of group ids to include in results.
|
55
|
+
|
56
|
+
|
57
|
+
---
|
58
|
+
|
59
|
+
## Show Group
|
60
|
+
|
61
|
+
```
|
62
|
+
Files::Group.find(id)
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
* `id` (int64): Required - Group ID.
|
68
|
+
|
69
|
+
|
70
|
+
---
|
71
|
+
|
72
|
+
## Create Group
|
73
|
+
|
74
|
+
```
|
75
|
+
Files::Group.create(
|
76
|
+
name: "owners"
|
77
|
+
)
|
78
|
+
```
|
79
|
+
|
80
|
+
### Parameters
|
81
|
+
|
82
|
+
* `name` (string): Group name.
|
83
|
+
* `notes` (string): Group notes.
|
84
|
+
* `user_ids` (string): A list of user ids. If sent as a string, should be comma-delimited.
|
85
|
+
* `admin_ids` (string): A list of group admin user ids. If sent as a string, should be comma-delimited.
|
86
|
+
|
87
|
+
|
88
|
+
---
|
89
|
+
|
90
|
+
## Update Group
|
91
|
+
|
92
|
+
```
|
93
|
+
Files::Group.update(id,
|
94
|
+
name: "owners"
|
95
|
+
)
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
* `id` (int64): Required - Group ID.
|
101
|
+
* `name` (string): Group name.
|
102
|
+
* `notes` (string): Group notes.
|
103
|
+
* `user_ids` (string): A list of user ids. If sent as a string, should be comma-delimited.
|
104
|
+
* `admin_ids` (string): A list of group admin user ids. If sent as a string, should be comma-delimited.
|
105
|
+
|
106
|
+
|
107
|
+
---
|
108
|
+
|
109
|
+
## Delete Group
|
110
|
+
|
111
|
+
```
|
112
|
+
Files::Group.delete(id)
|
113
|
+
```
|
114
|
+
|
115
|
+
### Parameters
|
116
|
+
|
117
|
+
* `id` (int64): Required - Group ID.
|
118
|
+
|
119
|
+
|
120
|
+
---
|
121
|
+
|
122
|
+
## Update Group
|
123
|
+
|
124
|
+
```
|
125
|
+
group = Files::Group.list_for(path).first
|
126
|
+
|
127
|
+
group.update(
|
128
|
+
name: "owners"
|
129
|
+
)
|
130
|
+
```
|
131
|
+
|
132
|
+
### Parameters
|
133
|
+
|
134
|
+
* `id` (int64): Required - Group ID.
|
135
|
+
* `name` (string): Group name.
|
136
|
+
* `notes` (string): Group notes.
|
137
|
+
* `user_ids` (string): A list of user ids. If sent as a string, should be comma-delimited.
|
138
|
+
* `admin_ids` (string): A list of group admin user ids. If sent as a string, should be comma-delimited.
|
139
|
+
|
140
|
+
|
141
|
+
---
|
142
|
+
|
143
|
+
## Delete Group
|
144
|
+
|
145
|
+
```
|
146
|
+
group = Files::Group.list_for(path).first
|
147
|
+
|
148
|
+
group.delete
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
|
153
|
+
* `id` (int64): Required - Group ID.
|
data/docs/group_user.md
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
# GroupUser
|
2
|
+
|
3
|
+
## Example GroupUser Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"group_name": "My Group",
|
8
|
+
"group_id": 1,
|
9
|
+
"user_id": 1,
|
10
|
+
"admin": true,
|
11
|
+
"usernames": [
|
12
|
+
|
13
|
+
]
|
14
|
+
}
|
15
|
+
```
|
16
|
+
|
17
|
+
* `group_name` (string): Group name
|
18
|
+
* `group_id` (int64): Group ID
|
19
|
+
* `user_id` (int64): User ID
|
20
|
+
* `admin` (boolean): Is this user an administrator of this group?
|
21
|
+
* `usernames` (array): A list of usernames for users in this group
|
22
|
+
* `id` (int64): Group User ID.
|
23
|
+
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
## List Group Users
|
28
|
+
|
29
|
+
```
|
30
|
+
Files::GroupUser.list(
|
31
|
+
user_id: 1,
|
32
|
+
page: 1,
|
33
|
+
per_page: 1,
|
34
|
+
group_id: 1
|
35
|
+
)
|
36
|
+
```
|
37
|
+
|
38
|
+
### Parameters
|
39
|
+
|
40
|
+
* `user_id` (int64): User ID. If provided, will return group_users of this user.
|
41
|
+
* `page` (int64): Current page number.
|
42
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
43
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
44
|
+
* `group_id` (int64): Group ID. If provided, will return group_users of this group.
|
45
|
+
|
46
|
+
|
47
|
+
---
|
48
|
+
|
49
|
+
## Update Group User
|
50
|
+
|
51
|
+
```
|
52
|
+
Files::GroupUser.update(id,
|
53
|
+
group_id: 1,
|
54
|
+
user_id: 1,
|
55
|
+
admin: true
|
56
|
+
)
|
57
|
+
```
|
58
|
+
|
59
|
+
### Parameters
|
60
|
+
|
61
|
+
* `id` (int64): Required - Group User ID.
|
62
|
+
* `group_id` (int64): Required - Group ID to add user to.
|
63
|
+
* `user_id` (int64): Required - User ID to add to group.
|
64
|
+
* `admin` (boolean): Is the user a group administrator?
|
65
|
+
|
66
|
+
|
67
|
+
---
|
68
|
+
|
69
|
+
## Delete Group User
|
70
|
+
|
71
|
+
```
|
72
|
+
Files::GroupUser.delete(id,
|
73
|
+
group_id: 1,
|
74
|
+
user_id: 1
|
75
|
+
)
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
* `id` (int64): Required - Group User ID.
|
81
|
+
* `group_id` (int64): Required - Group ID from which to remove user.
|
82
|
+
* `user_id` (int64): Required - User ID to remove from group.
|
83
|
+
|
84
|
+
|
85
|
+
---
|
86
|
+
|
87
|
+
## Update Group User
|
88
|
+
|
89
|
+
```
|
90
|
+
group_user = Files::GroupUser.list_for(path).first
|
91
|
+
|
92
|
+
group_user.update(
|
93
|
+
group_id: 1,
|
94
|
+
user_id: 1,
|
95
|
+
admin: true
|
96
|
+
)
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
* `id` (int64): Required - Group User ID.
|
102
|
+
* `group_id` (int64): Required - Group ID to add user to.
|
103
|
+
* `user_id` (int64): Required - User ID to add to group.
|
104
|
+
* `admin` (boolean): Is the user a group administrator?
|
105
|
+
|
106
|
+
|
107
|
+
---
|
108
|
+
|
109
|
+
## Delete Group User
|
110
|
+
|
111
|
+
```
|
112
|
+
group_user = Files::GroupUser.list_for(path).first
|
113
|
+
|
114
|
+
group_user.delete(
|
115
|
+
group_id: 1,
|
116
|
+
user_id: 1
|
117
|
+
)
|
118
|
+
```
|
119
|
+
|
120
|
+
### Parameters
|
121
|
+
|
122
|
+
* `id` (int64): Required - Group User ID.
|
123
|
+
* `group_id` (int64): Required - Group ID from which to remove user.
|
124
|
+
* `user_id` (int64): Required - User ID to remove from group.
|