boxr 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/boxr/groups.rb +10 -0
- data/lib/boxr/version.rb +1 -1
- data/spec/boxr/groups_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06a2fa3c34dacf915b7bb788e854bc9235d2eb0cd92c7ca59e480737553146c4
|
4
|
+
data.tar.gz: 7413454a658067aabe3ff90625e30a029335166ed50f7e05569cd2fe4e583e84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74d6a804d79c88de453c3d348a69950b9a08f85da70ae258ad689daf50c3318dd7eb776763c371f600981a1a2ad2c10652811d2a031a6059b1426abb8fdb61ed
|
7
|
+
data.tar.gz: 3b525fa9e91ee3417247128fb733e6feecaaf328916bcb1cca51ded9f0a2ef9d288f7d33a8f6cabf54580c6505d4e4e9a914f495c115bd17b43a1785ba36d57b
|
data/README.md
CHANGED
@@ -322,6 +322,8 @@ add_email_alias_for_user(user, email)
|
|
322
322
|
remove_email_alias_for_user(user, email_alias)
|
323
323
|
|
324
324
|
delete_user(user, notify: nil, force: nil)
|
325
|
+
|
326
|
+
move_users_folder(user, source_folder = 0, destination_user)
|
325
327
|
```
|
326
328
|
#### [Groups](https://box-content.readme.io/reference#group-object)
|
327
329
|
```ruby
|
data/lib/boxr/groups.rb
CHANGED
@@ -6,6 +6,16 @@ module Boxr
|
|
6
6
|
groups = get_all_with_pagination(GROUPS_URI, query: query, offset: 0, limit: DEFAULT_LIMIT)
|
7
7
|
end
|
8
8
|
|
9
|
+
def group_from_id(group_id, fields: [])
|
10
|
+
group_id = ensure_id(group_id)
|
11
|
+
uri = "#{GROUPS_URI}/#{group_id}"
|
12
|
+
query = build_fields_query(fields, GROUP_FIELDS_QUERY)
|
13
|
+
|
14
|
+
group, response = get(uri, query: query)
|
15
|
+
group
|
16
|
+
end
|
17
|
+
alias :group :group_from_id
|
18
|
+
|
9
19
|
def create_group(name)
|
10
20
|
attributes = {name: name}
|
11
21
|
new_group, response = post(GROUPS_URI, attributes)
|
data/lib/boxr/version.rb
CHANGED
data/spec/boxr/groups_spec.rb
CHANGED
@@ -12,6 +12,10 @@ describe 'group operations' do
|
|
12
12
|
test_group = groups.find{|g| g.name == TEST_GROUP_NAME}
|
13
13
|
expect(test_group).to_not be_nil
|
14
14
|
|
15
|
+
puts "get group info"
|
16
|
+
group_info = BOX_CLIENT.group(test_group)
|
17
|
+
expect(group_info.id).to eq(test_group.id)
|
18
|
+
|
15
19
|
puts "update group"
|
16
20
|
new_name = "Test Boxr Group Renamed"
|
17
21
|
group = BOX_CLIENT.update_group(test_group, new_name)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Burnette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|