{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/wot/issues/173","repository_url":"https://api.github.com/repos/w3c/wot","labels_url":"https://api.github.com/repos/w3c/wot/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/w3c/wot/issues/173/comments","events_url":"https://api.github.com/repos/w3c/wot/issues/173/events","html_url":"https://github.com/w3c/wot/issues/173","id":157391653,"number":173,"title":"Structure / concretisation of the scripting API","user":{"login":"h0ru5","id":587286,"avatar_url":"https://avatars.githubusercontent.com/u/587286?v=3","gravatar_id":"","url":"https://api.github.com/users/h0ru5","html_url":"https://github.com/h0ru5","followers_url":"https://api.github.com/users/h0ru5/followers","following_url":"https://api.github.com/users/h0ru5/following{/other_user}","gists_url":"https://api.github.com/users/h0ru5/gists{/gist_id}","starred_url":"https://api.github.com/users/h0ru5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h0ru5/subscriptions","organizations_url":"https://api.github.com/users/h0ru5/orgs","repos_url":"https://api.github.com/users/h0ru5/repos","events_url":"https://api.github.com/users/h0ru5/events{/privacy}","received_events_url":"https://api.github.com/users/h0ru5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/wot/labels/Current-Practise","name":"Current-Practise","color":"1d76db"},{"url":"https://api.github.com/repos/w3c/wot/labels/enhancement","name":"enhancement","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-29T15:36:31Z","updated_at":"2016-06-08T14:48:00Z","closed_at":null,"body":"In order to get the discussion more concrete and to get more structure into the API I added a proposal that could be a base for the plugfest and eventually should get merged into ``current-practices``.\r\n\r\nbasic difference to the current practices is a single entry point ``WoT`` (in order to have less global namespace pollution, something that can be leanly required, checked for presence etc.) - that entry object offers several methods that act as factories for objects to interact with the things themselves.\r\n\r\nThere are two types of objects defined: consumed things and exposed things, meaning if the script defines the behavior of the thing or if it uses the behavior of the thing. With this trick, we can also model the physical API (GPIOs, sensors, relays, ...) as things and have a \"narrow waist\".\r\n\r\nhttps://github.com/w3c/wot/tree/master/proposals/restructured-scripting-api\r\n\r\nThis is meant as a first draft  - please review and discuss in this issue.\r\n\r\nI'd like to explicitly invite @tobie, @rwaldron, @louaybassbouss to have a look and comment \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/wot/issues/comments/224613166","html_url":"https://github.com/w3c/wot/issues/173#issuecomment-224613166","issue_url":"https://api.github.com/repos/w3c/wot/issues/173","id":224613166,"user":{"login":"tobie","id":3392,"avatar_url":"https://avatars.githubusercontent.com/u/3392?v=3","gravatar_id":"","url":"https://api.github.com/users/tobie","html_url":"https://github.com/tobie","followers_url":"https://api.github.com/users/tobie/followers","following_url":"https://api.github.com/users/tobie/following{/other_user}","gists_url":"https://api.github.com/users/tobie/gists{/gist_id}","starred_url":"https://api.github.com/users/tobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobie/subscriptions","organizations_url":"https://api.github.com/users/tobie/orgs","repos_url":"https://api.github.com/users/tobie/repos","events_url":"https://api.github.com/users/tobie/events{/privacy}","received_events_url":"https://api.github.com/users/tobie/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T14:48:00Z","updated_at":"2016-06-08T14:48:00Z","body":"> One thought however, the factory should also register the Thing to the servient runtime (allocating resources etc. so that adding interactions would create the exposed endpoints) would this be Ok as a side-effect of the constructor, or should this rather be a seperate method?\r\n\r\nThe latter. Your promise returning factory can eventually both instantiate the object and call that separate method before resolving the promise."}}
{"actor":{"display_login":"tobie"}}