- From: elf Pavlik <perpetual-tripper@wwelves.org>
- Date: Wed, 21 Oct 2015 11:40:04 +0200
- To: Markus Lanthaler <markus.lanthaler@gmx.net>, public-hydra@w3.org
On 10/20/2015 09:46 PM, Markus Lanthaler wrote: > On 20 Okt 2015 at 02:20, elf Pavlik wrote: >> On 10/18/2015 09:18 PM, Markus Lanthaler wrote: >>> The representation of a specific view on a collection would look somewhat >>> like this with the new proposed design: >>> >>> { >>> "@id": "http://api.example.com/an-issue/comments", >>> "@type": "Collection", >>> "member": [ ... ], >>> "totalItems": 150, >>> "view": { >>> "@id": "/an-issue/comments?page=3", >>> "@type": "PartialCollectionView", >>> "first": "/an-issue/comments", >>> "previous": "/an-issue/comments?page=2", >>> "next": "/an-issue/comments?page=4", >>> "last": "/an-issue/comments?page=498", >>> } >>> } >> >> 1) >> I understand that we look at response to >> GET /an-issue/comments?page=3 > > Correct. > > >> and responses to any other page= will just differ with values 'inside' >> of view object and elements 'inside' of members array. so always >> repeating "@id": "http://api.example.com/an-issue/comments" in the >> 'root' object > > Exactly > > >> 2) >> >> "first": "/an-issue/comments" >> since it has "@type": "Collection" >> >> >> shouldn't we use instead >> >> "first": "/an-issue/comments?page=1" >> which would have "@type": "PartialCollectionView" > > I think both should be considered to be valid, but we should discuss this. I > think the latter would indeed be better. > > >> 3) >> >> what exactly we will get in response to >> GET /an-issue/comments >> >> especially what @id of the view > > Generally speaking that's up to the server, but following the spirit of the > example, it would be view /an-issue/comments?page=1 Thanks Markus! Besides example of some n > 1 page, I would like to propose including in the spec example of response from: GET /an-issue/comments which includes view "@id": "/an-issue/comments?page=1" and note that client may expect *exactly the same response* from: GET /an-issue/comments?page=1 We could also mention that this only applies to 'default paging', in case of using some alternative paging mechanism. Response from: GET /an-issue/comments may include some other kind of view on that particular collection. For example chat messages posted to this collection (ChatChannel) today with prev control to show them day by day. Similar to what we can see on http://socialwg.indiewebcamp.com/irc/social/2015-10-20 Cheers
Received on Wednesday, 21 October 2015 09:40:10 UTC