boxr 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cdb5f7265259244d249458468620150e7a64f19
4
- data.tar.gz: 0adf2236b65d01221f5b5b00d249387ac613e6a8
3
+ metadata.gz: 44f0efa6c33c1ad7a0126cddc1cef3a883782be0
4
+ data.tar.gz: e2c3bd4cb8400ab48106db786a798bb81ed91638
5
5
  SHA512:
6
- metadata.gz: 1113cc5af8e5de187b8c6ebd15625ae2164120ccde300b1e70dd484079ff6139d5eb4871605c1a6473c25e54e9a0896a07aef5ec63a62ff25d9429e3b3dd4963
7
- data.tar.gz: 5a9985a2d4799935c622c0120cd477e7f3c8fd5a2061494dc0ac2cd3046729bb522daf747bd03c09ef7acded42a1863fd895ee069f6977254e3b2cb7386030a1
6
+ metadata.gz: 94f78c8a5af9b80583cf4ec615170201a72a3c5ff0f8d371209ca759249362ed9e6dd0d8a17ac5e95fe37c2ba761b3d5fd79e736ba3a5268b2b649941afb9e8c
7
+ data.tar.gz: a795b2fb4e8ab3e66c5a31177fd40bcb49fc15079cb6774bb9993f8592feade6603bdc84fe97062f72994ad4e645c742666f946d58809b12680dc2f10151069b
data/README.md CHANGED
@@ -88,6 +88,196 @@ file = client.create_shared_link_for_file(file, access: :open)
88
88
  puts "Shared Link: #{file.shared_link.url}"
