boxr 0.11.0 → 0.12.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: cc55f67539d8e74fff66d7516fd9f4cc8cd2dbdb
4
- data.tar.gz: bfaf437be6e34775e61bc9c4144740b7fa467c1f
3
+ metadata.gz: b4b56f62f19efeb0a8dceda9d6202e1ae48482e7
4
+ data.tar.gz: 90061fcec499a86417cac92dffb1c98f82a6ae1e
5
5
  SHA512:
6
- metadata.gz: 53a31ddf944b164e2363718f7308dd0ac061d7132a8707035b40a79f1382852e3442230aa91e530dce0d4384cb92fb9abea576b3e613f9a7d0f136ebebf06bfc
7
- data.tar.gz: 048c73b9ab455c0ac31d02cffe20903054c9c30801a1c7654dde42feb46d3520a8ff3a3e64b8afff99417414fcd36a4249d4fcf430ddf29870dd4162ba0427a2
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, owned_by_id: nil, sync_state: nil, tags: 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(comment_id, message: nil, tagged_message: nil)
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, assign_to_id: nil, assign_to_login: nil)
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, type: :properties)
309
-
310
- metadata(file, type: :properties)
311
-
312
- update_metadata(file, updates, type: :properties)
313
-
314
- delete_metadata(file, type: :properties)
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
 
@@ -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(comment_id, message: nil, tagged_message: nil)
18
- comment_id = ensure_id(comment_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
 
@@ -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, owned_by_id: nil, sync_state: nil, tags: 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[:owned_by_id] = {owned_by: owned_by_id} unless owned_by_id.nil?
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?
@@ -55,8 +55,9 @@ module Boxr
55
55
  assignments['entries']
56
56
  end
57
57
 
58
- def create_task_assignment(task, assign_to_id: nil, assign_to_login: nil)
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] = {}
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "0.11.0"
2
+ VERSION = "0.12.0"
3
3
  end
@@ -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, assign_to_id: @test_user.id)
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
 
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.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Burnette