files.com 1.0.91

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,94 @@
1
+ # MessageReaction
2
+
3
+ ## Example MessageReaction 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
+
16
+
17
+ ---
18
+
19
+ ## List Message Reactions
20
+
21
+ ```
22
+ Files::MessageReaction.list(
23
+ user_id: 1,
24
+ page: 1,
25
+ per_page: 1,
26
+ message_id: 1
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
+ * `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.
36
+ * `message_id` (int64): Required - Message to return reactions for.
37
+
38
+
39
+ ---
40
+
41
+ ## Show Message Reaction
42
+
43
+ ```
44
+ Files::MessageReaction.find(id)
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ * `id` (int64): Required - Message Reaction ID.
50
+
51
+
52
+ ---
53
+
54
+ ## Create Message Reaction
55
+
56
+ ```
57
+ Files::MessageReaction.create(
58
+ user_id: 1,
59
+ emoji: "emoji"
60
+ )
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
66
+ * `emoji` (string): Required - Emoji to react with.
67
+
68
+
69
+ ---
70
+
71
+ ## Delete Message Reaction
72
+
73
+ ```
74
+ Files::MessageReaction.delete(id)
75
+ ```
76
+
77
+ ### Parameters
78
+
79
+ * `id` (int64): Required - Message Reaction ID.
80
+
81
+
82
+ ---
83
+
84
+ ## Delete Message Reaction
85
+
86
+ ```
87
+ message_reaction = Files::MessageReaction.list_for(path).first
88
+
89
+ message_reaction.delete
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ * `id` (int64): Required - Message Reaction ID.
@@ -0,0 +1,177 @@
1
+ # Notification
2
+
3
+ ## Example Notification Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "path": "path",
9
+ "group_id": 1,
10
+ "group_name": "",
11
+ "notify_user_actions": true,
12
+ "notify_on_copy": true,
13
+ "send_interval": "fifteen_minutes",
14
+ "unsubscribed": true,
15
+ "unsubscribed_reason": "",
16
+ "user_id": 1,
17
+ "username": "User",
18
+ "suppressed_email": "suppressed_email"
19
+ }
20
+ ```
21
+
22
+ * `id` (int64): Notification ID
23
+ * `path` (string): Folder path to notify on This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
24
+ * `group_id` (int64): Notification group id
25
+ * `group_name` (string): Group name if applicable
26
+ * `notify_user_actions` (boolean): Trigger notification on notification user actions?
27
+ * `notify_on_copy` (boolean): Triggers notification when moving or copying files to this path
28
+ * `send_interval` (string): The time interval that notifications are aggregated to
29
+ * `unsubscribed` (boolean): Is the user unsubscribed from this notification?
30
+ * `unsubscribed_reason` (string): The reason that the user unsubscribed
31
+ * `user_id` (int64): Notification user ID
32
+ * `username` (string): Notification username
33
+ * `suppressed_email` (boolean): If true, it means that the recipient at this user's email address has manually unsubscribed from all emails, or had their email "hard bounce", which means that we are unable to send mail to this user's current email address. Notifications will resume if the user changes their email address.
34
+
35
+
36
+ ---
37
+
38
+ ## List Notifications
39
+
40
+ ```
41
+ Files::Notification.list(
42
+ user_id: 1,
43
+ page: 1,
44
+ per_page: 1,
45
+ group_id: 1,
46
+ path: "path",
47
+ include_ancestors: true
48
+ )
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ * `user_id` (int64): DEPRECATED: Show notifications for this User ID. Use `filter[user_id]` instead.
54
+ * `page` (int64): Current page number.
55
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
56
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
57
+ * `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.
58
+ * `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`, `path`, `user_id` or `group_id`.
59
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
60
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
61
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
62
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
63
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `user_id`, `group_id` or `path`.
64
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `user_id`, `group_id` or `path`.
65
+ * `group_id` (int64): DEPRECATED: Show notifications for this Group ID. Use `filter[group_id]` instead.
66
+ * `path` (string): Show notifications for this Path.
67
+ * `include_ancestors` (boolean): If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
68
+
69
+
70
+ ---
71
+
72
+ ## Show Notification
73
+
74
+ ```
75
+ Files::Notification.find(id)
76
+ ```
77
+
78
+ ### Parameters
79
+
80
+ * `id` (int64): Required - Notification ID.
81
+
82
+
83
+ ---
84
+
85
+ ## Create Notification
86
+
87
+ ```
88
+ Files::Notification.create(
89
+ user_id: 1,
90
+ notify_on_copy: true,
91
+ notify_user_actions: true,
92
+ send_interval: "daily",
93
+ group_id: 1,
94
+ path: "path",
95
+ username: "User"
96
+ )
97
+ ```
98
+
99
+ ### Parameters
100
+
101
+ * `user_id` (int64): The id of the user to notify. Provide `user_id`, `username` or `group_id`.
102
+ * `notify_on_copy` (boolean): If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
103
+ * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
104
+ * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
105
+ * `group_id` (int64): The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
106
+ * `path` (string): Path
107
+ * `username` (string): The username of the user to notify. Provide `user_id`, `username` or `group_id`.
108
+
109
+
110
+ ---
111
+
112
+ ## Update Notification
113
+
114
+ ```
115
+ Files::Notification.update(id,
116
+ notify_on_copy: true,
117
+ notify_user_actions: true,
118
+ send_interval: "daily"
119
+ )
120
+ ```
121
+
122
+ ### Parameters
123
+
124
+ * `id` (int64): Required - Notification ID.
125
+ * `notify_on_copy` (boolean): If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
126
+ * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
127
+ * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
128
+
129
+
130
+ ---
131
+
132
+ ## Delete Notification
133
+
134
+ ```
135
+ Files::Notification.delete(id)
136
+ ```
137
+
138
+ ### Parameters
139
+
140
+ * `id` (int64): Required - Notification ID.
141
+
142
+
143
+ ---
144
+
145
+ ## Update Notification
146
+
147
+ ```
148
+ notification = Files::Notification.list_for(path).first
149
+
150
+ notification.update(
151
+ notify_on_copy: true,
152
+ notify_user_actions: true,
153
+ send_interval: "daily"
154
+ )
155
+ ```
156
+
157
+ ### Parameters
158
+
159
+ * `id` (int64): Required - Notification ID.
160
+ * `notify_on_copy` (boolean): If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
161
+ * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
162
+ * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
163
+
164
+
165
+ ---
166
+
167
+ ## Delete Notification
168
+
169
+ ```
170
+ notification = Files::Notification.list_for(path).first
171
+
172
+ notification.delete
173
+ ```
174
+
175
+ ### Parameters
176
+
177
+ * `id` (int64): Required - Notification ID.
@@ -0,0 +1,72 @@
1
+ # Payment
2
+
3
+ ## Example Payment Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "amount": "",
9
+ "balance": "",
10
+ "created_at": "2000-01-01T01:00:00Z",
11
+ "currency": "USD",
12
+ "download_uri": "https://url...",
13
+ "invoice_line_items": [
14
+
15
+ ],
16
+ "method": "paypal",
17
+ "payment_line_items": [
18
+
19
+ ],
20
+ "payment_reversed_at": "2000-01-01T01:00:00Z",
21
+ "payment_type": "",
22
+ "site_name": "My Site",
23
+ "type": "invoice",
24
+ "updated_at": "2000-01-01T01:00:00Z"
25
+ }
26
+ ```
27
+
28
+ * `id` (int64): Line item Id
29
+ * `amount` (double): Line item amount
30
+ * `balance` (double): Line item balance
31
+ * `created_at` (date-time): Line item created at
32
+ * `currency` (string): Line item currency
33
+ * `download_uri` (string): Line item download uri
34
+ * `invoice_line_items` (array): Associated invoice line items
35
+ * `method` (string): Line item payment method
36
+ * `payment_line_items` (array): Associated payment line items
37
+ * `payment_reversed_at` (date-time): Date/time payment was reversed if applicable
38
+ * `payment_type` (string): Type of payment if applicable
39
+ * `site_name` (string): Site name this line item is for
40
+ * `type` (string): Type of line item, either payment or invoice
41
+ * `updated_at` (date-time): Line item updated at
42
+
43
+
44
+ ---
45
+
46
+ ## List Payments
47
+
48
+ ```
49
+ Files::Payment.list(
50
+ page: 1,
51
+ per_page: 1
52
+ )
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+ * `page` (int64): Current page number.
58
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
59
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
60
+
61
+
62
+ ---
63
+
64
+ ## Show Payment
65
+
66
+ ```
67
+ Files::Payment.find(id)
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+ * `id` (int64): Required - Payment ID.
@@ -0,0 +1,19 @@
1
+ # PaymentLineItem
2
+
3
+ ## Example PaymentLineItem Object
4
+
5
+ ```
6
+ {
7
+ "amount": "",
8
+ "created_at": "2000-01-01T01:00:00Z",
9
+ "invoice_id": 1,
10
+ "payment_id": 1,
11
+ "updated_at": "2000-01-01T01:00:00Z"
12
+ }
13
+ ```
14
+
15
+ * `amount` (double): Payment line item amount
16
+ * `created_at` (date-time): Payment line item created at date/time
17
+ * `invoice_id` (int64): Invoice ID
18
+ * `payment_id` (int64): Payment ID
19
+ * `updated_at` (date-time): Payment line item updated at date/time
@@ -0,0 +1,95 @@
1
+ # Permission
2
+
3
+ ## Example Permission Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "path": "",
9
+ "user_id": 1,
10
+ "username": "Sser",
11
+ "group_id": 1,
12
+ "group_name": "",
13
+ "permission": "full",
14
+ "recursive": true
15
+ }
16
+ ```
17
+
18
+ * `id` (int64): Permission ID
19
+ * `path` (string): Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
20
+ * `user_id` (int64): User ID
21
+ * `username` (string): User's username
22
+ * `group_id` (int64): Group ID
23
+ * `group_name` (string): Group name if applicable
24
+ * `permission` (string): Permission type
25
+ * `recursive` (boolean): Does this permission apply to subfolders?
26
+
27
+
28
+ ---
29
+
30
+ ## List Permissions
31
+
32
+ ```
33
+ Files::Permission.list(path,
34
+ page: 1,
35
+ per_page: 1,
36
+ group_id: 1,
37
+ user_id: 1,
38
+ include_groups: true
39
+ )
40
+ ```
41
+
42
+ ### Parameters
43
+
44
+ * `page` (int64): Current page number.
45
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
46
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
47
+ * `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.
48
+ * `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 `deleted_at`, `group_id`, `path`, `user_id` or `permission`.
49
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
50
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
51
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
52
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
53
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `group_id`, `user_id` or `path`.
54
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`.
55
+ * `path` (string): DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
56
+ * `group_id` (string): DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
57
+ * `user_id` (string): DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
58
+ * `include_groups` (boolean): If searching by user or group, also include user's permissions that are inherited from its groups?
59
+
60
+
61
+ ---
62
+
63
+ ## Create Permission
64
+
65
+ ```
66
+ Files::Permission.create(path,
67
+ group_id: 1,
68
+ permission: "full",
69
+ recursive: true,
70
+ user_id: 1,
71
+ username: "Sser"
72
+ )
73
+ ```
74
+
75
+ ### Parameters
76
+
77
+ * `group_id` (int64): Group ID
78
+ * `path` (string): Folder path
79
+ * `permission` (string): Permission type. Can be `admin`, `full`, `readonly`, `writeonly`, `list`, or `history`
80
+ * `recursive` (boolean): Apply to subfolders recursively?
81
+ * `user_id` (int64): User ID. Provide `username` or `user_id`
82
+ * `username` (string): User username. Provide `username` or `user_id`
83
+
84
+
85
+ ---
86
+
87
+ ## Delete Permission
88
+
89
+ ```
90
+ Files::Permission.delete(id)
91
+ ```
92
+
93
+ ### Parameters
94
+
95
+ * `id` (int64): Required - Permission ID.