- From: John Kemp <john@jkemp.net>
- Date: Tue, 6 Oct 2009 19:52:18 -0400
- To: Marcin Hanclik <Marcin.Hanclik@access-company.com>
- Cc: Frederick Hirsch <frederick.hirsch@nokia.com>, W3C Device APIs and Policy WG <public-device-apis@w3.org>
Hey Marcin, On Oct 6, 2009, at 5:35 PM, Marcin Hanclik wrote: > Hi John, > > Would it be possible for you to share [API]? http://jkemp.net/tag/apis-on-the-web.html on my personal website. > > Why would we need APIs to be resources? (I know it is possible, > but ...) I don't think you'd need to have it be that way, but I was just imagining what it would be like if you were to imagine a 'My Calendar' resource, and give it a URI. If you operated an HTTP server on your device, you could give out a URI something like (just an example) http://my-device/Calendar/today to get a list of calendar entries for that day. You could also imagine calling a function - 'calendar.entries( new Date () ) ;' to return exactly the same information - a representation of the same resource pointed to by the URI noted above. I'm not sure if this is useful per se, but for me it reconciles the RESTful with the "scriptful" somewhat if you imagine that the result of a JS call is a representation of the same resource used to fulfill a request to a particular URI. Cheers, - johnk
Received on Tuesday, 6 October 2009 23:52:52 UTC