{"action":"created","issue":{"url":"https://api.github.com/repos/baby-loris/bla/issues/114","repository_url":"https://api.github.com/repos/baby-loris/bla","labels_url":"https://api.github.com/repos/baby-loris/bla/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/baby-loris/bla/issues/114/comments","events_url":"https://api.github.com/repos/baby-loris/bla/issues/114/events","html_url":"https://github.com/baby-loris/bla/issues/114","id":148301234,"number":114,"title":"bla 2.0","user":{"login":"tarmolov","id":366419,"avatar_url":"https://avatars.githubusercontent.com/u/366419?v=3","gravatar_id":"","url":"https://api.github.com/users/tarmolov","html_url":"https://github.com/tarmolov","followers_url":"https://api.github.com/users/tarmolov/followers","following_url":"https://api.github.com/users/tarmolov/following{/other_user}","gists_url":"https://api.github.com/users/tarmolov/gists{/gist_id}","starred_url":"https://api.github.com/users/tarmolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarmolov/subscriptions","organizations_url":"https://api.github.com/users/tarmolov/orgs","repos_url":"https://api.github.com/users/tarmolov/repos","events_url":"https://api.github.com/users/tarmolov/events{/privacy}","received_events_url":"https://api.github.com/users/tarmolov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-14T09:21:16Z","updated_at":"2016-04-28T06:52:39Z","closed_at":null,"body":"It's time to rethink the library and take into account all suggestions, ideas, and advice.\r\n\r\nWhat's new should be added/changed/removed in 2.0?\r\n\r\n1. Use ES6 promises instead of `vow`.\r\n2. Add a more profound param validation.\r\n3. Add a debug mode.\r\n4. Add api method name to ApiError message.\r\n5. Add \"hooks\" such as `beforeRequestSend` and `afterResponseReceived` to the client side.\r\n6. It's not possible to stream a file or to response with json without data/error wrappers.\r\n7. Metainformation for response/error.\r\n8. Add all errors listed in [http statuses](https://github.com/prettymuchbryce/node-http-status).\r\n9. Global hook in Api for resolving/rejecting methods.\r\n\r\n/cc @lemmy- @razetdinov @dfilatov @twoRoger @zloylos"},"comment":{"url":"https://api.github.com/repos/baby-loris/bla/issues/comments/215327777","html_url":"https://github.com/baby-loris/bla/issues/114#issuecomment-215327777","issue_url":"https://api.github.com/repos/baby-loris/bla/issues/114","id":215327777,"user":{"login":"zloylos","id":1593308,"avatar_url":"https://avatars.githubusercontent.com/u/1593308?v=3","gravatar_id":"","url":"https://api.github.com/users/zloylos","html_url":"https://github.com/zloylos","followers_url":"https://api.github.com/users/zloylos/followers","following_url":"https://api.github.com/users/zloylos/following{/other_user}","gists_url":"https://api.github.com/users/zloylos/gists{/gist_id}","starred_url":"https://api.github.com/users/zloylos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zloylos/subscriptions","organizations_url":"https://api.github.com/users/zloylos/orgs","repos_url":"https://api.github.com/users/zloylos/repos","events_url":"https://api.github.com/users/zloylos/events{/privacy}","received_events_url":"https://api.github.com/users/zloylos/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T06:52:39Z","updated_at":"2016-04-28T06:52:39Z","body":"* Examples for dockpage.\r\nWe can add param `examples` which contains set of valid set of parameters.\r\nAnd then show them into dockpage or playground.\r\n\r\n```js\r\nmodule.exports = new bla.ApiMethod({\r\n  name: 'bla-method',\r\n  description: 'Change user name',\r\n  examples: [\r\n    {user_id: 1, new_name: 'Vasya'},\r\n    {user_id: 2, new_name: 'Petr'}\r\n  ],\r\n  params: {\r\n    user_id: {type: 'number', required: true},\r\n    new_name: {type: 'string', required: true}\r\n  },\r\n  action: () => {}\r\n});\r\n```\r\n\r\nExamples can be stored in `bla-method.api.examples.json', for example.\r\n``` examples: require('./bla-method.api.examples')```"}}