atlas_rb 0.0.85 → 0.0.87

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a85ca8a2fc7cb44ff2d348c03e2a1d8a0b5c01a35ddeccd823445071290d4ea0
4
- data.tar.gz: 1dbf5a8aeb3052c5841003951710320d23559133f00a2a24ed57bc7631472c79
3
+ metadata.gz: dc46e02febd818ebeae248bdfe2cd09bb98621bea3c03b9bb63c6e6b00047da6
4
+ data.tar.gz: 8b933b86bc86d6127789d22b6585bef3bb590b5ca40a14ae50cb456356d0de26
5
5
  SHA512:
6
- metadata.gz: 86d853b18df5e0f278de6e4c58bf8df6705fc88d495c72ebd44c7e2075357e486e3c7c5702bb40ae7cdd211576a374f2bda920fc2aba3f1f0be3a7f8999388f0
7
- data.tar.gz: 255bfa1ce0f3edf9268dd58b86093d429e2fac74d118a72a68e02106d9bc5779978c874b6d6ded9ffe68798949c2ffef90bd845aa66d34a93c23fab48962b16f
6
+ metadata.gz: 642f8e95f4113401726f28d4221e79e9e7225463a94d633426775cf57e969f07bc0414446d6ebf0fd859d7e334f235ff7dc3b04639729b7b27472adfbd09fc4d
7
+ data.tar.gz: fa7d393184858673d6f9ea6138cdc77bd01d7f62f73298d16018935f49b079eea9055fdfd282b2098b7327bdcc3d1b1a8f5c673c5a7eaf52620efa12c54216e0
data/.version CHANGED
@@ -1 +1 @@
1
- 0.0.85
1
+ 0.0.87
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atlas_rb (0.0.85)
4
+ atlas_rb (0.0.87)
5
5
  faraday (~> 2.7)
6
6
  faraday-follow_redirects (~> 0.3.0)
7
7
  faraday-multipart (~> 1)
@@ -63,12 +63,13 @@ module AtlasRb
63
63
  # List the Works in a Collection.
64
64
  #
65
65
  # @param id [String] the Collection ID.
66
- # @return [Hash] the child listing from `GET /collections/<id>/children`.
66
+ # @return [Array<AtlasRb::Mash>] the child listing from
67
+ # `GET /collections/<id>/children`, one entry per Work.
67
68
  #
68
69
  # @example
69
- # AtlasRb::Collection.children("col-456")
70
+ # AtlasRb::Collection.children("col-456").each { |work| puts work.noid }
70
71
  def self.children(id)
71
- AtlasRb::Mash.new(JSON.parse(connection({}).get(ROUTE + id + '/children')&.body))
72
+ JSON.parse(connection({}).get(ROUTE + id + '/children')&.body).map { |entry| AtlasRb::Mash.new(entry) }
72
73
  end
73
74
 
74
75
  # Replace a Collection's metadata by uploading a MODS XML document.
@@ -67,12 +67,13 @@ module AtlasRb
67
67
  # List the immediate children (sub-Communities and Collections) of a Community.
68
68
  #
69
69
  # @param id [String] the parent Community ID.
70
- # @return [Hash] the child listing from `GET /communities/<id>/children`.
70
+ # @return [Array<AtlasRb::Mash>] the child listing from
71
+ # `GET /communities/<id>/children`, one entry per child.
71
72
  #
72
73
  # @example
73
- # AtlasRb::Community.children("c-123")
74
+ # AtlasRb::Community.children("c-123").each { |child| puts child.noid }
74
75
  def self.children(id)
75
- AtlasRb::Mash.new(JSON.parse(connection({}).get(ROUTE + id + '/children')&.body))
76
+ JSON.parse(connection({}).get(ROUTE + id + '/children')&.body).map { |entry| AtlasRb::Mash.new(entry) }
76
77
  end
77
78
 
78
79
  # Replace a Community's metadata by uploading a MODS XML document.
data/lib/atlas_rb/work.rb CHANGED
@@ -96,12 +96,13 @@ module AtlasRb
96
96
  # render each file's display name, size, and download URL.
97
97
  #
98
98
  # @param id [String] the Work ID.
99
- # @return [Hash] the listing from `GET /works/<id>/files`.
99
+ # @return [Array<AtlasRb::Mash>] the listing from `GET /works/<id>/files`,
100
+ # one entry per attached file.
100
101
  #
101
102
  # @example
102
- # AtlasRb::Work.files("w-789")
103
+ # AtlasRb::Work.files("w-789").each { |f| puts f.label }
103
104
  def self.files(id)
104
- AtlasRb::Mash.new(JSON.parse(connection({}).get(ROUTE + id + '/files')&.body))
105
+ JSON.parse(connection({}).get(ROUTE + id + '/files')&.body).map { |entry| AtlasRb::Mash.new(entry) }
105
106
  end
106
107
 
107
108
  # Fetch the Work's MODS representation in the requested format.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlas_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.85
4
+ version: 0.0.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cliff