files.com 1.0.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTORS +4 -0
  3. data/Gemfile +12 -0
  4. data/Gemfile.lock +82 -0
  5. data/LICENSE +21 -0
  6. data/README.md +119 -0
  7. data/Rakefile +12 -0
  8. data/SECURITY.md +24 -0
  9. data/_VERSION +1 -0
  10. data/bin/files +8 -0
  11. data/bin/files-console +16 -0
  12. data/docs/account_line_item.md +41 -0
  13. data/docs/action.md +37 -0
  14. data/docs/api_key.md +202 -0
  15. data/docs/app.md +57 -0
  16. data/docs/as2_key.md +133 -0
  17. data/docs/auto.md +11 -0
  18. data/docs/automation.md +190 -0
  19. data/docs/behavior.md +208 -0
  20. data/docs/bundle.md +252 -0
  21. data/docs/bundle_download.md +35 -0
  22. data/docs/clickwrap.md +143 -0
  23. data/docs/dns_record.md +35 -0
  24. data/docs/errors.md +17 -0
  25. data/docs/file.md +204 -0
  26. data/docs/file_action.md +126 -0
  27. data/docs/file_comment.md +116 -0
  28. data/docs/file_comment_reaction.md +62 -0
  29. data/docs/file_part_upload.md +37 -0
  30. data/docs/file_utils.md +4 -0
  31. data/docs/folder.md +90 -0
  32. data/docs/group.md +153 -0
  33. data/docs/group_user.md +124 -0
  34. data/docs/history.md +171 -0
  35. data/docs/history_export.md +174 -0
  36. data/docs/image.md +13 -0
  37. data/docs/invoice.md +72 -0
  38. data/docs/invoice_line_item.md +27 -0
  39. data/docs/ip_address.md +55 -0
  40. data/docs/lock.md +98 -0
  41. data/docs/message.md +147 -0
  42. data/docs/message_comment.md +132 -0
  43. data/docs/message_comment_reaction.md +94 -0
  44. data/docs/message_reaction.md +94 -0
  45. data/docs/notification.md +177 -0
  46. data/docs/payment.md +72 -0
  47. data/docs/payment_line_item.md +19 -0
  48. data/docs/permission.md +95 -0
  49. data/docs/preview.md +19 -0
  50. data/docs/project.md +121 -0
  51. data/docs/public_ip_address.md +13 -0
  52. data/docs/public_key.md +133 -0
  53. data/docs/remote_server.md +356 -0
  54. data/docs/request.md +100 -0
  55. data/docs/session.md +78 -0
  56. data/docs/site.md +448 -0
  57. data/docs/sso_strategy.md +114 -0
  58. data/docs/status.md +21 -0
  59. data/docs/style.md +93 -0
  60. data/docs/usage_daily_snapshot.md +45 -0
  61. data/docs/usage_snapshot.md +53 -0
  62. data/docs/user.md +535 -0
  63. data/docs/user_cipher_use.md +41 -0
  64. data/docs/user_request.md +93 -0
  65. data/files.com.gemspec +22 -0
  66. data/lib/files.com.rb +184 -0
  67. data/lib/files.com/api.rb +38 -0
  68. data/lib/files.com/api_client.rb +340 -0
  69. data/lib/files.com/errors.rb +41 -0
  70. data/lib/files.com/list.rb +95 -0
  71. data/lib/files.com/models/account_line_item.rb +82 -0
  72. data/lib/files.com/models/action.rb +77 -0
  73. data/lib/files.com/models/api_key.rb +270 -0
  74. data/lib/files.com/models/app.rb +101 -0
  75. data/lib/files.com/models/as2_key.rb +179 -0
  76. data/lib/files.com/models/auto.rb +17 -0
  77. data/lib/files.com/models/automation.rb +304 -0
  78. data/lib/files.com/models/behavior.rb +266 -0
  79. data/lib/files.com/models/bundle.rb +371 -0
  80. data/lib/files.com/models/bundle_download.rb +49 -0
  81. data/lib/files.com/models/clickwrap.rb +197 -0
  82. data/lib/files.com/models/dir.rb +3 -0
  83. data/lib/files.com/models/dns_record.rb +51 -0
  84. data/lib/files.com/models/errors.rb +22 -0
  85. data/lib/files.com/models/file.rb +968 -0
  86. data/lib/files.com/models/file_action.rb +126 -0
  87. data/lib/files.com/models/file_comment.rb +146 -0
  88. data/lib/files.com/models/file_comment_reaction.rb +100 -0
  89. data/lib/files.com/models/file_part_upload.rb +82 -0
  90. data/lib/files.com/models/file_utils.rb +118 -0
  91. data/lib/files.com/models/folder.rb +357 -0
  92. data/lib/files.com/models/group.rb +208 -0
  93. data/lib/files.com/models/group_user.rb +171 -0
  94. data/lib/files.com/models/history.rb +228 -0
  95. data/lib/files.com/models/history_export.rb +353 -0
  96. data/lib/files.com/models/image.rb +22 -0
  97. data/lib/files.com/models/invoice.rb +117 -0
  98. data/lib/files.com/models/invoice_line_item.rb +57 -0
  99. data/lib/files.com/models/ip_address.rb +66 -0
  100. data/lib/files.com/models/lock.rb +173 -0
  101. data/lib/files.com/models/message.rb +201 -0
  102. data/lib/files.com/models/message_comment.rb +165 -0
  103. data/lib/files.com/models/message_comment_reaction.rb +128 -0
  104. data/lib/files.com/models/message_reaction.rb +128 -0
  105. data/lib/files.com/models/notification.rb +263 -0
  106. data/lib/files.com/models/payment.rb +117 -0
  107. data/lib/files.com/models/payment_line_item.rb +37 -0
  108. data/lib/files.com/models/permission.rb +172 -0
  109. data/lib/files.com/models/preview.rb +37 -0
  110. data/lib/files.com/models/project.rb +140 -0
  111. data/lib/files.com/models/public_ip_address.rb +22 -0
  112. data/lib/files.com/models/public_key.rb +179 -0
  113. data/lib/files.com/models/remote_server.rb +680 -0
  114. data/lib/files.com/models/request.rb +179 -0
  115. data/lib/files.com/models/session.rb +247 -0
  116. data/lib/files.com/models/site.rb +733 -0
  117. data/lib/files.com/models/sso_strategy.rb +227 -0
  118. data/lib/files.com/models/status.rb +37 -0
  119. data/lib/files.com/models/style.rb +131 -0
  120. data/lib/files.com/models/usage_daily_snapshot.rb +66 -0
  121. data/lib/files.com/models/usage_snapshot.rb +96 -0
  122. data/lib/files.com/models/user.rb +876 -0
  123. data/lib/files.com/models/user_cipher_use.rb +63 -0
  124. data/lib/files.com/models/user_request.rb +127 -0
  125. data/lib/files.com/response.rb +25 -0
  126. data/lib/files.com/sizable_io.rb +32 -0
  127. data/lib/files.com/system_profiler.rb +56 -0
  128. data/lib/files.com/util.rb +106 -0
  129. data/lib/files.com/version.rb +5 -0
  130. data/spec/list_spec.rb +214 -0
  131. data/spec/models/file_spec.rb +68 -0
  132. data/spec/models/folder_spec.rb +40 -0
  133. data/spec/spec_helper.rb +36 -0
  134. data/test.sh +8 -0
  135. data/test/test.rb +75 -0
  136. metadata +235 -0
