{"action":"created","issue":{"url":"https://api.github.com/repos/jsreport/jsreport-core/issues/1","labels_url":"https://api.github.com/repos/jsreport/jsreport-core/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jsreport/jsreport-core/issues/1/comments","events_url":"https://api.github.com/repos/jsreport/jsreport-core/issues/1/events","html_url":"https://github.com/jsreport/jsreport-core/issues/1","id":119712279,"number":1,"title":"API review","user":{"login":"pofider","id":2041960,"avatar_url":"https://avatars.githubusercontent.com/u/2041960?v=3","gravatar_id":"","url":"https://api.github.com/users/pofider","html_url":"https://github.com/pofider","followers_url":"https://api.github.com/users/pofider/followers","following_url":"https://api.github.com/users/pofider/following{/other_user}","gists_url":"https://api.github.com/users/pofider/gists{/gist_id}","starred_url":"https://api.github.com/users/pofider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pofider/subscriptions","organizations_url":"https://api.github.com/users/pofider/orgs","repos_url":"https://api.github.com/users/pofider/repos","events_url":"https://api.github.com/users/pofider/events{/privacy}","received_events_url":"https://api.github.com/users/pofider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-01T12:58:22Z","updated_at":"2015-12-01T18:43:12Z","closed_at":null,"body":"I have slightly updated the readme of jsreport core and described the API.\r\n\r\n```js\r\nvar jsreport = require('jsreport-core')()\r\n// alternatively manual use of extensions turns of auto discovery\r\njsreport.use(require('jsreport-phantom-pdf')())\r\njsreport.use(require('jsreport-jsrender')())\r\n/* -- */ \r\n\r\njsreport.init().then(function () {     \r\n   jsreport.render({ \r\n       template: { \r\n           content: '<h1>Hello {{:foo}}</h1>', \r\n           engine: 'jsrender', \r\n           recipe: 'phantom-pdf'\r\n        }, \r\n        data: { \r\n            foo: \"world\"\r\n        }\r\n    }).then(function(resp) {\r\n     //prints pdf with headline Hello world\r\n     console.log(resp.content.toString())\r\n   });\r\n}).catch(function(e) {\r\n  console.log(e)\r\n})\r\n```\r\n\r\nI think that now `jsreport-core` can be nicely used in node.js applications (instead of toner) and together with other extensions it can be also distributed as whole `jsreport`.\r\n\r\n@bjrmatos - Do you have any comments, ideas or improvements about `jsreport-core` api?\r\n\r\nWhen we agree on the final version, I will merge toner sources into jsreport core and update articles to instruct readers how to use jsreport-core in nodejs instead of toner.\r\n"},"comment":{"url":"https://api.github.com/repos/jsreport/jsreport-core/issues/comments/161058765","html_url":"https://github.com/jsreport/jsreport-core/issues/1#issuecomment-161058765","issue_url":"https://api.github.com/repos/jsreport/jsreport-core/issues/1","id":161058765,"user":{"login":"pofider","id":2041960,"avatar_url":"https://avatars.githubusercontent.com/u/2041960?v=3","gravatar_id":"","url":"https://api.github.com/users/pofider","html_url":"https://github.com/pofider","followers_url":"https://api.github.com/users/pofider/followers","following_url":"https://api.github.com/users/pofider/following{/other_user}","gists_url":"https://api.github.com/users/pofider/gists{/gist_id}","starred_url":"https://api.github.com/users/pofider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pofider/subscriptions","organizations_url":"https://api.github.com/users/pofider/orgs","repos_url":"https://api.github.com/users/pofider/repos","events_url":"https://api.github.com/users/pofider/events{/privacy}","received_events_url":"https://api.github.com/users/pofider/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T18:43:12Z","updated_at":"2015-12-01T18:43:12Z","body":"You are right. I was thinking about it as well.\r\n\r\nIt should be in every extensions' docs. And also it should be mentioned in this doc it is convention to name the repository with `jsreport-` but the recipe/engine is just the second part.\r\n\r\nI will improve docs in this manner."}}