89
89
  ```
90
90
 
91
+ ### Methods
92
+ #### Folders
93
+ ```ruby
94
+ folder_from_path(path)
95
+
96
+ folder_items(folder, fields: [], offset: 0, limit: FOLDER_ITEMS_LIMIT)
97
+
98
+ root_folder_items(fields: [], offset: 0, limit: FOLDER_ITEMS_LIMIT)
99
+
100
+ create_folder(name, parent)
101
+
102
+ folder(folder_id, fields: [])
103
+
104
+ update_folder(folder, name: nil, description: nil, parent_id: nil, shared_link: nil,
105
+ folder_upload_email_access: nil, owned_by_id: nil, sync_state: nil, tags: nil,
106
+ can_non_owners_invite: nil, if_match: nil)
107
+
108
+ delete_folder(folder, recursive: false, if_match: nil)
109
+
110
+ copy_folder(folder, dest_folder, name: nil)
111
+
112
+ create_shared_link_for_folder(folder, access: nil, unshared_at: nil, can_download: nil, can_preview: nil)
113
+
114
+ disable_shared_link_for_folder(folder)
115
+
116
+ trash(fields: [], offset: 0, limit: FOLDER_ITEMS_LIMIT)
117
+
118
+ trashed_folder(folder, fields: [])
119
+
120
+ delete_trashed_folder(folder)
121
+
122
+ restore_trashed_folder(folder, name: nil, parent_id: nil)
123
+ ```
124
+ #### Files
125
+ ```ruby
126
+ file_from_path(path)
127
+
128
+ file(file_id, fields: [])
129
+
130
+ update_file(file, name: nil, description: nil, parent_id: nil, shared_link: nil, tags: nil, if_match: nil)
131
+
132
+ download_file(file, version: nil, follow_redirect: true)
133
+
134
+ download_url(file, version: nil)
135
+
136
+ upload_file(path_to_file, parent, content_created_at: nil, content_modified_at: nil,
137
+ preflight_check: true, send_content_md5: true)
138
+
139
+ delete_file(file, if_match: nil)
140
+
141
+ upload_new_version_of_file(path_to_file, file, content_modified_at: nil, send_content_md5: true,
142
+ preflight_check: true, if_match: nil)
143
+
144
+ versions_of_file(file)
145
+
146
+ promote_old_version_of_file(file, file_version)
147
+
148
+ delete_old_version_of_file(file, file_version, if_match: nil)
149
+
150
+ copy_file(file, parent, name: nil)
151
+
152
+ thumbnail(file, min_height: nil, min_width: nil, max_height: nil, max_width: nil)
153
+
154
+ create_shared_link_for_file(file, access: nil, unshared_at: nil, can_download: nil, can_preview: nil)
155
+
156
+ disable_shared_link_for_file(file)
157
+
158
+ trashed_file(file, fields: [])
159
+
160
+ delete_trashed_file(file)
161
+
162
+ restore_trashed_file(file, name: nil, parent_id: nil)
163
+ ```
164
+ #### Comments
165
+ ```ruby
166
+ file_comments(file, fields: [], offset: 0, limit: DEFAULT_LIMIT)
167
+
168
+ add_comment_to_file(file, message: nil, tagged_message: nil)
169
+
170
+ reply_to_comment(comment_id, message: nil, tagged_message: nil)
171
+
172
+ change_comment(comment, message)
173
+
174
+ comment(comment_id, fields: [])
175
+
176
+ delete_comment(comment)
177
+ ```
178
+ #### Collaborations
179
+ ```ruby
180
+ folder_collaborations(folder)
181
+
182
+ add_collaboration(folder, accessible_by, role, fields: [], notify: nil)
183
+
184
+ edit_collaboration(collaboration, role: nil, status: nil)
185
+
186
+ remove_collaboration(collaboration)
187
+
188
+ collaboration(collaboration_id, fields: [], status: nil)
189
+
190
+ pending_collaborations()
191
+ ```
192
+ #### Events
193
+ ```ruby
194
+ user_events(stream_position: 0, stream_type: :all, limit: 100)
195
+
196
+ enterprise_events(stream_position: 0, limit: 100, event_type: nil, created_after: nil, created_before: nil)
197
+ ```
198
+ #### Shared Items
199
+ ```ruby
200
+ shared_item(shared_link, shared_link_password: nil)
201
+ ```
202
+ #### Search
203
+ ```ruby
204
+ search(query, scope: nil, file_extensions: nil, created_at_range: nil, updated_at_range: nil, size_range: nil,
205
+ owner_user_ids: nil, ancestor_folder_ids: nil, content_types: nil, type: nil,
206
+ limit: 30, offset: 0)
207
+ ```
208
+ #### Users
209
+ ```ruby
210
+ current_user(fields: [])
211
+
212
+ alias :me :current_user
213
+
214
+ user(user_id, fields: [])
215
+
216
+ all_users(filter_term: nil, fields: [], offset: 0, limit: DEFAULT_LIMIT)
217
+
218
+ create_user(login, name, role: nil, language: nil, is_sync_enabled: nil, job_title: nil,
219
+ phone: nil, address: nil, space_amount: nil, tracking_codes: nil,
220
+ can_see_managed_users: nil, is_external_collab_restricted: nil, status: nil, timezone: nil,
221
+ is_exempt_from_device_limits: nil, is_exempt_from_login_verification: nil)
222
+
223
+
224
+ update_user(user, notify: nil, enterprise: true, name: nil, role: nil, language: nil, is_sync_enabled: nil,
225
+ job_title: nil, phone: nil, address: nil, space_amount: nil, tracking_codes: nil,
226
+ can_see_managed_users: nil, status: nil, timezone: nil, is_exempt_from_device_limits: nil,
227
+ is_exempt_from_login_verification: nil, is_exempt_from_reset_required: nil, is_external_collab_restricted: nil)
228
+
229
+ delete_user(user, notify: nil, force: nil)
230
+ ```
231
+ #### Groups
232
+ ```ruby
233
+ groups(fields: [], offset: 0, limit: DEFAULT_LIMIT)
234
+
235
+ create_group(name)
236
+
237
+ update_group(group, name)
238
+
239
+ alias :rename_group :update_group
240
+
241
+ delete_group(group)
242
+
243
+ group_memberships(group, offset: 0, limit: DEFAULT_LIMIT)
244
+
245
+ group_memberships_for_user(user, offset: 0, limit: DEFAULT_LIMIT)
246
+
247
+ group_memberships_for_me(offset: 0, limit: DEFAULT_LIMIT)
248
+
249
+ group_membership(membership_id)
250
+
251
+ add_user_to_group(user, group, role: nil)
252
+
253
+ update_group_membership(membership, role)
254
+
255
+ delete_group_membership(membership)
256
+
257
+ group_collaborations(group, offset: 0, limit: DEFAULT_LIMIT)
258
+ ```
259
+ #### Tasks
260
+ ```ruby
261
+ file_tasks(file, fields: [])
262
+
263
+ create_task(file, action: :review, message: nil, due_at: nil)
264
+
265
+ task(task_id)
266
+
267
+ update_task(task, action: :review, message: nil, due_at: nil)
268
+
269
+ delete_task(task)
270
+
271
+ task_assignments(task)
272
+
273
+ create_task_assignment(task, assign_to_id: nil, assign_to_login: nil)
274
+
275
+ task_assignment(task)
276
+
277
+ delete_task_assignment(task)
278
+
279
+ update_task_assignment(task, message: nil, resolution_state: nil)
280
+ ```
91
281
 
92
282
  ## Contributing
93
283
 
@@ -40,8 +40,8 @@ module Boxr
40
40
  result
41
41
  end
42
42
 
43
- def collaboration(collaboration, fields: [], status: nil)
44
- collaboration_id = ensure_id(collaboration)
43
+ def collaboration(collaboration_id, fields: [], status: nil)
44
+ collaboration_id = ensure_id(collaboration_id)
45
45
  uri = "#{COLLABORATIONS_URI}/#{collaboration_id}"
46
46
 
47
47
  query = build_fields_query(fields, COLLABORATION_FIELDS_QUERY)
@@ -27,8 +27,8 @@ module Boxr
27
27
  updated_comment
28
28
  end
29
29
 
30
- def comment(comment, fields: [])
31
- comment_id = ensure_id(comment)
30
+ def comment(comment_id, fields: [])
31
+ comment_id = ensure_id(comment_id)
32
32
  uri ="#{COMMENTS_URI}/#{comment_id}"
33
33
  comment, response = get(uri)
34
34
  comment
@@ -17,8 +17,8 @@ module Boxr
17
17
  file
18
18
  end
19
19
 
20
- def file(file, fields: [])
21
- file_id = ensure_id(file)
20
+ def file(file_id, fields: [])
21
+ file_id = ensure_id(file_id)
22
22
  uri = "#{FILES_URI}/#{file_id}"
23
23
  query = build_fields_query(fields, FOLDER_AND_FILE_FIELDS_QUERY)
24
24
  file, response = get(uri, query: query)
@@ -24,8 +24,8 @@ module Boxr
24
24
  items = get_with_pagination(uri, query: query, offset: offset, limit: limit)
25
25
  end
26
26
 
27
- def root_folder_items(fields: [])
28
- folder_items(Boxr::ROOT, fields: fields)
27
+ def root_folder_items(fields: [], offset: 0, limit: FOLDER_ITEMS_LIMIT)
28
+ folder_items(Boxr::ROOT, fields: fields, offset: offset, limit: limit)
29
29
  end
30
30
 
31
31
  def create_folder(name, parent)
@@ -37,8 +37,8 @@ module Boxr
37
37
  created_folder
38
38
  end
39
39
 
40
- def folder(folder, fields: [])
41
- folder_id = ensure_id(folder)
40
+ def folder(folder_id, fields: [])
41
+ folder_id = ensure_id(folder_id)
42
42
  query = build_fields_query(fields, FOLDER_AND_FILE_FIELDS_QUERY)
43
43
  uri = "#{FOLDERS_URI}/#{folder_id}"
44
44
 
@@ -47,8 +47,8 @@ module Boxr
47
47
  memberships = get_with_pagination(uri, offset: offset, limit: limit)
48
48
  end
49
49
 
50
- def group_membership(membership)
51
- membership_id = ensure_id(membership)
50
+ def group_membership(membership_id)
51
+ membership_id = ensure_id(membership_id)
52
52
  uri = "#{GROUP_MEMBERSHIPS_URI}/#{membership_id}"
53
53
  membership, response = get(uri)
54
54
  membership
@@ -21,8 +21,8 @@ module Boxr
21
21
  new_task
22
22
  end
23
23
 
24
- def task(task)
25
- task_id = ensure_id(task)
24
+ def task(task_id)
25
+ task_id = ensure_id(task_id)
26
26
  uri = "#{TASKS_URI}/#{task_id}"
27
27
  task, response = get(uri)
28
28
  task
@@ -10,8 +10,8 @@ module Boxr
10
10
 
11
11
  alias :me :current_user
12
12
 
13
- def user(user, fields: [])
14
- user_id = ensure_id(user)
13
+ def user(user_id, fields: [])
14
+ user_id = ensure_id(user_id)
15
15
  uri = "#{USERS_URI}/#{user_id}"
16
16
  query = build_fields_query(fields, USER_FIELDS_QUERY)
17
17
  user, response = get(uri, query: query)
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Burnette