{"action":"created","issue":{"url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/2","repository_url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping","labels_url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/2/comments","events_url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/2/events","html_url":"https://github.com/noko-jazz-tech-lab/line-bot-ping/pull/2","id":184400297,"number":2,"title":"Implement the webhock endpoint for LINE BOT","user":{"login":"otofu-square","id":10118235,"avatar_url":"https://avatars.githubusercontent.com/u/10118235?v=3","gravatar_id":"","url":"https://api.github.com/users/otofu-square","html_url":"https://github.com/otofu-square","followers_url":"https://api.github.com/users/otofu-square/followers","following_url":"https://api.github.com/users/otofu-square/following{/other_user}","gists_url":"https://api.github.com/users/otofu-square/gists{/gist_id}","starred_url":"https://api.github.com/users/otofu-square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otofu-square/subscriptions","organizations_url":"https://api.github.com/users/otofu-square/orgs","repos_url":"https://api.github.com/users/otofu-square/repos","events_url":"https://api.github.com/users/otofu-square/events{/privacy}","received_events_url":"https://api.github.com/users/otofu-square/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-21T05:08:28Z","updated_at":"2016-10-22T04:27:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/pulls/2","html_url":"https://github.com/noko-jazz-tech-lab/line-bot-ping/pull/2","diff_url":"https://github.com/noko-jazz-tech-lab/line-bot-ping/pull/2.diff","patch_url":"https://github.com/noko-jazz-tech-lab/line-bot-ping/pull/2.patch"},"body":"### PR の目的\r\n\r\nLINE BOT から飛んでくる Webhock を受け取るエンドポイントを実装する。\r\n詳細は下記ドキュメント参照。\r\nhttps://devdocs.line.me/ja/#webhook\r\n\r\n### ToDo\r\n\r\n- [x] Node.js のフレームワーク [koa](https://github.com/koajs/koa) の導入\r\n- [x] ルーティングを簡単に書くための [koa-router](https://github.com/alexmingoia/koa-router) を導入\r\n- [x] Webhock からのリクエストを受け取る `POST /` のエンドポイントを実装する\r\n    - [x] レスポンスで 200 OK を返す\r\n    - [x] リクエスト内容をそのまま JSON で返す\r\n- [x] Heroku にデプロイする"},"comment":{"url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/comments/255506745","html_url":"https://github.com/noko-jazz-tech-lab/line-bot-ping/pull/2#issuecomment-255506745","issue_url":"https://api.github.com/repos/noko-jazz-tech-lab/line-bot-ping/issues/2","id":255506745,"user":{"login":"otofu-square","id":10118235,"avatar_url":"https://avatars.githubusercontent.com/u/10118235?v=3","gravatar_id":"","url":"https://api.github.com/users/otofu-square","html_url":"https://github.com/otofu-square","followers_url":"https://api.github.com/users/otofu-square/followers","following_url":"https://api.github.com/users/otofu-square/following{/other_user}","gists_url":"https://api.github.com/users/otofu-square/gists{/gist_id}","starred_url":"https://api.github.com/users/otofu-square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otofu-square/subscriptions","organizations_url":"https://api.github.com/users/otofu-square/orgs","repos_url":"https://api.github.com/users/otofu-square/repos","events_url":"https://api.github.com/users/otofu-square/events{/privacy}","received_events_url":"https://api.github.com/users/otofu-square/received_events","type":"User","site_admin":false},"created_at":"2016-10-22T04:27:08Z","updated_at":"2016-10-22T04:27:08Z","body":"ひとまず Heroku にデプロイして、送られてきたリクエストを JSON 化してレスポンスで返す API として動作するようになった！\r\n\r\n```\r\n$ curl -vsSX POST https://line-bot-ping.herokuapp.com\r\n* Rebuilt URL to: https://line-bot-ping.herokuapp.com/\r\n*   Trying 54.197.246.21...\r\n* Connected to line-bot-ping.herokuapp.com (54.197.246.21) port 443 (#0)\r\n* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\r\n* Server certificate: *.herokuapp.com\r\n* Server certificate: DigiCert SHA2 High Assurance Server CA\r\n* Server certificate: DigiCert High Assurance EV Root CA\r\n> POST / HTTP/1.1\r\n> Host: line-bot-ping.herokuapp.com\r\n> User-Agent: curl/7.43.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 200 OK\r\n< Server: Cowboy\r\n< Connection: keep-alive\r\n< Content-Type: application/json; charset=utf-8\r\n< Content-Length: 395\r\n< Date: Sat, 22 Oct 2016 04:26:26 GMT\r\n< Via: 1.1 vegur\r\n<\r\n* Connection #0 to host line-bot-ping.herokuapp.com left intact\r\n{\"method\":\"POST\",\"url\":\"/\",\"header\":{\"host\":\"line-bot-ping.herokuapp.com\",\"connection\":\"close\",\"user-agent\":\"curl/7.43.0\",\"accept\":\"*/*\",\"x-request-id\":\"97012963-41f7-4605-9245-814f023d85ca\",\"x-forwarded-for\":\"153.215.43.166\",\"x-forwarded-proto\":\"https\",\"x-forwarded-port\":\"443\",\"via\":\"1.1 vegur\",\"connect-time\":\"1\",\"x-request-start\":\"1477110386877\",\"total-route-time\":\"0\",\"content-length\":\"0\"}}%\r\n```"}}
{"actor":{"display_login":"otofu-square"}}