You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this shows the leaky nature of this interface quite clearly. It returns a more or less random set of data. I'd expect to be able to get a list of links to related resources and a list of operations that I then can invoke.
Something like
links = this.result.getLinks();
--> returns an array of Link instances which have the property, the target
(and perhaps a few additional properties describing the target)
links[0].getProperty() --> examplevocab:events
links[0].getTarget() --> /api/events
...
This link could then simply be passed to the client this.client.getResource(links[0]) or, perhaps more intuitive, links[0].retrieveTarget(this.client)
The text was updated successfully, but these errors were encountered:
Raw resource would also be a bag of random data.
Having that single hypermedia property is a good place to expand with more specialized accessors. Last #11 introduced hypermedia.members that actually filters this bag to those resources with hydra:member relation, leaving original resource untouched.
You can imagine that this bag could come with links or getLink accessors having all hypermedia in one place.
This was raised in PR #11:
I made the following comment:
The text was updated successfully, but these errors were encountered: