folio_api_client 0.4.0 → 0.4.2

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: b95e817f47b4694776baae831bcad7784810d06e7533577f27f8bcf4ea216b06
4
- data.tar.gz: 63291ad25685d7c4ba71dd2399104b8925241da84eca2483f8bd63b4567b4454
3
+ metadata.gz: b840ff7acc1495be7cb4dc3895c9a0e372d98df6db09bd45e5a77725e1cc3444
4
+ data.tar.gz: 187a19aa42bfe6e1f64e859dfd1b7d71c03db8a0967ab93a7df2318bdc2c4b32
5
5
  SHA512:
6
- metadata.gz: '018541167173b30bbf0c938c10465888581fd87d8c64885fd59dfcc3ea4a2305e93d75533f55c752b7eb495ee2b72be7b8514246caffe7bdebbe56b18f5f44ee'
7
- data.tar.gz: 7812af3dbf43c33aa37c490e8a0a084de82842b64bcdc86571c0eb9e713ad293884f7ff03098d26d15acd75bbcb4a73a89d7f2c2d4eee6e1f32eccf1233405bf
6
+ metadata.gz: 4b1d313a2cf74cd8b28f5d151239136a3fd8c7fe4db9a2bb85c924dd9390ab464e733012fc95d8bc8bf274db6571e2638f66ab0e4fa0633e4e0b5f372184647c
7
+ data.tar.gz: 52216d3b49b1b5d5c45c3698eb95eb8350aca7b59846de99f9498524c3e2fe8f202f7a8227a7f53b9f5b6e03da9ad6d33be816e7e87a12412579ecd6c1e445ee
data/README.md CHANGED
@@ -47,6 +47,7 @@ client.delete(path, body, content_type: 'application/json'))
47
47
 
48
48
  client.find_item_record(barcode: 'some-barcode')
49
49
  client.find_location_record(location_id: 'some-location-id')
50
+ client.find_material_type_record(material_type_id: 'some-material-type-id')
50
51
  client.find_holdings_record(holdings_record_id: 'some-holdings-record-id')
51
52
  client.find_instance_record(instance_record_id: 'some-instance-record-id')
52
53
  client.find_instance_record(instance_record_hrid: 'some-instance-record-hrid')
@@ -15,7 +15,19 @@ class FolioApiClient
15
15
  end
16
16
 
17
17
  def find_location_record(location_id:)
18
+ return nil if location_id.nil?
19
+
18
20
  self.get("/locations/#{location_id}")
21
+ rescue Faraday::ResourceNotFound
22
+ nil
23
+ end
24
+
25
+ def find_material_type_record(material_type_id:)
26
+ return nil if material_type_id.nil?
27
+
28
+ self.get("/material-types/#{material_type_id}")
29
+ rescue Faraday::ResourceNotFound
30
+ nil
19
31
  end
20
32
 
21
33
  def find_loan_type_record(loan_type_id:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FolioApiClient
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: folio_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric O'Hanlon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-06 00:00:00.000000000 Z
11
+ date: 2025-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday