{"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7","id":48658099,"html_url":"https://github.com/pebble/koa-joi-router/pull/7","diff_url":"https://github.com/pebble/koa-joi-router/pull/7.diff","patch_url":"https://github.com/pebble/koa-joi-router/pull/7.patch","issue_url":"https://api.github.com/repos/pebble/koa-joi-router/issues/7","number":7,"state":"open","locked":false,"title":"add support to accepts an array of route objects","user":{"login":"martinmicunda","id":1643606,"avatar_url":"https://avatars.githubusercontent.com/u/1643606?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmicunda","html_url":"https://github.com/martinmicunda","followers_url":"https://api.github.com/users/martinmicunda/followers","following_url":"https://api.github.com/users/martinmicunda/following{/other_user}","gists_url":"https://api.github.com/users/martinmicunda/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmicunda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmicunda/subscriptions","organizations_url":"https://api.github.com/users/martinmicunda/orgs","repos_url":"https://api.github.com/users/martinmicunda/repos","events_url":"https://api.github.com/users/martinmicunda/events{/privacy}","received_events_url":"https://api.github.com/users/martinmicunda/received_events","type":"User","site_admin":false},"body":"I like to define array of routes in my [application](https://github.com/martinmicunda/employee-scheduling-api/blob/master/lib%2Fapi%2Fpartners%2Findex.js#L17) same like in `hapi` so I have added option to pass array to `route()` function.  `route()` accepts an object or array of objects now.\r\n\r\n```js\r\nvar router = require('koa-joi-router');\r\nvar public = router();\r\n\r\nvar routes = [\r\n  {\r\n    method: 'post',\r\n    path: '/users',\r\n    handler: function*(){}\r\n  },\r\n  {\r\n    method: 'get',\r\n    path: '/users',\r\n    handler: function*(){}\r\n  }\r\n];\r\n\r\npublic.route(routes);\r\n```\r\n\r\n* [x] test\r\n* [x] coverage\r\n* [x] doc","created_at":"2015-10-24T15:27:19Z","updated_at":"2015-10-24T15:27:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7/commits","review_comments_url":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7/comments","review_comment_url":"https://api.github.com/repos/pebble/koa-joi-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pebble/koa-joi-router/issues/7/comments","statuses_url":"https://api.github.com/repos/pebble/koa-joi-router/statuses/c12664c575e44a81b082774528a458cf017d35ca","head":{"label":"martinmicunda:routes","ref":"routes","sha":"c12664c575e44a81b082774528a458cf017d35ca","user":{"login":"martinmicunda","id":1643606,"avatar_url":"https://avatars.githubusercontent.com/u/1643606?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmicunda","html_url":"https://github.com/martinmicunda","followers_url":"https://api.github.com/users/martinmicunda/followers","following_url":"https://api.github.com/users/martinmicunda/following{/other_user}","gists_url":"https://api.github.com/users/martinmicunda/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmicunda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmicunda/subscriptions","organizations_url":"https://api.github.com/users/martinmicunda/orgs","repos_url":"https://api.github.com/users/martinmicunda/repos","events_url":"https://api.github.com/users/martinmicunda/events{/privacy}","received_events_url":"https://api.github.com/users/martinmicunda/received_events","type":"User","site_admin":false},"repo":{"id":44870003,"name":"koa-joi-router","full_name":"martinmicunda/koa-joi-router","owner":{"login":"martinmicunda","id":1643606,"avatar_url":"https://avatars.githubusercontent.com/u/1643606?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmicunda","html_url":"https://github.com/martinmicunda","followers_url":"https://api.github.com/users/martinmicunda/followers","following_url":"https://api.github.com/users/martinmicunda/following{/other_user}","gists_url":"https://api.github.com/users/martinmicunda/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmicunda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmicunda/subscriptions","organizations_url":"https://api.github.com/users/martinmicunda/orgs","repos_url":"https://api.github.com/users/martinmicunda/repos","events_url":"https://api.github.com/users/martinmicunda/events{/privacy}","received_events_url":"https://api.github.com/users/martinmicunda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinmicunda/koa-joi-router","description":"Configurable, input and output validated routing for koa","fork":true,"url":"https://api.github.com/repos/martinmicunda/koa-joi-router","forks_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/forks","keys_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/teams","hooks_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/hooks","issue_events_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/issues/events{/number}","events_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/events","assignees_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/assignees{/user}","branches_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/branches{/branch}","tags_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/tags","blobs_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/statuses/{sha}","languages_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/languages","stargazers_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/stargazers","contributors_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/contributors","subscribers_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/subscribers","subscription_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/subscription","commits_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/contents/{+path}","compare_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/merges","archive_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/downloads","issues_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/issues{/number}","pulls_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/pulls{/number}","milestones_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/milestones{/number}","notifications_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/labels{/name}","releases_url":"https://api.github.com/repos/martinmicunda/koa-joi-router/releases{/id}","created_at":"2015-10-24T14:36:18Z","updated_at":"2015-10-24T14:36:19Z","pushed_at":"2015-10-24T15:18:28Z","git_url":"git://github.com/martinmicunda/koa-joi-router.git","ssh_url":"git@github.com:martinmicunda/koa-joi-router.git","clone_url":"https://github.com/martinmicunda/koa-joi-router.git","svn_url":"https://github.com/martinmicunda/koa-joi-router","homepage":"","size":188,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pebble:master","ref":"master","sha":"c56dc64fcec2eebbebaa4b564b1dc63e57db1137","user":{"login":"pebble","id":1048268,"avatar_url":"https://avatars.githubusercontent.com/u/1048268?v=3","gravatar_id":"","url":"https://api.github.com/users/pebble","html_url":"https://github.com/pebble","followers_url":"https://api.github.com/users/pebble/followers","following_url":"https://api.github.com/users/pebble/following{/other_user}","gists_url":"https://api.github.com/users/pebble/gists{/gist_id}","starred_url":"https://api.github.com/users/pebble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pebble/subscriptions","organizations_url":"https://api.github.com/users/pebble/orgs","repos_url":"https://api.github.com/users/pebble/repos","events_url":"https://api.github.com/users/pebble/events{/privacy}","received_events_url":"https://api.github.com/users/pebble/received_events","type":"Organization","site_admin":false},"repo":{"id":22698679,"name":"koa-joi-router","full_name":"pebble/koa-joi-router","owner":{"login":"pebble","id":1048268,"avatar_url":"https://avatars.githubusercontent.com/u/1048268?v=3","gravatar_id":"","url":"https://api.github.com/users/pebble","html_url":"https://github.com/pebble","followers_url":"https://api.github.com/users/pebble/followers","following_url":"https://api.github.com/users/pebble/following{/other_user}","gists_url":"https://api.github.com/users/pebble/gists{/gist_id}","starred_url":"https://api.github.com/users/pebble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pebble/subscriptions","organizations_url":"https://api.github.com/users/pebble/orgs","repos_url":"https://api.github.com/users/pebble/repos","events_url":"https://api.github.com/users/pebble/events{/privacy}","received_events_url":"https://api.github.com/users/pebble/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pebble/koa-joi-router","description":"Configurable, input and output validated routing for koa","fork":false,"url":"https://api.github.com/repos/pebble/koa-joi-router","forks_url":"https://api.github.com/repos/pebble/koa-joi-router/forks","keys_url":"https://api.github.com/repos/pebble/koa-joi-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pebble/koa-joi-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pebble/koa-joi-router/teams","hooks_url":"https://api.github.com/repos/pebble/koa-joi-router/hooks","issue_events_url":"https://api.github.com/repos/pebble/koa-joi-router/issues/events{/number}","events_url":"https://api.github.com/repos/pebble/koa-joi-router/events","assignees_url":"https://api.github.com/repos/pebble/koa-joi-router/assignees{/user}","branches_url":"https://api.github.com/repos/pebble/koa-joi-router/branches{/branch}","tags_url":"https://api.github.com/repos/pebble/koa-joi-router/tags","blobs_url":"https://api.github.com/repos/pebble/koa-joi-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pebble/koa-joi-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pebble/koa-joi-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/pebble/koa-joi-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pebble/koa-joi-router/statuses/{sha}","languages_url":"https://api.github.com/repos/pebble/koa-joi-router/languages","stargazers_url":"https://api.github.com/repos/pebble/koa-joi-router/stargazers","contributors_url":"https://api.github.com/repos/pebble/koa-joi-router/contributors","subscribers_url":"https://api.github.com/repos/pebble/koa-joi-router/subscribers","subscription_url":"https://api.github.com/repos/pebble/koa-joi-router/subscription","commits_url":"https://api.github.com/repos/pebble/koa-joi-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/pebble/koa-joi-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/pebble/koa-joi-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/pebble/koa-joi-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/pebble/koa-joi-router/contents/{+path}","compare_url":"https://api.github.com/repos/pebble/koa-joi-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pebble/koa-joi-router/merges","archive_url":"https://api.github.com/repos/pebble/koa-joi-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pebble/koa-joi-router/downloads","issues_url":"https://api.github.com/repos/pebble/koa-joi-router/issues{/number}","pulls_url":"https://api.github.com/repos/pebble/koa-joi-router/pulls{/number}","milestones_url":"https://api.github.com/repos/pebble/koa-joi-router/milestones{/number}","notifications_url":"https://api.github.com/repos/pebble/koa-joi-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pebble/koa-joi-router/labels{/name}","releases_url":"https://api.github.com/repos/pebble/koa-joi-router/releases{/id}","created_at":"2014-08-06T21:26:37Z","updated_at":"2015-09-29T17:30:16Z","pushed_at":"2015-10-12T16:06:12Z","git_url":"git://github.com/pebble/koa-joi-router.git","ssh_url":"git@github.com:pebble/koa-joi-router.git","clone_url":"https://github.com/pebble/koa-joi-router.git","svn_url":"https://github.com/pebble/koa-joi-router","homepage":"","size":188,"stargazers_count":43,"watchers_count":43,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7"},"html":{"href":"https://github.com/pebble/koa-joi-router/pull/7"},"issue":{"href":"https://api.github.com/repos/pebble/koa-joi-router/issues/7"},"comments":{"href":"https://api.github.com/repos/pebble/koa-joi-router/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/pebble/koa-joi-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pebble/koa-joi-router/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/pebble/koa-joi-router/statuses/c12664c575e44a81b082774528a458cf017d35ca"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":67,"deletions":6,"changed_files":4}}