lib/folio_client.rb in folio_client-0.2.1 vs lib/folio_client.rb in folio_client-0.3.0

- old
+ new

@@ -29,11 +29,11 @@ self end delegate :config, :connection, :get, :post, to: :instance - delegate :fetch_hrid, to: :instance + delegate :fetch_hrid, :fetch_marc_hash, to: :instance end attr_accessor :config # Send an authenticated get request @@ -70,8 +70,15 @@ # Wrap methods in `TokenWrapper` to ensure a new token is fetched automatically if expired def fetch_hrid(...) TokenWrapper.refresh(config, connection) do inventory = Inventory.new(self) inventory.fetch_hrid(...) + end + end + + def fetch_marc_hash(...) + TokenWrapper.refresh(config, connection) do + source_storage = SourceStorage.new(self) + source_storage.fetch_marc_hash(...) end end end