RE: subject of potentialAction as implied target of Action? (+ @id / url)

On 4 Nov 2014 at 03:14, ☮ elf Pavlik ☮ wrote:
> Hello,
> 
> I fiddle with an example of a Comment which one can like, comment on and
> perform some other actions/operations.
> 
> {
>     "@type": "Comment",
>     "@id":
> "https://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a",
>     "url":
> "http://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a",
>     "sameAs": "http://tiny.cc/ob4oox",
>     "about": "http://tmblr.co/ZxcvMv1UViUDg",
>     "author": "https://wwelves.org/perpetual-tripper",
>     "text": "most web APIs nowadays use JSON, with JSON-LD we can ..."
>     "potentialAction": [
>       { "@type": "LikeAction"},
>       { "@type": "CommentAction" }
>     ]
>   }
> }
> 
> I would like to use URI of this comment itself as default target for
> values of potentialAction it advertises, Somehow to infer:

[...]

> Would that maybe make sense as a general convention?

Hydra does exactly that. You just need to replace schema:potentialAction with hydra:operation... obviously you would need to add a bit more information (HTTP method, hydra:expects) to make it usable by tools such as the HydraConsole.



--
Markus Lanthaler
@markuslanthaler

Received on Tuesday, 4 November 2014 22:16:13 UTC