boxr 0.11.0 → 0.12.0
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/README.md +10 -10
- data/lib/boxr/comments.rb +2 -2
- data/lib/boxr/folders.rb +3 -2
- data/lib/boxr/tasks.rb +2 -1
- data/lib/boxr/version.rb +1 -1
- data/spec/boxr_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b56f62f19efeb0a8dceda9d6202e1ae48482e7
|
4
|
+
data.tar.gz: 90061fcec499a86417cac92dffb1c98f82a6ae1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb9ae2f87f8f9179f4170bf9d8fa1c236d2eff8e4f92cd3775cd024d52eeb63491f045e9750bcc15b99519e3756f72cc52d1c6d1b0949cefea274658fb7789c6
|
7
|
+
data.tar.gz: 985e8aa0dcd6605732eeacf929b6b14d38ea3e157d63739c345c1d0fe406a1a64074b37ab5b5c06f2537af7ef4508fafd0561db9730bd19ae191448970e8bc67
|
data/README.md
CHANGED
@@ -119,7 +119,7 @@ root_folder_items(fields: [], offset: 0, limit: FOLDER_ITEMS_LIMIT)
|
|
119
119
|
create_folder(name, parent)
|
120
120
|
|
121
121
|
update_folder(folder, name: nil, description: nil, parent: nil, shared_link: nil,
|
122
|
-
folder_upload_email_access: nil,
|
122
|
+
folder_upload_email_access: nil, owned_by: nil, sync_state: nil, tags: nil,
|
123
123
|
can_non_owners_invite: nil, if_match: nil)
|
124
124
|
|
125
125
|
move_folder(folder, new_parent, name: nil, if_match: nil)
|
@@ -189,7 +189,7 @@ file_comments(file, fields: [], offset: 0, limit: DEFAULT_LIMIT)
|
|
189
189
|
|
190
190
|
add_comment_to_file(file, message: nil, tagged_message: nil)
|
191
191
|
|
192
|
-
reply_to_comment(
|
192
|
+
reply_to_comment(comment, message: nil, tagged_message: nil)
|
193
193
|
|
194
194
|
change_comment(comment, message)
|
195
195
|
|
@@ -295,7 +295,7 @@ delete_task(task)
|
|
295
295
|
|
296
296
|
task_assignments(task)
|
297
297
|
|
298
|
-
create_task_assignment(task,
|
298
|
+
create_task_assignment(task, assign_to: nil, assign_to_login: nil)
|
299
299
|
|
300
300
|
task_assignment(task)
|
301
301
|
|
@@ -305,13 +305,13 @@ update_task_assignment(task, message: nil, resolution_state: nil)
|
|
305
305
|
```
|
306
306
|
#### [Metadata](https://developers.box.com/metadata-api/#crud)
|
307
307
|
```ruby
|
308
|
-
create_metadata(file, metadata,
|
309
|
-
|
310
|
-
metadata(file,
|
311
|
-
|
312
|
-
update_metadata(file, updates,
|
313
|
-
|
314
|
-
delete_metadata(file,
|
308
|
+
create_metadata(file, metadata, scope: :global, template: :properties)
|
309
|
+
|
310
|
+
metadata(file, scope: :global, template: :properties)
|
311
|
+
|
312
|
+
update_metadata(file, updates, scope: :global, template: :properties)
|
313
|
+
|
314
|
+
delete_metadata(file, scope: :global, template: :properties)
|
315
315
|
```
|
316
316
|
## Contributing
|
317
317
|
|
data/lib/boxr/comments.rb
CHANGED
@@ -14,8 +14,8 @@ module Boxr
|
|
14
14
|
add_comment(:file, file_id, message, tagged_message)
|
15
15
|
end
|
16
16
|
|
17
|
-
def reply_to_comment(
|
18
|
-
comment_id = ensure_id(
|
17
|
+
def reply_to_comment(comment, message: nil, tagged_message: nil)
|
18
|
+
comment_id = ensure_id(comment)
|
19
19
|
add_comment(:comment, comment_id, message, tagged_message)
|
20
20
|
end
|
21
21
|
|
data/lib/boxr/folders.rb
CHANGED
@@ -56,10 +56,11 @@ module Boxr
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def update_folder(folder, name: nil, description: nil, parent: nil, shared_link: nil,
|
59
|
-
folder_upload_email_access: nil,
|
59
|
+
folder_upload_email_access: nil, owned_by: nil, sync_state: nil, tags: nil,
|
60
60
|
can_non_owners_invite: nil, if_match: nil)
|
61
61
|
folder_id = ensure_id(folder)
|
62
62
|
parent_id = ensure_id(parent)
|
63
|
+
owned_by_id = ensure_id(owned_by)
|
63
64
|
uri = "#{FOLDERS_URI}/#{folder_id}"
|
64
65
|
|
65
66
|
attributes = {}
|
@@ -68,7 +69,7 @@ module Boxr
|
|
68
69
|
attributes[:parent] = {id: parent_id} unless parent_id.nil?
|
69
70
|
attributes[:shared_link] = shared_link unless shared_link.nil?
|
70
71
|
attributes[:folder_upload_email] = {access: folder_upload_email_access} unless folder_upload_email_access.nil?
|
71
|
-
attributes[:
|
72
|
+
attributes[:owned_by] = {id: owned_by_id} unless owned_by_id.nil?
|
72
73
|
attributes[:sync_state] = sync_state unless sync_state.nil?
|
73
74
|
attributes[:tags] = tags unless tags.nil?
|
74
75
|
attributes[:can_non_owners_invite] = can_non_owners_invite unless can_non_owners_invite.nil?
|
data/lib/boxr/tasks.rb
CHANGED
@@ -55,8 +55,9 @@ module Boxr
|
|
55
55
|
assignments['entries']
|
56
56
|
end
|
57
57
|
|
58
|
-
def create_task_assignment(task,
|
58
|
+
def create_task_assignment(task, assign_to: nil, assign_to_login: nil)
|
59
59
|
task_id = ensure_id(task)
|
60
|
+
assign_to_id = ensure_id(assign_to)
|
60
61
|
attributes = {task: {type: :task, id: "#{task_id}"}}
|
61
62
|
|
62
63
|
attributes[:assign_to] = {}
|
data/lib/boxr/version.rb
CHANGED
data/spec/boxr_spec.rb
CHANGED
@@ -388,7 +388,7 @@ describe Boxr::Client do
|
|
388
388
|
expect(updated_task.message).to eq(NEW_TASK_MESSAGE)
|
389
389
|
|
390
390
|
puts "create task assignment"
|
391
|
-
task_assignment = BOX_CLIENT.create_task_assignment(TEST_TASK,
|
391
|
+
task_assignment = BOX_CLIENT.create_task_assignment(TEST_TASK, assign_to: @test_user.id)
|
392
392
|
expect(task_assignment.assigned_to.id).to eq(@test_user.id)
|
393
393
|
TASK_ASSIGNMENT = task_assignment
|
394
394
|
|