atlas_rb 0.0.87 → 0.0.88
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/.version +1 -1
- data/Gemfile.lock +1 -1
- data/lib/atlas_rb/collection.rb +7 -4
- data/lib/atlas_rb/community.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32ee794eeaed7d20594470df3855ba0d970c9c80e4f4bf8ce2f930e287a56f26
|
|
4
|
+
data.tar.gz: b1dd7c4007aa3353d5bcc21a2f4022b33f4986e28ed144a92c541cddd194b801
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a61eb2b1217fa42f19bb37673e8244cd6544976446cf8f85657b25d928cebbc0c763b6e660984f71037c669f3638dd6a4657788cc628ed68e18cb52a0d99ccc
|
|
7
|
+
data.tar.gz: b721b72a80318001ce3e2e770dbc592665c1bad510c9db157bef04dcfc5b706978306ecc9dacec902817116c9b4127694769eb6c7b4d22763ee476bc76084d5a
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.88
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/collection.rb
CHANGED
|
@@ -62,14 +62,17 @@ module AtlasRb
|
|
|
62
62
|
|
|
63
63
|
# List the Works in a Collection.
|
|
64
64
|
#
|
|
65
|
+
# The endpoint returns just the noids; resolve each through
|
|
66
|
+
# {Resource.find} (or {Work.find}) when a full payload is needed.
|
|
67
|
+
#
|
|
65
68
|
# @param id [String] the Collection ID.
|
|
66
|
-
# @return [Array<
|
|
67
|
-
# `GET /collections/<id>/children`, one entry per Work.
|
|
69
|
+
# @return [Array<String>] child noids from `GET /collections/<id>/children`.
|
|
68
70
|
#
|
|
69
71
|
# @example
|
|
70
|
-
# AtlasRb::Collection.children("col-456")
|
|
72
|
+
# AtlasRb::Collection.children("col-456")
|
|
73
|
+
# # => ["w-789", "w-790"]
|
|
71
74
|
def self.children(id)
|
|
72
|
-
JSON.parse(connection({}).get(ROUTE + id + '/children')&.body)
|
|
75
|
+
JSON.parse(connection({}).get(ROUTE + id + '/children')&.body)
|
|
73
76
|
end
|
|
74
77
|
|
|
75
78
|
# Replace a Collection's metadata by uploading a MODS XML document.
|
data/lib/atlas_rb/community.rb
CHANGED
|
@@ -66,14 +66,18 @@ module AtlasRb
|
|
|
66
66
|
|
|
67
67
|
# List the immediate children (sub-Communities and Collections) of a Community.
|
|
68
68
|
#
|
|
69
|
+
# The endpoint returns just the noids; resolve each through
|
|
70
|
+
# {Resource.find} (which dispatches by type) when richer payloads are
|
|
71
|
+
# needed.
|
|
72
|
+
#
|
|
69
73
|
# @param id [String] the parent Community ID.
|
|
70
|
-
# @return [Array<
|
|
71
|
-
# `GET /communities/<id>/children`, one entry per child.
|
|
74
|
+
# @return [Array<String>] child noids from `GET /communities/<id>/children`.
|
|
72
75
|
#
|
|
73
76
|
# @example
|
|
74
|
-
# AtlasRb::Community.children("c-123")
|
|
77
|
+
# AtlasRb::Community.children("c-123")
|
|
78
|
+
# # => ["fn106x926", "kw52j804p"]
|
|
75
79
|
def self.children(id)
|
|
76
|
-
JSON.parse(connection({}).get(ROUTE + id + '/children')&.body)
|
|
80
|
+
JSON.parse(connection({}).get(ROUTE + id + '/children')&.body)
|
|
77
81
|
end
|
|
78
82
|
|
|
79
83
|
# Replace a Community's metadata by uploading a MODS XML document.
|