- From: Christopher Allan Webber <cwebber@dustycloud.org>
- Date: Tue, 04 Nov 2014 12:36:21 -0600
- To: ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org>
- Cc: "public-vocabs\@w3.org" <public-vocabs@w3.org>
Christopher Allan Webber writes: > ☮ elf Pavlik ☮ writes: > >> Hi, >> >> I start work on compiling review of how Schema.org, Activity Streams 2.0 >> and Hydra model Activity/Action/Operation, Handler/EntryPoint. I >> aim to have it at useful stage before Wednesday session with Social WG >> at TPAC, preferably already on Tuesday. I'd like to gather all relevant >> questions on this thread to avoid creating noise on the list. >> >> My first question relates to reason for creating sub properties of >> http://schema.org/result >> >> Currently only one of them exists http://schema.org/resultReview >> (domainIncludes: ReviewAction, rangeIncludes: Review). I don't >> understand the need for defining it instead of just using generic result. >> >> It looks to me possibly somehow related to hydra:expects and hydra:returns >> http://www.hydra-cg.com/spec/latest/core/#adding-affordances-to-representations >> >> "While links are enough to build read-only Web APIs, more powerful >> affordances are required to build read-write Web APIs. Thus, Hydra >> introduces the notion of operations. Simply speaking, an Operation >> represents the information necessary for a client to construct valid >> HTTP requests in order to manipulate the server's resource state. As >> such, the only required property of an Operation is its HTTP method. >> Optionally, it is also possible to describe what information the server >> *expects* or *returns*, including additional information about HTTP >> status codes that might be returned." >> >> >> In http://schema.org/docs/actions.html >> Example: Movie review site API with -input and -output >> >> Current published version of that example uses ReviewAction as both - >> request and response. I would find it more intuitive to expect Review >> and return either Review or Error. >> >> request >> POST https://api.example.com/review >> >> { >> "@type": "Review", >> "itemReviewed": "http://example.com/movies/123", >> "reviewBody": "yada, yada, yada", >> "reviewRating": { >> "@type": "Rating", >> "ratingValue": "4" >> } >> } >> >> response: same Review just with @id or Error >> >> Cheers! > > Heya elf Pavlik, sorry for the delay on replying to this. I've seen > your name around quite a bit before the Social WG; it's been good to see > you very positive in the group. > > I've cc'ed Jessica, who is doing the bulk of related coding in > MediaGoblin. > > Well... we have movie comments right now, but no review or even voting > systems yet. I'd love to have that of course in MediaGoblin... > > It's a bit embarassing, but I only have a rudimentary wrapping of my > head around how Hydra and other ideas around publishing actions in an > ActivityStreams 2.0 universe work. That makes it kind of hard for me to > respond... Jessica and I have had some back and forth fluctuations on > debating how useful this stuff is. I think neither of us has good > enough of an understanding to respond clearly right now though. > > It seems to me (am I wrong?) that in some way following things similar > to the Pump API method of this could be very similar in "becoming" an > API for read/write access, though maybe I am wrong? > > For example, if we wanted to post a review according to the Pump API > style, we could submit a Review object inReplyTo a movie object? This > seems like a pretty generic setup... is there really any need to define > an API for everything? Presently we're using the Pump API as also an > upload API, and it seems to be working nicely as such.. I wonder what > will happen when federation becomes available > > I guess that's a pretty preliminary wonder at the moment. Maybe it > would be easier to get a sense of what you're thinking in a discussion > on IRC? > > Sorry that it's a very roundabout non-response! > - Chris Hey, I'm deeply embarassed... elf sent me an email asking for feedback off-list, and I meant to send this asking for clarification off-list also because there's a large scope of this to which I'm unfamiliar, so I felt I couldn't be helpful without knowing more. Apologies, anyone other than elf can ignore this email :)
Received on Tuesday, 4 November 2014 18:46:29 UTC