@@ -0,0 +1,252 @@
1
+ # Bundle
2
+
3
+ ## Example Bundle Object
4
+
5
+ ```
6
+ {
7
+ "code": "abc123",
8
+ "url": "https://subdomain.files.com/f/12345678",
9
+ "description": "The public description of the bundle.",
10
+ "password_protected": true,
11
+ "require_registration": true,
12
+ "clickwrap_body": "[Legal text]",
13
+ "id": 1,
14
+ "created_at": "2000-01-01T01:00:00Z",
15
+ "expires_at": "2000-01-01T01:00:00Z",
16
+ "max_uses": 1,
17
+ "note": "The internal note on the bundle.",
18
+ "user_id": 1,
19
+ "username": "user",
20
+ "clickwrap_id": 1,
21
+ "inbox_id": 1,
22
+ "paths": [
23
+
24
+ ]
25
+ }
26
+ ```
27
+
28
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
29
+ * `url` (string): Public URL of Share Link
30
+ * `description` (string): Public description
31
+ * `password_protected` (boolean): Is this bundle password protected?
32
+ * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
33
+ * `clickwrap_body` (string): Legal text that must be agreed to prior to accessing Bundle.
34
+ * `id` (int64): Bundle ID
35
+ * `created_at` (date-time): Bundle created at date/time
36
+ * `expires_at` (date-time): Bundle expiration date/time
37
+ * `max_uses` (int64): Maximum number of times bundle can be accessed
38
+ * `note` (string): Bundle internal note
39
+ * `user_id` (int64): Bundle creator user ID
40
+ * `username` (string): Bundle creator username
41
+ * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
42
+ * `inbox_id` (int64): ID of the associated inbox, if available.
43
+ * `paths` (array): A list of paths in this bundle
44
+ * `password` (string): Password for this bundle.
45
+
46
+
47
+ ---
48
+
49
+ ## List Bundles
50
+
51
+ ```
52
+ Files::Bundle.list(
53
+ user_id: 1,
54
+ page: 1,
55
+ per_page: 1
56
+ )
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
62
+ * `page` (int64): Current page number.
63
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
64
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
65
+ * `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.
66
+ * `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 `site_id`, `created_at` or `code`.
67
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`.
68
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`.
69
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`.
70
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`.
71
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`.
72
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`.
73
+
74
+
75
+ ---
76
+
77
+ ## Show Bundle
78
+
79
+ ```
80
+ Files::Bundle.find(id)
81
+ ```
82
+
83
+ ### Parameters
84
+
85
+ * `id` (int64): Required - Bundle ID.
86
+
87
+
88
+ ---
89
+
90
+ ## Create Bundle
91
+
92
+ ```
93
+ Files::Bundle.create(
94
+ user_id: 1,
95
+ paths: ["file.txt"],
96
+ password: "Password",
97
+ expires_at: "2000-01-01T01:00:00Z",
98
+ max_uses: 1,
99
+ description: "The public description of the bundle.",
100
+ note: "The internal note on the bundle.",
101
+ code: "abc123",
102
+ require_registration: true,
103
+ clickwrap_id: 1,
104
+ inbox_id: 1
105
+ )
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
111
+ * `paths` (array(string)): Required - A list of paths to include in this bundle.
112
+ * `password` (string): Password for this bundle.
113
+ * `expires_at` (string): Bundle expiration date/time
114
+ * `max_uses` (int64): Maximum number of times bundle can be accessed
115
+ * `description` (string): Public description
116
+ * `note` (string): Bundle internal note
117
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
118
+ * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
119
+ * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
120
+ * `inbox_id` (int64): ID of the associated inbox, if available.
121
+
122
+
123
+ ---
124
+
125
+ ## Send email(s) with a link to bundle
126
+
127
+ ```
128
+ Files::Bundle.share(id,
129
+ to: ["johndoe@gmail.com"],
130
+ note: "Just a note."
131
+ )
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+ * `id` (int64): Required - Bundle ID.
137
+ * `to` (array(string)): Required - A list of email addresses to share this bundle with.
138
+ * `note` (string): Note to include in email.
139
+
140
+
141
+ ---
142
+
143
+ ## Update Bundle
144
+
145
+ ```
146
+ Files::Bundle.update(id,
147
+ password: "Password",
148
+ expires_at: "2000-01-01T01:00:00Z",
149
+ max_uses: 1,
150
+ description: "The public description of the bundle.",
151
+ note: "The internal note on the bundle.",
152
+ code: "abc123",
153
+ require_registration: true,
154
+ clickwrap_id: 1,
155
+ inbox_id: 1
156
+ )
157
+ ```
158
+
159
+ ### Parameters
160
+
161
+ * `id` (int64): Required - Bundle ID.
162
+ * `password` (string): Password for this bundle.
163
+ * `expires_at` (string): Bundle expiration date/time
164
+ * `max_uses` (int64): Maximum number of times bundle can be accessed
165
+ * `description` (string): Public description
166
+ * `note` (string): Bundle internal note
167
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
168
+ * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
169
+ * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
170
+ * `inbox_id` (int64): ID of the associated inbox, if available.
171
+
172
+
173
+ ---
174
+
175
+ ## Delete Bundle
176
+
177
+ ```
178
+ Files::Bundle.delete(id)
179
+ ```
180
+
181
+ ### Parameters
182
+
183
+ * `id` (int64): Required - Bundle ID.
184
+
185
+
186
+ ---
187
+
188
+ ## Send email(s) with a link to bundle
189
+
190
+ ```
191
+ bundle = Files::Bundle.list_for(path).first
192
+
193
+ bundle.share(
194
+ to: ["johndoe@gmail.com"],
195
+ note: "Just a note."
196
+ )
197
+ ```
198
+
199
+ ### Parameters
200
+
201
+ * `id` (int64): Required - Bundle ID.
202
+ * `to` (array(string)): Required - A list of email addresses to share this bundle with.
203
+ * `note` (string): Note to include in email.
204
+
205
+
206
+ ---
207
+
208
+ ## Update Bundle
209
+
210
+ ```
211
+ bundle = Files::Bundle.list_for(path).first
212
+
213
+ bundle.update(
214
+ password: "Password",
215
+ expires_at: "2000-01-01T01:00:00Z",
216
+ max_uses: 1,
217
+ description: "The public description of the bundle.",
218
+ note: "The internal note on the bundle.",
219
+ code: "abc123",
220
+ require_registration: true,
221
+ clickwrap_id: 1,
222
+ inbox_id: 1
223
+ )
224
+ ```
225
+
226
+ ### Parameters
227
+
228
+ * `id` (int64): Required - Bundle ID.
229
+ * `password` (string): Password for this bundle.
230
+ * `expires_at` (string): Bundle expiration date/time
231
+ * `max_uses` (int64): Maximum number of times bundle can be accessed
232
+ * `description` (string): Public description
233
+ * `note` (string): Bundle internal note
234
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
235
+ * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
236
+ * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
237
+ * `inbox_id` (int64): ID of the associated inbox, if available.
238
+
239
+
240
+ ---
241
+
242
+ ## Delete Bundle
243
+
244
+ ```
245
+ bundle = Files::Bundle.list_for(path).first
246
+
247
+ bundle.delete
248
+ ```
249
+
250
+ ### Parameters
251
+
252
+ * `id` (int64): Required - Bundle ID.
@@ -0,0 +1,35 @@
1
+ # BundleDownload
2
+
3
+ ## Example BundleDownload Object
4
+
5
+ ```
6
+ {
7
+ "download_method": "file",
8
+ "path": "a/b/test.txt",
9
+ "created_at": "2020-01-01 00:00:00"
10
+ }
11
+ ```
12
+
13
+ * `download_method` (string): Download method (file or full_zip)
14
+ * `path` (string): Download path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
15
+ * `created_at` (date-time): Download date/time
16
+
17
+
18
+ ---
19
+
20
+ ## List Bundle Downloads
21
+
22
+ ```
23
+ Files::BundleDownload.list(
24
+ page: 1,
25
+ per_page: 1,
26
+ bundle_registration_id: 1
27
+ )
28
+ ```
29
+
30
+ ### Parameters
31
+
32
+ * `page` (int64): Current page number.
33
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
34
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
35
+ * `bundle_registration_id` (int64): Required - BundleRegistration ID
@@ -0,0 +1,143 @@
1
+ # Clickwrap
2
+
3
+ ## Example Clickwrap Object
4
+
5
+ ```
6
+ {
7
+ "name": "Example Site NDA for Files.com Use",
8
+ "body": "[Legal body text]",
9
+ "use_with_users": "",
10
+ "use_with_bundles": "",
11
+ "use_with_inboxes": ""
12
+ }
13
+ ```
14
+
15
+ * `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
16
+ * `body` (string): Body text of Clickwrap (supports Markdown formatting).
17
+ * `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
18
+ * `use_with_bundles` (string): Use this Clickwrap for Bundles?
19
+ * `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
20
+ * `id` (int64): Clickwrap ID.
21
+
22
+
23
+ ---
24
+
25
+ ## List Clickwraps
26
+
27
+ ```
28
+ Files::Clickwrap.list(
29
+ page: 1,
30
+ per_page: 1
31
+ )
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ * `page` (int64): Current page number.
37
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
38
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
39
+
40
+
41
+ ---
42
+
43
+ ## Show Clickwrap
44
+
45
+ ```
46
+ Files::Clickwrap.find(id)
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+ * `id` (int64): Required - Clickwrap ID.
52
+
53
+
54
+ ---
55
+
56
+ ## Create Clickwrap
57
+
58
+ ```
59
+ Files::Clickwrap.create(
60
+ name: "Example Site NDA for Files.com Use",
61
+ body: "[Legal body text]"
62
+ )
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ * `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
68
+ * `body` (string): Body text of Clickwrap (supports Markdown formatting).
69
+ * `use_with_bundles` (string): Use this Clickwrap for Bundles?
70
+ * `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
71
+ * `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
72
+
73
+
74
+ ---
75
+
76
+ ## Update Clickwrap
77
+
78
+ ```
79
+ Files::Clickwrap.update(id,
80
+ name: "Example Site NDA for Files.com Use",
81
+ body: "[Legal body text]"
82
+ )
83
+ ```
84
+
85
+ ### Parameters
86
+
87
+ * `id` (int64): Required - Clickwrap ID.
88
+ * `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
89
+ * `body` (string): Body text of Clickwrap (supports Markdown formatting).
90
+ * `use_with_bundles` (string): Use this Clickwrap for Bundles?
91
+ * `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
92
+ * `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
93
+
94
+
95
+ ---
96
+
97
+ ## Delete Clickwrap
98
+
99
+ ```
100
+ Files::Clickwrap.delete(id)
101
+ ```
102
+
103
+ ### Parameters
104
+
105
+ * `id` (int64): Required - Clickwrap ID.
106
+
107
+
108
+ ---
109
+
110
+ ## Update Clickwrap
111
+
112
+ ```
113
+ clickwrap = Files::Clickwrap.list_for(path).first
114
+
115
+ clickwrap.update(
116
+ name: "Example Site NDA for Files.com Use",
117
+ body: "[Legal body text]"
118
+ )
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+ * `id` (int64): Required - Clickwrap ID.
124
+ * `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
125
+ * `body` (string): Body text of Clickwrap (supports Markdown formatting).
126
+ * `use_with_bundles` (string): Use this Clickwrap for Bundles?
127
+ * `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
128
+ * `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
129
+
130
+
131
+ ---
132
+
133
+ ## Delete Clickwrap
134
+
135
+ ```
136
+ clickwrap = Files::Clickwrap.list_for(path).first
137
+
138
+ clickwrap.delete
139
+ ```
140
+
141
+ ### Parameters
142
+
143
+ * `id` (int64): Required - Clickwrap ID.
@@ -0,0 +1,35 @@
1
+ # DnsRecord
2
+
3
+ ## Example DnsRecord Object
4
+
5
+ ```
6
+ {
7
+ "id": "customdomain.com-CNAME-site.files.com",
8
+ "domain": "my-custom-domain.com",
9
+ "rrtype": "CNAME",
10
+ "value": "mysite.files.com"
11
+ }
12
+ ```
13
+
14
+ * `id` (string): Unique label for DNS record; used by Zapier and other integrations.
15
+ * `domain` (string): DNS record domain name
16
+ * `rrtype` (string): DNS record type
17
+ * `value` (string): DNS record value
18
+
19
+
20
+ ---
21
+
22
+ ## Show site DNS configuration
23
+
24
+ ```
25
+ Files::DnsRecord.list(
26
+ page: 1,
27
+ per_page: 1
28
+ )
29
+ ```
30
+
31
+ ### Parameters
32
+
33
+ * `page` (int64): Current page number.
34
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.