Re: [Specifications] EntryPoint question

We introduced the `collection` property to link to related collections without requiring users to invent dedicated properties for each of them. The way I would see a client to work with this is something along the lines of:

```javascript
client
  .retrieve("http://example.com/")
  .resources()
  .ofType("hydra:Collection")
  .where(resource => resource[hydra.manages].[hydra.property] == rdf.type 
      && resource[hydra.manages].[hydra.object] == schema.Event);
  .first()
  .members()
  .each( ... );
```

or, if you would like to make client a bit more aware of Hydra

```javascript
client
  .retrieve("http://example.com/")
  .collections()
  .thatManageMembersOfType(schema.Event)
  .first()
  .members()
  .each( ... );
```


-- 
GitHub Notification of comment by lanthaler
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/155#issuecomment-357357120 using your GitHub account

Received on Friday, 12 January 2018 21:20:13 UTC