Draft
Conversation
blms
reviewed
Sep 19, 2025
Comment on lines
+16
to
+22
| const PATH = [ | ||
| 'ns1:VIAFCluster', | ||
| 'ns1:mainHeadings', | ||
| 'ns1:data' | ||
| ]; | ||
|
|
||
| const NAME_ATTRIBUTE = 'ns1:text'; |
Contributor
There was a problem hiding this comment.
Is it ns1 for every result in the response? I actually had to configure a Python VIAF API library to use the new API response and I found that it increased ns2, ns3 etc per each subsequent result. Though not 100% sure we're using the same endpoint (this one was for /search I believe). And since we're only doing this after selecting an entry maybe we only want the first result?
Just in case, here are all the changes I had to make in that library:
Changes to the search params and headers:
maximumRecordscan only be a maximum of 10 (documented)sortKeyshas been renamed tosortKey, and only acceptsholdingscount(documented)httpAccept/Acceptparams no longer work, but passing anAcceptheader does (not documented)Changes to search results (none documented):
- Search results are now nested as
records: { record: [] }orrecords: { record: {} }- Metadata is now nested under
VIAFClusterinside ofrecordData- Most JSON keys are now "namespaced" using
ns2:,ns3:,ns4:prefixes, which increase per result. For example, a result'srecordDatamight look likeand the following search result will have the same keys but with{"ns2:VIAFCluster": {"ns2:mainHeadings": {"ns2:data": {"ns2:text": "My Name"}}}}ns3:prefixed, etc. up tons11.- Other small things, like
numberOfRecordscount being nested undercontentnow, and@aboutrenamed toabout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes an issue with the
ViafIdentifierFormusing an outdated payload structure. It also fixes a CSS issue with the width of the search input element.This pull request will remain a draft until a new release of
core_data_connectoris published.