{"action":"closed","issue":{"url":"https://api.github.com/repos/sakuraapi/api/issues/2","repository_url":"https://api.github.com/repos/sakuraapi/api","labels_url":"https://api.github.com/repos/sakuraapi/api/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sakuraapi/api/issues/2/comments","events_url":"https://api.github.com/repos/sakuraapi/api/issues/2/events","html_url":"https://github.com/sakuraapi/api/issues/2","id":192047947,"number":2,"title":"Decorator Routing","user":{"login":"etsuo","id":6020168,"avatar_url":"https://avatars.githubusercontent.com/u/6020168?v=3","gravatar_id":"","url":"https://api.github.com/users/etsuo","html_url":"https://github.com/etsuo","followers_url":"https://api.github.com/users/etsuo/followers","following_url":"https://api.github.com/users/etsuo/following{/other_user}","gists_url":"https://api.github.com/users/etsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/etsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsuo/subscriptions","organizations_url":"https://api.github.com/users/etsuo/orgs","repos_url":"https://api.github.com/users/etsuo/repos","events_url":"https://api.github.com/users/etsuo/events{/privacy}","received_events_url":"https://api.github.com/users/etsuo/received_events","type":"User","site_admin":false},"labels":[{"id":489357193,"url":"https://api.github.com/repos/sakuraapi/api/labels/story","name":"story","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":{"login":"etsuo","id":6020168,"avatar_url":"https://avatars.githubusercontent.com/u/6020168?v=3","gravatar_id":"","url":"https://api.github.com/users/etsuo","html_url":"https://github.com/etsuo","followers_url":"https://api.github.com/users/etsuo/followers","following_url":"https://api.github.com/users/etsuo/following{/other_user}","gists_url":"https://api.github.com/users/etsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/etsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsuo/subscriptions","organizations_url":"https://api.github.com/users/etsuo/orgs","repos_url":"https://api.github.com/users/etsuo/repos","events_url":"https://api.github.com/users/etsuo/events{/privacy}","received_events_url":"https://api.github.com/users/etsuo/received_events","type":"User","site_admin":false},"assignees":[{"login":"etsuo","id":6020168,"avatar_url":"https://avatars.githubusercontent.com/u/6020168?v=3","gravatar_id":"","url":"https://api.github.com/users/etsuo","html_url":"https://github.com/etsuo","followers_url":"https://api.github.com/users/etsuo/followers","following_url":"https://api.github.com/users/etsuo/following{/other_user}","gists_url":"https://api.github.com/users/etsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/etsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsuo/subscriptions","organizations_url":"https://api.github.com/users/etsuo/orgs","repos_url":"https://api.github.com/users/etsuo/repos","events_url":"https://api.github.com/users/etsuo/events{/privacy}","received_events_url":"https://api.github.com/users/etsuo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/sakuraapi/api/milestones/1","html_url":"https://github.com/sakuraapi/api/milestones/0.1.0","labels_url":"https://api.github.com/repos/sakuraapi/api/milestones/1/labels","id":2158921,"number":1,"title":"0.1.0","description":null,"creator":{"login":"etsuo","id":6020168,"avatar_url":"https://avatars.githubusercontent.com/u/6020168?v=3","gravatar_id":"","url":"https://api.github.com/users/etsuo","html_url":"https://github.com/etsuo","followers_url":"https://api.github.com/users/etsuo/followers","following_url":"https://api.github.com/users/etsuo/following{/other_user}","gists_url":"https://api.github.com/users/etsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/etsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etsuo/subscriptions","organizations_url":"https://api.github.com/users/etsuo/orgs","repos_url":"https://api.github.com/users/etsuo/repos","events_url":"https://api.github.com/users/etsuo/events{/privacy}","received_events_url":"https://api.github.com/users/etsuo/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2016-11-26T22:29:20Z","updated_at":"2016-11-29T06:43:15Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-11-28T16:16:15Z","updated_at":"2016-11-29T06:43:15Z","closed_at":"2016-11-29T06:43:15Z","body":"Initial pass at routing based on decorators.\r\n\r\nAs a developer, I'd like to be able to add routes declaratively via typescript decorators to simplify the wiring up of APIs.\r\n\r\nFor example:\r\n\r\n```\r\n@routable({\r\n  baseUrl: 'test'\r\n})\r\nclass Test {\r\n  constructor() {\r\n  }\r\n\r\n  @route({\r\n    path: '/',\r\n    method: 'get'\r\n  })\r\n  someMethod(req: express.Request, res: express.Response) {\r\n    res.status(200).send({});\r\n  }\r\n\r\n  @route({\r\n    path: 'someOtherMethod/',\r\n    method: 'post'\r\n  })\r\n  someOtherMethod(req: express.Request, res: express.Response) {\r\n    res.status(200).send({});\r\n  }\r\n}\r\n```\r\n\r\nThis can then be added to the router with `sakuraApi.route(Test)`. "}}
{"actor":{"display_login":"etsuo"}}