{"action":"created","issue":{"url":"https://api.github.com/repos/senecajs/seneca-web/issues/108","repository_url":"https://api.github.com/repos/senecajs/seneca-web","labels_url":"https://api.github.com/repos/senecajs/seneca-web/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/senecajs/seneca-web/issues/108/comments","events_url":"https://api.github.com/repos/senecajs/seneca-web/issues/108/events","html_url":"https://github.com/senecajs/seneca-web/issues/108","id":185560137,"number":108,"title":"[Question] How can I do RESTful mapping?","user":{"login":"djensen47","id":527865,"avatar_url":"https://avatars.githubusercontent.com/u/527865?v=3","gravatar_id":"","url":"https://api.github.com/users/djensen47","html_url":"https://github.com/djensen47","followers_url":"https://api.github.com/users/djensen47/followers","following_url":"https://api.github.com/users/djensen47/following{/other_user}","gists_url":"https://api.github.com/users/djensen47/gists{/gist_id}","starred_url":"https://api.github.com/users/djensen47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djensen47/subscriptions","organizations_url":"https://api.github.com/users/djensen47/orgs","repos_url":"https://api.github.com/users/djensen47/repos","events_url":"https://api.github.com/users/djensen47/events{/privacy}","received_events_url":"https://api.github.com/users/djensen47/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-27T02:46:24Z","updated_at":"2016-11-04T04:31:20Z","closed_at":null,"body":"I would like to map RESTful API routes calls to action patterns.\n\nFor instance, is there a better way to do this:\n\n```\nconst Routes = [{\n  prefix: '/animals',\n  pin: 'role:animals,cmd:*',\n  map: {\n    read: {\n      GET: true,\n      alias: '/animals/{id}'\n    },\n    list: {\n      GET: true,\n      alias: '/animals'\n    },\n    create: {\n      POST: true,\n      alias: '/animals'\n    },\n    update: {\n      POST: true,\n      alias: '/animals/{id}'\n    },\n    delete: {\n      'DELETE': true,\n      alias: '/animals/{id}'\n    }\n  }\n}];\n```\n"},"comment":{"url":"https://api.github.com/repos/senecajs/seneca-web/issues/comments/258342811","html_url":"https://github.com/senecajs/seneca-web/issues/108#issuecomment-258342811","issue_url":"https://api.github.com/repos/senecajs/seneca-web/issues/108","id":258342811,"user":{"login":"djensen47","id":527865,"avatar_url":"https://avatars.githubusercontent.com/u/527865?v=3","gravatar_id":"","url":"https://api.github.com/users/djensen47","html_url":"https://github.com/djensen47","followers_url":"https://api.github.com/users/djensen47/followers","following_url":"https://api.github.com/users/djensen47/following{/other_user}","gists_url":"https://api.github.com/users/djensen47/gists{/gist_id}","starred_url":"https://api.github.com/users/djensen47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djensen47/subscriptions","organizations_url":"https://api.github.com/users/djensen47/orgs","repos_url":"https://api.github.com/users/djensen47/repos","events_url":"https://api.github.com/users/djensen47/events{/privacy}","received_events_url":"https://api.github.com/users/djensen47/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T04:31:20Z","updated_at":"2016-11-04T04:31:20Z","body":"All the \"mapper\" code does is blindly take strings and create routes on the web server, each one uses a different format. Hapi uses curly braces, express and koa use colons."}}
{"actor":{"display_login":"djensen47"}}